diff --git a/.dotbot.conf.yaml b/.dotbot.conf.yaml index 0c3b98a..d94779b 100644 --- a/.dotbot.conf.yaml +++ b/.dotbot.conf.yaml @@ -23,7 +23,6 @@ ~/.config/tmux/tmux-nerd-font-window-name.yml: tmux/tmux-nerd-font-window-name.yml ~/.config/zed/settings.json: zed/settings.json ~/.curlrc: url/curlrc - ~/.editorconfig: style/editorconfig ~/.gitconfig: git/gitconfig ~/.gitignore: git/gitignore ~/.gitmux.conf: tmux/gitmux.conf diff --git a/Brewfile b/Brewfile index d349e24..09a12eb 100644 --- a/Brewfile +++ b/Brewfile @@ -124,8 +124,6 @@ brew "fbthrift" brew "fb303" # Shared library for Watchman and Eden projects brew "edencommon" -# Maintain consistent coding style between multiple editors -brew "editorconfig" # LLVM bytecode to JavaScript compiler brew "emscripten" # Tools to convert fonts from OTF/TTF to EOT format diff --git a/nix/home/default.nix b/nix/home/default.nix index 0ed7006..b4b38e7 100644 --- a/nix/home/default.nix +++ b/nix/home/default.nix @@ -11,6 +11,7 @@ in ./asdf ./bat ./ctags + ./editorconfig ./gnupg ./hammerspoon ./karabiner diff --git a/nix/home/editorconfig/default.nix b/nix/home/editorconfig/default.nix new file mode 100644 index 0000000..95f22f5 --- /dev/null +++ b/nix/home/editorconfig/default.nix @@ -0,0 +1,24 @@ +{ pkgs, ... }: + +{ + editorconfig = { + enable = true; + settings = { + "*" = { + charset = "utf-8"; + end_of_line = "lf"; + indent_style = "tab"; + insert_final_newline = true; + trim_trailing_whitespace = true; + }; + "*.{md,markdown,pandoc}" = { + trim_trailing_whitespace = false; + }; + "Makefile" = { + indent_style = "tab"; + }; + }; + }; + + home.packages = [ pkgs.editorconfig-core-c ]; +} diff --git a/style/editorconfig b/style/editorconfig deleted file mode 100644 index d5e70ea..0000000 --- a/style/editorconfig +++ /dev/null @@ -1,18 +0,0 @@ -# http://editorconfig.org - -# Root file -root = true - -# Unix-style newlines with a newline ending every file -[*] -charset = utf-8 -end_of_line = lf -indent_style = tab -insert_final_newline = true -trim_trailing_whitespace = true - -[*.{md,markdown,pandoc}] -trim_trailing_whitespace = false - -[Makefile] -indent_style = tab