mirror of
https://github.com/aminnairi/dotfiles.git
synced 2026-09-14 16:52:12 +02:00
added better sign in the sign columns for lsp diagnostics
This commit is contained in:
@@ -6,7 +6,6 @@ return {
|
||||
},
|
||||
init = function()
|
||||
local whichKey = require("which-key")
|
||||
local conform = require("conform")
|
||||
|
||||
-- Use LspAttach autocommand to only map the following keys
|
||||
-- after the language server attaches to the current buffer
|
||||
@@ -110,8 +109,6 @@ return {
|
||||
vim.lsp.buf.format({
|
||||
async = true,
|
||||
})
|
||||
|
||||
conform.format({ buffnr = ev.buff })
|
||||
end,
|
||||
"Format file",
|
||||
buffer = ev.buf,
|
||||
@@ -121,6 +118,13 @@ return {
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
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 = hl })
|
||||
end
|
||||
end,
|
||||
config = function()
|
||||
local lspconfig = require("lspconfig")
|
||||
@@ -154,14 +158,14 @@ return {
|
||||
|
||||
lspconfig.tsserver.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
lspconfig.volar.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
filetypes = {
|
||||
"vue"
|
||||
"vue",
|
||||
},
|
||||
})
|
||||
|
||||
@@ -190,43 +194,43 @@ return {
|
||||
lspconfig.prismals.setup({
|
||||
on_attach = on_attach,
|
||||
filetypes = {
|
||||
"prisma"
|
||||
"prisma",
|
||||
},
|
||||
capabilities = capabilities
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
lspconfig.yamlls.setup({
|
||||
capabilities = capabilities,
|
||||
filetypes = {
|
||||
"yaml"
|
||||
"yaml",
|
||||
},
|
||||
})
|
||||
|
||||
lspconfig.marksman.setup({
|
||||
capabilities = capabilities,
|
||||
filetypes = {
|
||||
"markdown"
|
||||
}
|
||||
"markdown",
|
||||
},
|
||||
})
|
||||
|
||||
lspconfig.eslint.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
lspconfig.dockerls.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
lspconfig.rust_analyzer.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
lspconfig.intelephense.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach
|
||||
on_attach = on_attach,
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user