diff options
| author | pml68 <contact@pml68.dev> | 2025-01-01 01:19:19 +0100 |
|---|---|---|
| committer | pml68 <contact@pml68.dev> | 2025-01-01 01:19:19 +0100 |
| commit | d6b3f9aaf670eec24ba008e9113839b308666f01 (patch) | |
| tree | f73c6be95db320e51d75cfb5a7d8689801f6cff4 /lua/pml68/configs | |
| parent | fix: cmp deleting text, behaving weirdly (diff) | |
| download | nvim-d6b3f9aaf670eec24ba008e9113839b308666f01.tar.gz | |
fix: revert to rust.vim, fix weird cmp behavior
Diffstat (limited to '')
| -rw-r--r-- | lua/pml68/configs/cmp.lua | 7 | ||||
| -rw-r--r-- | lua/pml68/configs/lspconfig.lua | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/lua/pml68/configs/cmp.lua b/lua/pml68/configs/cmp.lua index 12383bb..c69110d 100644 --- a/lua/pml68/configs/cmp.lua +++ b/lua/pml68/configs/cmp.lua @@ -6,12 +6,11 @@ cmp.setup({ { name = 'path' }, { name = 'vimtex' }, { name = 'crates' }, - { name = 'emoji' }, }, { { name = 'buffer' }, }), snippet = { - expand = function (args) + expand = function(args) vim.snippet.expand(args.body) end, }, @@ -25,10 +24,6 @@ cmp.setup({ scrollbar = false, }, }, - preselect = 'item', - completion = { - completeopt = 'menu,menuone,noinsert' - }, mapping = cmp.mapping.preset.insert({ ['<CR>'] = cmp.mapping.confirm({ select = true }), ['<S-Tab>'] = cmp.mapping.select_prev_item({ behavior = 'select' }), diff --git a/lua/pml68/configs/lspconfig.lua b/lua/pml68/configs/lspconfig.lua index 55f2d6f..075deb7 100644 --- a/lua/pml68/configs/lspconfig.lua +++ b/lua/pml68/configs/lspconfig.lua @@ -1,4 +1,7 @@ -local capabilities = require("cmp_nvim_lsp").default_capabilities() +local capabilities = vim.tbl_deep_extend("force", + vim.lsp.protocol.make_client_capabilities(), + require('cmp_nvim_lsp').default_capabilities() +) local lspconfig = require("lspconfig") vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { @@ -45,7 +48,7 @@ for _, server in pairs(servers) do local require_ok, conf_opts = pcall(require, "pml68.configs.settings." .. server) if require_ok then - opts = vim.tbl_deep_extend("force", conf_opts, opts) + opts = vim.tbl_deep_extend("force", opts, conf_opts) end lspconfig[server].setup(opts) |
