{ config, pkgs, ... }: let inherit (pkgs.lib.lists) subtractLists; in { programs.neovim = { enable = true; viAlias = true; vimAlias = true; withNodeJs = true; withPython3 = true; plugins = with pkgs.vimPlugins; [ # ------------------ # --- Completion --- # ------------------ cmp-buffer # Buffer Word Completion cmp-cmdline # Command Line Completion cmp-nvim-lsp # Main LSP cmp-path # Path Completion cmp_luasnip # Snippets Completion friendly-snippets # Snippets lsp_lines-nvim # Inline Diagnostics luasnip # Snippets nvim-cmp # Completions nvim-lspconfig # LSP Config # ------------------ # ----- Helpers ---- # ------------------ aerial-nvim # Code Outline comment-nvim # Code Comments diffview-nvim # Diff View leap-nvim # Quick Movement neo-tree-nvim # File Explorer neoformat # Format numb-nvim # Peek / Jump to Lines nvim-autopairs # Automatically Close Pairs (),[],{} telescope-fzf-native-nvim # Faster Telescope telescope-nvim # Fuzzy Finder vim-nix # Nix Helpers # ------------------ # --- Theme / UI --- # ------------------ nord-nvim # Theme lualine-nvim # Bottom Line noice-nvim # UI Tweaks nvim-web-devicons # Dev Icons # ------------------ # --- Treesitter --- # ------------------ ( nvim-treesitter.withPlugins ( # Exclude Outdated Packages (Causes Issues) plugins: with pkgs; subtractLists [ tree-sitter-grammars.tree-sitter-bash tree-sitter-grammars.tree-sitter-kotlin ] tree-sitter.allGrammars ) ) ]; extraPackages = with pkgs; [ # Telescope Dependencies ripgrep fd # LSP Dependencies nodePackages.pyright nodePackages.typescript nodePackages.typescript-language-server nodePackages.vscode-html-languageserver-bin # Parser python310Packages.sqlparse ]; extraConfig = ":luafile ~/.config/nvim/lua/init.lua"; }; xdg.configFile = { # Copy Configuration nvim = { source = ./config; recursive = true; }; # Generate Nix Vars "nvim/lua/nix-vars.lua".text = '' local nix_vars = { htmlserver = "${pkgs.nodePackages.vscode-html-languageserver-bin}/bin/html-languageserver", tsserver = "${pkgs.nodePackages.typescript-language-server}/bin/typescript-language-server", tslib = "${pkgs.nodePackages.typescript}/lib/node_modules/typescript/lib/", } return nix_vars ''; }; }