From b51afe268a6015ce31cf9162545411dd9fce93ad Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 27 Oct 2024 16:21:02 +0100 Subject: checkpoint --- lua/config/lsp.lua | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'lua/config/lsp.lua') diff --git a/lua/config/lsp.lua b/lua/config/lsp.lua index 0869f41..70c88d8 100644 --- a/lua/config/lsp.lua +++ b/lua/config/lsp.lua @@ -102,6 +102,9 @@ cmp.setup({ require("luasnip").lsp_expand(args.body) end, }, + completion = { + autocomplete = false, + }, window = { completion = cmp.config.window.bordered(), documentation = cmp.config.window.bordered(), @@ -160,3 +163,24 @@ vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.s vim.diagnostic.config({ float = { border = _border }, }) + +local autocmd = vim.api.nvim_create_autocmd +autocmd("LspAttach", { + callback = function(args) + local client = vim.lsp.get_client_by_id(args.data.client_id) + if client == nil then + return + end + if vim.tbl_contains({ "null-ls" }, client.name) then -- blacklist lsp + return + end + require("lsp_signature").on_attach({ + hint_enable = false, + doc_lines = 0, + bind = true, + handler_opts = { + border = "rounded", + }, + }, args.bufnr) + end, +}) -- cgit v1.2.3