From 7652493468b7af59dc9940e06f6ba18c671742f9 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Fri, 19 Apr 2024 12:12:36 -0700 Subject: [PATCH] add some options to lsp and lint --- lua/plugins/lint.lua | 13 ++----------- lua/plugins/lsp.lua | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/lua/plugins/lint.lua b/lua/plugins/lint.lua index a2ed1fe..3afcb85 100644 --- a/lua/plugins/lint.lua +++ b/lua/plugins/lint.lua @@ -1,14 +1,5 @@ -- defines linters and their configurations --- return { --- { --- "mfussenegger/nvim-lint", --- optional = true, --- opts = { --- linters_by_ft = { --- markdown = { "markdownlint" }, --- }, --- }, --- }, --- } return {} +-- } +-- return {} diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 5f2ee79..a9adf94 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -12,6 +12,27 @@ return { -- filetypes = {} }, }, + diagnostics = { + underline = true, + update_in_insert = false, + virtual_text = { + spacing = 4, + source = "if_many", + prefix = "●", + -- this will set set the prefix to a function that returns the diagnostics icon based on the severity + -- this only works on a recent 0.10.0 build. Will be set to "●" when not supported + -- prefix = "icons", + }, + severity_sort = true, + signs = { + text = { + [vim.diagnostic.severity.ERROR] = LazyVim.config.icons.diagnostics.Error, + [vim.diagnostic.severity.WARN] = LazyVim.config.icons.diagnostics.Warn, + [vim.diagnostic.severity.HINT] = LazyVim.config.icons.diagnostics.Hint, + [vim.diagnostic.severity.INFO] = LazyVim.config.icons.diagnostics.Info, + }, + }, + }, setup = { tailwindcss = function(_, opts) local tw = require("lspconfig.server_configurations.tailwindcss")