diff --git a/configuration.nix b/configuration.nix index ef5a178..6efb9b8 100644 --- a/configuration.nix +++ b/configuration.nix @@ -103,14 +103,11 @@ git-credential-oauth - rustup - neovim - tree-sitter - firefox brave gparted + rustup gnumake zig go diff --git a/home.nix b/home.nix index 077b21d..610d2c8 100644 --- a/home.nix +++ b/home.nix @@ -58,6 +58,56 @@ # systemd.enable = true; # }; + programs.neovim = + let + treesitterWithGrammars = (pkgs.vimPlugins.nvim-treesitter.withPlugins (p: [ + p.bash + p.comment + p.css + p.dockerfile + p.fish + p.gitattributes + p.gitignore + p.go + p.gomod + p.gowork + p.javascript + p.json5 + p.json + p.lua + p.make + p.markdown + p.nix + p.python + p.rust + p.toml + p.typescript + p.yaml + ])); + + treesitter-parsers = pkgs.symlinkJoin { + name = "treesitter-parsers"; + paths = treesitterWithGrammars.dependencies; + }; + in + { + enable = true; + withNodeJs = true; + # extraConfig = ''vim.opt.runtimepath:append ("${treesitter-parsers}")''; + extraLuaConfig = '' + -- bootstrap lazy.nvim, LazyVim and your plugins + require("config.lazy") + + vim.g.editorconfig = true + + vim.opt.runtimepath:append ("${treesitter-parsers}") + ''; + + plugins = [ + treesitterWithGrammars + ]; + }; + # Let Home Manager install and manage itself. programs.home-manager.enable = true; }