{ config, lib, pkgs, # vars, ... }: let vars = import ../../../../vars.nix; colors = config.colorScheme.colors; in { programs.neovim = { enable = true; viAlias = true; vimAlias = true; vimdiffAlias = true; extraPackages = with pkgs; [ # LSP lua-language-server lua rnix-lsp # nix # Formatters stylua # lua black # pyton alejandra # nix clang-tools_16 # c/c++ # Linters ruff # python nodePackages.jsonlint # json nodePackages.eslint_d # javascript # Tools xclip wl-clipboard fzf gcc ]; plugins = with pkgs.vimPlugins; [ { plugin = neodev-nvim; type = "lua"; config = '' require("neodev").setup({ override = function(root_dir, library) if root_dir:find("/home/${vars.user + "/" + vars.dir_name}", 1, true) == 1 then library.enabled = true library.plugins = true end end, }) ''; } { plugin = nvim-lspconfig; config = builtins.readFile ./plugin/lsp.lua; type = "lua"; } { plugin = comment-nvim; config = "require('Comment').setup()"; type = "lua"; } nvim-cmp { plugin = nvim-cmp; config = builtins.readFile ./plugin/cmp.lua; type = "lua"; } { plugin = telescope-nvim; config = builtins.readFile ./plugin/telescope.lua; type = "lua"; } telescope-fzf-native-nvim telescope-ui-select-nvim cmp_luasnip cmp-nvim-lsp luasnip friendly-snippets { plugin = nvim-treesitter.withAllGrammars; config = builtins.readFile ./plugin/treesitter.lua; type = "lua"; } vim-nix { plugin = nvim-base16; config = '' require('base16-colorscheme').setup({ base00 = '#${colors.base00}', base01 = '#${colors.base01}', base02 = '#${colors.base02}', base03 = '#${colors.base03}', base04 = '#${colors.base04}', base05 = '#${colors.base05}', base06 = '#${colors.base06}', base07 = '#${colors.base07}', base08 = '#${colors.base08}', base09 = '#${colors.base09}', base0A = '#${colors.base0A}', base0B = '#${colors.base0B}', base0C = '#${colors.base0C}', base0D = '#${colors.base0D}', base0E = '#${colors.base0E}', base0F = '#${colors.base0F}', })''; type = "lua"; } { plugin = lualine-nvim; config = builtins.readFile ./plugin/lualine.lua; type = "lua"; } nvim-web-devicons plenary-nvim nui-nvim { plugin = neo-tree-nvim; type = "lua"; } { plugin = gitsigns-nvim; config = "require('gitsigns').setup()"; type = "lua"; } diffview-nvim lazygit-nvim { plugin = todo-comments-nvim; config = builtins.readFile ./plugin/todo.lua; type = "lua"; } { plugin = alpha-nvim; config = builtins.readFile ./plugin/alpha.lua; type = "lua"; } { plugin = none-ls-nvim; config = builtins.readFile ./plugin/none-ls.lua; type = "lua"; } ]; }; }