pkgs: { opts = { number = true; relativenumber = true; shiftwidth = 2; tabstop = 2; scrolloff = 999; textwidth = 83; linebreak = true; completeopt = ["menuone" "noselect"]; wildmenu = true; wildmode = builtins.concatStringsSep "," [ "longest" "list" "full" ]; }; keymaps = [ { mode = ["n" "i" "t"]; key = ""; action = ''h''; } { mode = ["n" "i" "t"]; key = ""; action = ''j''; } { mode = ["n" "i" "t"]; key = ""; action = ''k''; } { mode = ["n" "i" "t"]; key = ""; action = ''l''; } { key = ""; action = ":Neotree float reveal_force_cwd"; } { key = ""; action = ":Neotree float buffers"; } { key = ""; action = ":Neotree float git_status"; } { mode = ["n" "i"]; key = ""; action = "noh"; } { mode = ["i"]; key = ""; action.__raw = '' function() local cmp = require('cmp'); local luasnip = require('luasnip'); if cmp.visible() then cmp.select_next_item() end end ''; } ]; extraPlugins = with pkgs.vimPlugins; [ vim-airline-themes ]; plugins = { airline = { enable = true; settings = { powerline_fonts = 1; }; }; cmp = { enable = true; autoEnableSources = true; settings = { preselect = "cmp.PreselectMode.None"; snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end"; mappings = { "" = "cmp.mapping.complete()"; "" = "cmp.mapping.scroll_docs(-4)"; "" = "cmp.mapping.close()"; "" = "cmp.mapping.scroll_docs(4)"; "" = "cmp.mapping.confirm({ select = true })"; "" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; "" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; }; sources = [ {name = "luasnip";} {name = "nvim_lsp";} {name = "path";} { name = "buffer"; option.get_bufnrs.__raw = "vim.api.nvim_list_bufs"; } {name = "git";} {name = "conventionalcommits";} ]; }; }; cmp-path.enable = true; coq-nvim = { enable = false; settings = { auto_start = "shut-up"; }; installArtifacts = true; }; dashboard = { enable = true; }; lsp = { enable = true; servers = { nil_ls.enable = true; rust_analyzer = { enable = true; installCargo = true; installRustc = true; }; ltex.enable = true; java_language_server.enable = true; }; keymaps = { lspBuf = { "" = "hover"; }; }; }; lspkind = { enable = true; cmp = { enable = true; menu = { nvim_lsp = "[LSP]"; nvim_lua = "[api]"; path = "[path]"; luasnip = "[snip]"; buffer = "[buffer]"; neorg = "[neorg]"; }; }; }; lsp-format = { enable = true; }; luasnip.enable = true; quickmath.enable = true; treesitter = { enable = true; settings = { indent.enable = true; }; }; treesitter-context = { enable = true; }; treesitter-refactor = { enable = true; }; mini = { enable = true; }; markdown-preview = { enable = true; }; nix = { enable = true; }; neo-tree = { enable = true; autoCleanAfterSessionRestore = true; closeIfLastWindow = true; }; nvim-autopairs = { enable = true; }; vim-css-color = { enable = true; }; vimtex = { enable = true; }; web-devicons = { enable = true; }; }; }