aboutsummaryrefslogtreecommitdiffstats
path: root/lua/config/diagnostic.lua
diff options
context:
space:
mode:
authorElvis Claros Castro <elvis@claros.ar>2024-10-03 11:41:10 -0300
committerElvis Claros Castro <elvis@claros.ar>2024-10-03 11:41:10 -0300
commitf032fb9e2fadaaec6f71aaf45ed1d94128ea45cd (patch)
tree17bc2e9fe0a3614285b59c75ae801021d31e76df /lua/config/diagnostic.lua
parentfa3e94e60b9edc7c3620f43e207b915eae84bab0 (diff)
downloadnvim-conf-f032fb9e2fadaaec6f71aaf45ed1d94128ea45cd.tar.gz
nvim-conf-f032fb9e2fadaaec6f71aaf45ed1d94128ea45cd.zip
feat: add rust tools
Diffstat (limited to 'lua/config/diagnostic.lua')
-rw-r--r--lua/config/diagnostic.lua58
1 files changed, 40 insertions, 18 deletions
diff --git a/lua/config/diagnostic.lua b/lua/config/diagnostic.lua
index 84d57b5..011d83a 100644
--- a/lua/config/diagnostic.lua
+++ b/lua/config/diagnostic.lua
@@ -1,28 +1,50 @@
-
vim.diagnostic.config {
virtual_text = false,
signs = {
text = {
[vim.diagnostic.severity.ERROR] = '',
[vim.diagnostic.severity.WARN] = '',
- [vim.diagnostic.severity.INFO] = '',
- [vim.diagnostic.severity.HINT] = '',
- },
- linehl = {
- [vim.diagnostic.severity.ERROR] = 'ErrorMsg',
- },
- numhl = {
- [vim.diagnostic.severity.WARN] = 'WarningMsg',
+ [vim.diagnostic.severity.INFO] = '',
+ [vim.diagnostic.severity.HINT] = ''
},
+ -- linehl = {
+ -- [vim.diagnostic.severity.ERROR] = 'ErrorMsg',
+ -- },
+ -- numhl = {
+ -- [vim.diagnostic.severity.WARN] = 'WarningMsg',
+ -- },
+ },
+ update_in_insert = true,
+ underline = true,
+ severity_sort = true,
+ float = {
+ -- focusable = true,
+ -- style = "minimal",
+ border = "rounded",
+ source = "if_many",
+ -- header = "",
+ -- prefix = "",
},
}
--- vim.diagnostic.config {
--- virtual_text = false,
--- }
---
--- local signs = { Error = "", Warn = "", Hint = "", Info = "" }
--- for type, icon in pairs(signs) do
--- local hl = "DiagnosticSign" .. type
--- vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
--- end
+-- vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
+-- border = "rounded",
+-- -- width = 100,
+-- -- height = 10,
+-- position = "center",
+-- header = "",
+-- prefix = "",
+-- source = "always",
+-- style = "minimal",
+-- focusable = true,
+-- })
+
+-- vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {
+-- border = "rounded",
+-- })
+
+vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
+ -- delay update diagnostics
+ update_in_insert = false,
+})
+