summaryrefslogtreecommitdiffstats
path: root/after
diff options
context:
space:
mode:
authorSquibid <me@zacharyscheiman.com>2023-05-10 17:16:39 -0400
committerSquibid <me@zacharyscheiman.com>2023-05-10 17:16:39 -0400
commitff612e417cef5f56b5c67edcdff29e00ac9d8c9c (patch)
treec3a57c04cbb187e603ea31917ff46974902e295b /after
parent111511700dea55fb54839ddf5ff5459798d81c56 (diff)
downloadnvim-ff612e417cef5f56b5c67edcdff29e00ac9d8c9c.tar.gz
nvim-ff612e417cef5f56b5c67edcdff29e00ac9d8c9c.tar.bz2
nvim-ff612e417cef5f56b5c67edcdff29e00ac9d8c9c.zip
set lsp signs
Diffstat (limited to '')
-rw-r--r--after/plugin/lsp.lua13
1 files changed, 8 insertions, 5 deletions
diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua
index 50b6201..9384775 100644
--- a/after/plugin/lsp.lua
+++ b/after/plugin/lsp.lua
@@ -26,6 +26,14 @@ local function lsp_keymaps(bufnr)
map('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<cr>')
end
+local function set_lsp_sign(name, text)
+ vim.fn.sign_define(name, {text = text, texthl = name})
+end
+set_lsp_sign("DiagnosticSignError", "x")
+set_lsp_sign("DiagnosticSignWarn" , "!")
+set_lsp_sign("DiagnosticSignInfo" , "i")
+set_lsp_sign("DiagnosticSignHint" , "h")
+
local function lsp_settings()
local sign = function(opts)
vim.fn.sign_define(opts.name, {
@@ -35,11 +43,6 @@ local function lsp_settings()
})
end
- sign({name = 'DiagnosticSignError', text = 'x'})
- sign({name = 'DiagnosticSignWarn', text = '!'})
- sign({name = 'DiagnosticSignHint', text = 'h'})
- sign({name = 'DiagnosticSignInfo', text = 'i'})
-
vim.diagnostic.config({
virtual_text = false,
signs = true,