rewrite Elm config by hand

main
Brian Hicks 2020-03-18 10:17:14 -05:00
parent 3ec45dd283
commit 0118784cb7
2 changed files with 16 additions and 31 deletions

View File

@ -56,23 +56,6 @@ in {
}; };
# hooks = [ # 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 # # Haskell
# { # {
@ -133,15 +116,6 @@ in {
# set-option buffer softtabstop 2 # set-option buffer softtabstop 2
# ''; # '';
# } # }
# {
# name = "WinCreate";
# option = ".*.elm";
# commands = ''
# expandtab
# set-option buffer tabstop 4
# set-option buffer softtabstop 4
# '';
# }
# # kakboard # # kakboard
# { # {
@ -244,11 +218,22 @@ in {
hook global BufReload .* %{ git update-diff } hook global BufReload .* %{ git update-diff }
# TODO: NormalIdle? # TODO: NormalIdle?
## LANGUAGES # Languages
# Nix
hook global WinSetOption filetype=nix %{ hook global WinSetOption filetype=nix %{
set-option buffer formatcmd nixfmt expandtab
set-option buffer tabstop 2 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 hook buffer BufWritePre .* format
} }
''; '';

View File

@ -15,7 +15,7 @@ stdenv.mkDerivation {
## sample projects ## sample projects
# elm # elm
# elmPackages.elm elmPackages.elm
# elmPackages.elm-format elmPackages.elm-format
]; ];
} }