Disable snippetSupport for rustaceanvim until nvim-cmp gets fixed

main
Ensar Sarajčić 2024-12-02 16:42:26 +01:00
parent 8152c1bdbc
commit 6cc2bd74a9
2 changed files with 12 additions and 2 deletions

View File

@ -21,14 +21,14 @@ cmp.setup({
["<C-y>"] = cmp.mapping.confirm({ select = true }), ["<C-y>"] = cmp.mapping.confirm({ select = true }),
["<C-n>"] = function(fallback) ["<C-n>"] = function(fallback)
if cmp.visible() then if cmp.visible() then
cmp.select_next_item({ behavior = cmp.SelectBehavior.Select }) cmp.select_next_item()
else else
fallback() fallback()
end end
end, end,
["<C-p>"] = function(fallback) ["<C-p>"] = function(fallback)
if cmp.visible() then if cmp.visible() then
cmp.select_prev_item({ behavior = cmp.SelectBehavior.Select }) cmp.select_prev_item()
else else
fallback() fallback()
end end

View File

@ -88,6 +88,16 @@ require("flutter-tools").setup({
-- Rust tools -- Rust tools
vim.g.rustaceanvim = { vim.g.rustaceanvim = {
server = vim.tbl_extend("force", common_config, { 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) on_attach = function(client, bufnr)
common_config.on_attach(client, bufnr) common_config.on_attach(client, bufnr)
end, end,