chore: update lazy plugins

This commit is contained in:
Oliver Ladner 2025-05-19 10:18:04 +02:00
commit c06b3ad61d
2 changed files with 6 additions and 25 deletions

View file

@ -1,29 +1,10 @@
-- Native autocompletion
-- vim.api.nvim_create_autocmd("LspAttach", {
-- callback = function(ev)
-- local client = vim.lsp.get_client_by_id(ev.data.client_id)
-- if client:supports_method("textDocument/completion") then
-- vim.lsp.completion.enable(true, client.id, ev.buf, { autotrigger = true })
-- end
-- end,
-- })
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("my.lsp", {}),
callback = function(args)
local client = assert(vim.lsp.get_client_by_id(args.data.client_id))
if client:supports_method("textDocument/implementation") then
-- Create a keymap for vim.lsp.buf.implementation ...
end
-- Enable auto-completion. Note: Use CTRL-Y to select an item. |complete_CTRL-Y|
if client:supports_method("textDocument/completion") then
-- Optional: trigger autocompletion on EVERY keypress. May be slow!
-- local chars = {}
-- for i = 32, 126 do
-- table.insert(chars, string.char(i))
-- end
-- client.server_capabilities.completionProvider.triggerCharacters = chars
-- vim.lsp.completion.enable(true, client.id, args.buf, { autotrigger = true })
vim.lsp.completion.enable(true, client.id, args.buf, { autotrigger = false })
end
-- Auto-format ("lint") on save.
-- Usually not needed if server supports "textDocument/willSaveWaitUntil".