~havi/nvim.d

c5f3d92456272a3334c74cb592f602241750cbc6 — havi 3 months ago 7a07607
feat(plugins/core/lsp/nvim-lspconfig): add `textDocument/publishDiagnostics` handler
1 files changed, 8 insertions(+), 0 deletions(-)

M lua/plugins/core/lsp/nvim-lspconfig.lua
M lua/plugins/core/lsp/nvim-lspconfig.lua => lua/plugins/core/lsp/nvim-lspconfig.lua +8 -0
@@ 24,6 24,14 @@ function M.config()
   vim.fn.sign_define("DiagnosticSignWarn", { texthl = "DiagnosticWarn", text = " " })
   vim.fn.sign_define("DiagnosticSignInfo", { texthl = "DiagnosticInfo", text = " " })
   vim.fn.sign_define("DiagnosticSignHint", { texthl = "DiagnosticHint", text = " " })
   vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
      signs = true,
      underline = false,
      virtual_text = true,
      show_diagnostic_autocmds = { "InsertLeave", "TextChanged" }, -- NEW OPTION
      diagnostic_delay = 500,  -- NEW OPTION
   })

   -- vim.e.config({ virtual_text = false })
   -- -- enable border for hover
   -- vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {