From 53bab088cfb1ef4e60a08bbd9941d4d9fc5bcc5a Mon Sep 17 00:00:00 2001 From: srdusr Date: Mon, 13 Feb 2023 16:28:29 +0200 Subject: │Moved autocommand of "Toggle DiagnosticsOpenFloat" to from util.vim to lsp.lua MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/plugins/lsp.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 4bcfeea..c551b48 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -147,6 +147,14 @@ function _G.toggle_diagnostics() end end +-- Open float for diagnostics automatically +vim.cmd([[ +augroup OpenFloat + autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focusable = false,}) + +augroup END +]]) + -- Suppress error messages from lang servers vim.lsp.set_log_level("debug") local capabilities = vim.lsp.protocol.make_client_capabilities() -- cgit v1.2.3