aboutsummaryrefslogtreecommitdiff
path: root/nvim
diff options
context:
space:
mode:
Diffstat (limited to 'nvim')
-rw-r--r--nvim/lua/plugins/nvim-lspconfig.lua21
1 files changed, 16 insertions, 5 deletions
diff --git a/nvim/lua/plugins/nvim-lspconfig.lua b/nvim/lua/plugins/nvim-lspconfig.lua
index e464144..4c69816 100644
--- a/nvim/lua/plugins/nvim-lspconfig.lua
+++ b/nvim/lua/plugins/nvim-lspconfig.lua
@@ -3,11 +3,22 @@ local config = function()
local capabilities = require("cmp_nvim_lsp").default_capabilities()
-- setting custom signs
- 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 = {
+ text = {
+ [vim.diagnostic.severity.ERROR] = '',
+ [vim.diagnostic.severity.WARN] = '',
+ [vim.diagnostic.severity.HINT] = '',
+ [vim.diagnostic.severity.INFO] = '',
+ },
+ linehl = {
+ [vim.diagnostic.severity.ERROR] = 'ErrorMsg',
+ },
+ numhl = {
+ [vim.diagnostic.severity.WARN] = 'WarningMsg',
+ },
+ },
+ })
vim.api.nvim_create_autocmd('LspAttach', {
callback = function(ev)