Browse Source

rewrite Elm config by hand

main
Brian Hicks 2 years ago
parent
commit
0118784cb7
  1. 43
      dotfiles/kakoune.nix
  2. 4
      shell.nix

43
dotfiles/kakoune.nix

@ -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
# {
@ -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
# {
@ -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
}
'';

4
shell.nix

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