diff --git a/nvim/lua/lspsetup.lua b/nvim/lua/lspsetup.lua index 6626cd0..32ffb1b 100644 --- a/nvim/lua/lspsetup.lua +++ b/nvim/lua/lspsetup.lua @@ -3,7 +3,6 @@ local inlay_hints_handler = require("inlay_hints_handler") local format_handler = require("format_handler") vim.lsp.config("*", { - capabilities = require("blink.cmp").get_lsp_capabilities(), root_markers = { ".git" }, }) @@ -31,6 +30,13 @@ vim.api.nvim_create_autocmd("LspAttach", { }) 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({ { "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 } }, diff --git a/nvim/lua/vim_opt.lua b/nvim/lua/vim_opt.lua index b434698..7465fd9 100644 --- a/nvim/lua/vim_opt.lua +++ b/nvim/lua/vim_opt.lua @@ -71,4 +71,8 @@ opt.list = false -- Sessions 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