From 6cc2bd74a9b26d59868d5307b9aa703bae541627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Mon, 2 Dec 2024 16:42:26 +0100 Subject: [PATCH] Disable snippetSupport for rustaceanvim until nvim-cmp gets fixed --- symlinks/config/nvim/lua/esensar/lsp/completion.lua | 4 ++-- symlinks/config/nvim/lua/esensar/lsp/servers.lua | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/symlinks/config/nvim/lua/esensar/lsp/completion.lua b/symlinks/config/nvim/lua/esensar/lsp/completion.lua index 9d9881a..dfdc3f0 100644 --- a/symlinks/config/nvim/lua/esensar/lsp/completion.lua +++ b/symlinks/config/nvim/lua/esensar/lsp/completion.lua @@ -21,14 +21,14 @@ cmp.setup({ [""] = cmp.mapping.confirm({ select = true }), [""] = function(fallback) if cmp.visible() then - cmp.select_next_item({ behavior = cmp.SelectBehavior.Select }) + cmp.select_next_item() else fallback() end end, [""] = function(fallback) if cmp.visible() then - cmp.select_prev_item({ behavior = cmp.SelectBehavior.Select }) + cmp.select_prev_item() else fallback() end diff --git a/symlinks/config/nvim/lua/esensar/lsp/servers.lua b/symlinks/config/nvim/lua/esensar/lsp/servers.lua index 394984f..ddee006 100644 --- a/symlinks/config/nvim/lua/esensar/lsp/servers.lua +++ b/symlinks/config/nvim/lua/esensar/lsp/servers.lua @@ -88,6 +88,16 @@ require("flutter-tools").setup({ -- Rust tools vim.g.rustaceanvim = { server = vim.tbl_extend("force", common_config, { + capabilities = vim.tbl_extend("force", common_config.capabilities, { + -- TODO wait for nvim-cmp fix + textDocument = { + completion = { + completionItem = { + snippetSupport = false, + }, + }, + }, + }), on_attach = function(client, bufnr) common_config.on_attach(client, bufnr) end,