diff --git a/home/editor/neovim/default.nix b/home/editor/neovim/default.nix index 56c0c7c..079409e 100644 --- a/home/editor/neovim/default.nix +++ b/home/editor/neovim/default.nix @@ -3,7 +3,31 @@ neovim = { enable = true; defaultEditor = true; + vimAlias = true; + plugins = with pkgs.vimPlugins; [ + vim-fugitive + undotree + telescope-nvim + lsp-zero-nvim + (nvim-treesitter.withPlugins (p: [ + p.tree-sitter-nix + p.tree-sitter-go + p.tree-sitter-vim + p.tree-sitter-bash + p.tree-sitter-json + p.tree-sitter-python + ])) + ]; + extraLuaConfig = '' + ${builtins.readFile ./options.lua} + ''; }; }; + home.packages = with pkgs; [ + # nix stuff + nixfmt + nil + statix + ]; home.sessionVariables.EDITOR = "nvim"; } diff --git a/home/editor/neovim/options.lua b/home/editor/neovim/options.lua new file mode 100644 index 0000000..87afdab --- /dev/null +++ b/home/editor/neovim/options.lua @@ -0,0 +1,11 @@ +vim.g.mapleader = ' ' +vim.g.maplocalleader = ' ' + +vim.opt.cursorline = true +vim.opt.scrolloff = 15 +vim.opt.wrap = true +vim.o.number = true +vim.o.relativenumber = true + +vim.o.tabstop = 4 +vim.o.shiftwidth = 4