Sun, 19 Feb 2023 13:25:46 -0600
Use vim-illuminate
1014 | 1 | return { |
2 | "neovim/nvim-lspconfig", | |
3 | {"williamboman/mason.nvim", config = true}, | |
4 | {"j-hui/fidget.nvim", config = true}, | |
5 | ||
6 | { | |
7 | "williamboman/mason-lspconfig.nvim", | |
8 | config = function(plugin, opts) | |
1019 | 9 | require("mason-lspconfig").setup() |
1014 | 10 | require("mason-lspconfig").setup_handlers({ |
11 | function(server) | |
12 | require("lspconfig")[server].setup({}) | |
13 | end, | |
1022 | 14 | gopls = function () |
15 | require("lspconfig").gopls.setup({ | |
16 | settings = { gopls = { gofumpt = true } } | |
17 | }) | |
18 | end | |
1014 | 19 | }) |
20 | end, | |
21 | }, | |
22 | ||
23 | { | |
24 | "hrsh7th/nvim-cmp", | |
25 | event = "InsertEnter", | |
26 | dependencies = { | |
27 | "hrsh7th/cmp-buffer", | |
28 | "hrsh7th/cmp-path", | |
29 | "hrsh7th/cmp-nvim-lsp", | |
30 | "hrsh7th/cmp-nvim-lsp-signature-help", | |
1019 | 31 | "hrsh7th/cmp-nvim-lua", |
1014 | 32 | }, |
33 | opts = function() | |
34 | local cmp = require("cmp") | |
35 | return { | |
36 | completion = { | |
37 | completeopt = "menu,menuone,noinsert,noselect", | |
38 | }, | |
39 | mapping = cmp.mapping.preset.insert({ | |
40 | ["<C-b>"] = cmp.mapping.scroll_docs(-4), | |
41 | ["<C-f>"] = cmp.mapping.scroll_docs(4), | |
42 | ["<Tab>"] = cmp.mapping.select_next_item(), | |
43 | ["<S-Tab>"] = cmp.mapping.select_prev_item(), | |
44 | ["<C-g>"] = cmp.mapping.abort(), | |
1015 | 45 | -- FIXME: add extra space after in select case? |
1014 | 46 | ["<Space>"] = cmp.mapping.confirm({select = false}), |
47 | ["<Right>"] = cmp.mapping.confirm({select = true}), | |
48 | }), | |
1015 | 49 | sources = cmp.config.sources({ |
50 | { name = "nvim_lsp" }, | |
51 | { name = "nvim_lsp_signature_help" }, | |
1019 | 52 | { name = "nvim_lua" }, |
1015 | 53 | { name = "buffer" }, |
54 | { name = "path" }, | |
55 | }), | |
56 | experimental = { | |
57 | ghost_text = { | |
58 | hl_group = "LspCodeLens", | |
59 | }, | |
60 | }, | |
1014 | 61 | } |
62 | end, | |
63 | }, | |
64 | } |