diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua index 252c1e1..a6142e9 100644 --- a/after/plugin/lsp.lua +++ b/after/plugin/lsp.lua @@ -12,11 +12,6 @@ sign_define({ name = "DiagnosticSignWarn", text = "W" }) sign_define({ name = "DiagnosticSignHint", text = "H" }) sign_define({ name = "DiagnosticSignInfo", text = "I" }) --- enable diagnostics virtual text -vim.diagnostic.config({ - virtual_text = true, -}) - -- diagnostic's aren't lsp dependent vim.keymap.set("n", "vd", function() vim.diagnostic.open_float() @@ -28,10 +23,14 @@ vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end) --- lsp related bindings +-- lsp capabilites enabler vim.api.nvim_create_autocmd("LspAttach", { desc = "LSP Actions", callback = function(event) + -- Enable omnifunc + vim.bo[event.buf].omnifunc = "v:lua.MiniCompletion.completefunc_lsp" + + -- Buffer local mappings local opts = { buffer = event.buf } vim.keymap.set("n", "K", function() vim.lsp.buf.hover() @@ -77,6 +76,7 @@ require("lspconfig").hls.setup({}) require("mini.completion").setup({ lsp_completion = { source_func = "omnifunc", + auto_setup = false, }, fallback_action = "", })