add some options to lsp and lint

This commit is contained in:
Youwen Wu 2024-04-19 12:12:36 -07:00
parent c189edba7d
commit 7652493468
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
2 changed files with 23 additions and 11 deletions

View file

@ -1,14 +1,5 @@
-- defines linters and their configurations
-- return {
-- {
-- "mfussenegger/nvim-lint",
-- optional = true,
-- opts = {
-- linters_by_ft = {
-- markdown = { "markdownlint" },
-- },
-- },
-- },
-- }
return {}
-- }
-- return {}

View file

@ -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")