Skip to content

Commit

Permalink
rewrite Elm config by hand
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHicks committed Mar 18, 2020
1 parent 3ec45dd commit 0118784
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 31 deletions.
43 changes: 14 additions & 29 deletions dotfiles/kakoune.nix
Expand Up @@ -56,23 +56,6 @@ in {
};

# hooks = [
# # Elm
# {
# name = "WinCreate";
# option = ".*.elm";
# commands = ''
# evaluate-commands %sh{
# if which elm-format > /dev/null; then
# echo 'set-option buffer formatcmd "elm-format --stdin"'
# fi
# }
# '';
# }
# {
# commands = "format";
# name = "BufWritePre";
# option = ".*.elm";
# }

# # Haskell
# {
Expand Down Expand Up @@ -133,15 +116,6 @@ in {
# set-option buffer softtabstop 2
# '';
# }
# {
# name = "WinCreate";
# option = ".*.elm";
# commands = ''
# expandtab
# set-option buffer tabstop 4
# set-option buffer softtabstop 4
# '';
# }

# # kakboard
# {
Expand Down Expand Up @@ -244,11 +218,22 @@ in {
hook global BufReload .* %{ git update-diff }
# TODO: NormalIdle?
## LANGUAGES
# Nix
# Languages
hook global WinSetOption filetype=nix %{
set-option buffer formatcmd nixfmt
expandtab
set-option buffer tabstop 2
# formatting
set-option buffer formatcmd nixfmt
hook buffer BufWritePre .* format
}
hook global WinSetOption filetype=elm %{
expandtab
set-option buffer tabstop 4
# formatting
set-option buffer formatcmd 'elm-format --stdin'
hook buffer BufWritePre .* format
}
'';
Expand Down
4 changes: 2 additions & 2 deletions shell.nix
Expand Up @@ -15,7 +15,7 @@ stdenv.mkDerivation {

## sample projects
# elm
# elmPackages.elm
# elmPackages.elm-format
elmPackages.elm
elmPackages.elm-format
];
}

0 comments on commit 0118784

Please sign in to comment.