Remove blink capabilities from global lsp config, not needed for 0.11+.

Additionally, add comments about built in completion.
This commit is contained in:
Martin Lasson 2025-04-10 11:19:55 +02:00
parent ae1489527c
commit c7fa377980
2 changed files with 11 additions and 1 deletions

View file

@ -3,7 +3,6 @@ local inlay_hints_handler = require("inlay_hints_handler")
local format_handler = require("format_handler") local format_handler = require("format_handler")
vim.lsp.config("*", { vim.lsp.config("*", {
capabilities = require("blink.cmp").get_lsp_capabilities(),
root_markers = { ".git" }, root_markers = { ".git" },
}) })
@ -31,6 +30,13 @@ vim.api.nvim_create_autocmd("LspAttach", {
}) })
end end
-- Built-in LSP completion.
-- Could switch to this if they just appeared automatically when typing, and didn't
-- only rely on showing when the servers completionCharacters are typed.
-- if client:supports_method("textDocument/completion") then
-- vim.lsp.completion.enable(true, client.id, bufnr, { autotrigger = true })
-- end
utils.set_keymap_list({ utils.set_keymap_list({
{ "gd", function() vim.lsp.buf.definition({ reuse_win = true, }) end, { noremap = true, buffer = bufnr } }, { "gd", function() vim.lsp.buf.definition({ reuse_win = true, }) end, { noremap = true, buffer = bufnr } },
{ "gD", function() vim.lsp.buf.declaration({ reuse_win = true, }) end, { noremap = true, buffer = bufnr } }, { "gD", function() vim.lsp.buf.declaration({ reuse_win = true, }) end, { noremap = true, buffer = bufnr } },

View file

@ -71,4 +71,8 @@ opt.list = false
-- Sessions -- Sessions
opt.sessionoptions = { "buffers", "curdir", "winsize", "winpos", "skiprtp" } opt.sessionoptions = { "buffers", "curdir", "winsize", "winpos", "skiprtp" }
-- Builtin LSP completion tweaks
-- See comment in lspsetup autocmd for LspAttach
-- opt.completeopt = "menu,menuone,noselect,fuzzy"
return opt return opt