{ programs.nixvim.plugins = { ## Misc. LSP related plugins web-devicons.enable = true; bufferline.enable = true; ## Language syntax processing lsp-format.enable = true; lsp = { enable = true; servers = { html.enable = true; # HTML cssls.enable = true; # CSS marksman.enable = true; # Markdown bashls.enable = true; # Bash rls.enable = true; # Rust #ccls.enable = true; # C/++ nixd = { enable = true; # Nix extraOptions = { expr = "import {}"; }; # uhhh }; }; keymaps.lspBuf = { "gd" = "definition"; "gD" = "references"; "gt" = "type_definition"; "gi" = "implementation"; "K" = "hover"; }; }; none-ls = { enable = true; sources = { diagnostics = { golangci_lint.enable = true; statix.enable = true; }; formatting = { tidy.enable = true; markdownlint.enable = true; shfmt.enable = true; shellharden.enable = true; nixfmt.enable = true; }; }; }; ## Completion luasnip.enable = true; cmp-buffer = { enable = true; }; cmp-emoji = { enable = true; }; cmp-nvim-lsp = { enable = true; }; cmp-path = { enable = true; }; cmp_luasnip = { enable = true; }; cmp = { enable = true; settings = { snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end"; sources = [ { name = "nvim_lsp"; } { name = "luasnip"; } { name = "buffer"; option.get_bufnrs.__raw = "vim.api.nvim_list_bufs"; } { name = "nvim_lua"; } { name = "mkdnflow"; } { name = "path"; } ]; formatting = { fields = [ "abbr" "kind" "menu" ]; format = # lua '' function(_, item) local icons = { Namespace = "󰌗", Text = "󰉿", Method = "󰆧", Function = "󰆧", Constructor = "", Field = "󰜢", Variable = "󰀫", Class = "󰠱", Interface = "", Module = "", Property = "󰜢", Unit = "󰑭", Value = "󰎠", Enum = "", Keyword = "󰌋", Snippet = "", Color = "󰏘", File = "󰈚", Reference = "󰈇", Folder = "󰉋", EnumMember = "", Constant = "󰏿", Struct = "󰙅", Event = "", Operator = "󰆕", TypeParameter = "󰊄", Table = "", Object = "󰅩", Tag = "", Array = "[]", Boolean = "", Number = "", Null = "󰟢", String = "󰉿", Calendar = "", Watch = "󰥔", Package = "", Copilot = "", Codeium = "", TabNine = "", } local icon = icons[item.kind] or "" item.kind = string.format("%s %s", icon, item.kind or "") return item end ''; }; window = { completion = { winhighlight = "FloatBorder:CmpBorder,Normal:CmpPmenu,Search:PmenuSel"; scrollbar = false; sidePadding = 0; border = [ "╭" "─" "╮" "│" "╯" "─" "╰" "│" ]; }; documentation = { border = [ "╭" "─" "╮" "│" "╯" "─" "╰" "│" ]; winhighlight = "FloatBorder:CmpBorder,Normal:CmpPmenu,Search:PmenuSel"; }; }; mapping = { "" = "cmp.mapping.select_next_item()"; "" = "cmp.mapping.select_prev_item()"; "" = "cmp.mapping.select_next_item()"; "" = "cmp.mapping.select_prev_item()"; "" = "cmp.mapping.select_next_item()"; "" = "cmp.mapping.select_prev_item()"; "" = "cmp.mapping.scroll_docs(-4)"; "" = "cmp.mapping.scroll_docs(4)"; "" = "cmp.mapping.complete()"; "" = "cmp.mapping.close()"; "" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true })"; }; }; }; }; }