summaryrefslogtreecommitdiff
path: root/lua/config/lsp.lua
diff options
context:
space:
mode:
authorbh <qn+git@excalibur.computer>2025-11-13 19:19:51 +0800
committerbh <qn+git@excalibur.computer>2025-11-13 19:19:51 +0800
commitcfaa4eb06d8353288aa19238c6519a29a9df5d75 (patch)
tree5fbb6c1e9280b4f97fba11180eaf67495a865cbd /lua/config/lsp.lua
parent1b9eb7cde7cf88b3afda6c6e11ae48f7d84eaca8 (diff)
Massive commit. Added surround and autopair. Also fixed treesitter further. Should be more polished now.
Diffstat (limited to 'lua/config/lsp.lua')
-rw-r--r--lua/config/lsp.lua42
1 files changed, 27 insertions, 15 deletions
diff --git a/lua/config/lsp.lua b/lua/config/lsp.lua
index 436d2e6..5d7aa3e 100644
--- a/lua/config/lsp.lua
+++ b/lua/config/lsp.lua
@@ -67,11 +67,33 @@ return function()
vim.lsp.enable(name)
-- Diagnostic Icons
- 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.diagnostic.config({
+ signs = {
+ active = true, -- enable signs
+ text = {
+ [vim.diagnostic.severity.ERROR] = "✖",
+ [vim.diagnostic.severity.WARN] = "",
+ [vim.diagnostic.severity.INFO] = "",
+ [vim.diagnostic.severity.HINT] = "", -- lightbulb for hint
+ },
+ },
+ -- virtual_text = {
+ -- prefix = "●GAY●",
+ -- },
+ underline = true,
+ severity_sort = true,
+ virtual_text = true, -- inline messages
+ signs = true, -- show signs in the gutter
+ underline = true, -- underline errors/warnings
+ update_in_insert = false,
+ -- severity_sort = true,
+ })
+
+ -- 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
-- Use Nerd Font symbols for diagnostics
-- vim.fn.sign_define("DiagnosticSignError", {text = "✖", texthl = "DiagnosticError"}) -- x-mark
@@ -80,14 +102,6 @@ return function()
-- vim.fn.sign_define("DiagnosticSignHint", {text = "", texthl = "DiagnosticHint"}) -- lightbulb
- vim.diagnostic.config({
- virtual_text = true, -- inline messages
- signs = true, -- show signs in the gutter
- underline = true, -- underline errors/warnings
- update_in_insert = false,
- severity_sort = true,
- })
-
lualine_x = {
{
"diagnostics",
@@ -97,8 +111,6 @@ return function()
}
}
-
-
end
end