From 17e939a313da880c2b7af9c8296eb12dcc9ae80f Mon Sep 17 00:00:00 2001 From: Jakub Stachurski Date: Mon, 31 Mar 2025 11:36:29 +0200 Subject: Readd vim --- home-manager/modules/apps/nvim/default.nix | 92 +++++++++++++++++++++++++++++- 1 file changed, 90 insertions(+), 2 deletions(-) (limited to 'home-manager/modules/apps/nvim/default.nix') diff --git a/home-manager/modules/apps/nvim/default.nix b/home-manager/modules/apps/nvim/default.nix index 0505f78..366cdf0 100644 --- a/home-manager/modules/apps/nvim/default.nix +++ b/home-manager/modules/apps/nvim/default.nix @@ -1,4 +1,92 @@ -{pkgs, ...}: +{ pkgs, config, ...}: +let + treesitterWithGrammars = (pkgs.vimPlugins.nvim-treesitter.withPlugins (p : [ + p.bash + p.comment + p.css + p.dockerfile + p.gitattributes + p.gitignore + p.go + p.gomod + p.gowork + p.rust + p.javascript + p.typescript + p.json5 + p.json + p.lua + p.markdown + p.nix + p.python + p.java + p.rust + p.toml + p.vue + p.yaml + p.php + p.latex + ])); + treesitter-parsers = pkgs.symlinkJoin { + name = "treesitter-parsers"; + paths = treesitterWithGrammars.dependencies; + }; + +in { - # TODO + programs.neovim = { + enable = true; + defaultEditor = true; + viAlias = true; + vimAlias = true; + # vimdiffAlias = true; + # # withPython3 = false; + # # withNodeJs = false; + # # withRuby = false; + # + coc.enable = false; + # + plugins = [ + treesitterWithGrammars + ]; + }; + + home.file."./.config/nvim/lua/wilkuu/init.lua".text = '' + require("wilkuu.set") + require("wilkuu.remap") + ''; + #vim.opt.runtimepath:append("${treesitter-parsers}") + + home.file."./.config/nvim/lua/wilkuu/nix.lua".text = '' + return { + vue_ts_plugin = "/home/wilkuu/.npm/@vue/typescript-plugin", + } + ''; + + + # home.file."./.local/share/nvim/nix/nvim-treesitter/" = { + # source = treesitterWithGrammars; + # recursive = true; + # }; + + home.sessionPath = [ + "/home/wilkuu/.npm/bin/" + ]; + + home.packages = with pkgs; [ + lua + lua-language-server + gopls + go + typescript + nodejs_22 + rustup + nixd + nixfmt-rfc-style + pyright + nodePackages.intelephense + texlive.combined.scheme-full + texlab + ]; + } -- cgit v1.3.1