diff options
Diffstat (limited to 'modules/home/nvim')
| -rw-r--r-- | modules/home/nvim/default.nix | 14 | ||||
| -rw-r--r-- | modules/home/nvim/global_config.lua | 12 |
2 files changed, 26 insertions, 0 deletions
diff --git a/modules/home/nvim/default.nix b/modules/home/nvim/default.nix new file mode 100644 index 0000000..6cae9d6 --- /dev/null +++ b/modules/home/nvim/default.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: { + programs.neovim = { + enable = true; + defaultEditor = true; + viAlias = true; + vimAlias = true; + + plugins = with pkgs.vimPlugins; [ + nvim-treesitter.withAllGrammars + ]; + + extraLuaConfig = builtins.readFile ./global_config.lua; + }; +} diff --git a/modules/home/nvim/global_config.lua b/modules/home/nvim/global_config.lua new file mode 100644 index 0000000..2ae6dce --- /dev/null +++ b/modules/home/nvim/global_config.lua @@ -0,0 +1,12 @@ +vim.opt.expandtab = true +vim.opt.shiftwidth = 2 +vim.opt.tabstop = 2 + +vim.api.nvim_create_autocmd("FileType", { + pattern = "nix", + callback = function() + vim.opt_local.shiftwidth = 2 + vim.opt_local.tabstop = 2 + vim.opt_local.expandtab = true + end, +}) |
