diff options
| author | seth <[email protected]> | 2023-11-01 06:42:48 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-11-01 06:42:48 -0400 |
| commit | 09004f4517eba8f57d37897e34f6ba56ad3653f1 (patch) | |
| tree | 6ae19b13a2694fe852caa6c77665af24ea59fe9e /neovim.nix | |
| parent | ca59ebcf3dd17153b90a0ceca86af14db941ac3c (diff) | |
stop using neovim.nix
i had small, but annoying issues here and i don't care for lazy loading much tbh
Diffstat (limited to 'neovim.nix')
| -rw-r--r-- | neovim.nix | 148 |
1 files changed, 115 insertions, 33 deletions
@@ -1,40 +1,122 @@ -{ - perSystem = {pkgs, ...}: { - neovim = { - package = pkgs.neovim-unwrapped; - - paths = with pkgs; [ - # external tools - fd - git - ripgrep - just - - # lint - actionlint - codespell - deadnix - nodePackages.alex - shellcheck - statix - - # format - alejandra - beautysh - stylua +{self, ...}: { + perSystem = { + lib, + pkgs, + self', + ... + }: let + plugins = with pkgs.vimPlugins; + [ + # general + catppuccin-nvim + + # TODO: don't pin when deprecation notice + # is no longer in nixpkgs + (fidget-nvim.overrideAttrs (_: { + src = pkgs.fetchFromGitHub { + owner = "j-hui"; + repo = "fidget.nvim"; + rev = "41f327b53c7977d47aee56f05e0bdbb4b994c5eb"; + hash = "sha256-v9qARsW8Gozit4Z3+igiemjI467QgRhwM+crqwO9r6U="; + }; + })) + + flash-nvim + gitsigns-nvim + indent-blankline-nvim + lualine-nvim + neo-tree-nvim + nvim-web-devicons + mini-nvim + + # completion + nvim-cmp + cmp-nvim-lsp + cmp-buffer + cmp_luasnip + cmp-async-path + luasnip + + # ui + dressing-nvim + noice-nvim + nui-nvim + nvim-notify # lsp - nil - sumneko-lua-language-server - ]; + nvim-lspconfig + null-ls-nvim + + # utils + bufferline-nvim + plenary-nvim + telescope-nvim + trouble-nvim + which-key-nvim + + # treesitter + nvim-treesitter.withAllGrammars + nvim-ts-context-commentstring + + # main config + self'.packages.getchvim + ] + ++ lib.optional (pkgs ? vim-just) pkgs.vim-just; + + extraPrograms = with pkgs; [ + # external tools + fd + git + ripgrep + just + + # lint + actionlint + codespell + deadnix + nodePackages.alex + shellcheck + statix + + # format + alejandra + beautysh + stylua + + # lsp + nil + sumneko-lua-language-server + ]; + + customRC = '' + lua require("getchoo") + ''; + + config = pkgs.neovimUtils.makeNeovimConfig { + withPython3 = true; + withRuby = false; + inherit plugins; + inherit customRC; + }; + in { + packages = { + default = self'.packages.neovim; + + neovim = pkgs.wrapNeovimUnstable pkgs.neovim-unwrapped ( + config + // { + wrapperArgs = + (lib.escapeShellArgs config.wrapperArgs) + + " " + + ''--suffix PATH : "${lib.makeBinPath extraPrograms}"''; + } + ); - lazy = { - settings = { - performance.rtp.reset = true; - install.colorscheme = ["catppuccin"]; - }; + getchvim = pkgs.vimUtils.buildVimPlugin { + pname = "getchvim"; + version = builtins.substring 0 8 self.lastModifiedDate or "dirty"; - plugins = import ./plugins {inherit pkgs;}; + src = lib.cleanSource ./.; }; }; }; |
