Move back diag to line endings

This commit is contained in:
2025-05-26 14:24:49 +02:00
parent 7d7b8135bc
commit f6a22b72d3
2 changed files with 30 additions and 27 deletions

View File

@@ -407,6 +407,8 @@ require('lazy').setup({
-- Allows extra capabilities provided by blink.cmp
'saghen/blink.cmp',
-- Roslyn
{ 'seblyng/roslyn.nvim', ft = 'cs', opts = {} },
},
config = function()
vim.api.nvim_create_autocmd('LspAttach', {
@@ -522,20 +524,20 @@ require('lazy').setup({
[vim.diagnostic.severity.HINT] = '󰌶 ',
},
} or {},
-- virtual_text = {
-- source = 'if_many',
-- spacing = 2,
-- format = function(diagnostic)
-- local diagnostic_message = {
-- [vim.diagnostic.severity.ERROR] = diagnostic.message,
-- [vim.diagnostic.severity.WARN] = diagnostic.message,
-- [vim.diagnostic.severity.INFO] = diagnostic.message,
-- [vim.diagnostic.severity.HINT] = diagnostic.message,
-- }
-- return diagnostic_message[diagnostic.severity]
-- end,
-- },
virtual_lines = true,
virtual_text = {
source = 'if_many',
spacing = 2,
format = function(diagnostic)
local diagnostic_message = {
[vim.diagnostic.severity.ERROR] = diagnostic.message,
[vim.diagnostic.severity.WARN] = diagnostic.message,
[vim.diagnostic.severity.INFO] = diagnostic.message,
[vim.diagnostic.severity.HINT] = diagnostic.message,
}
return diagnostic_message[diagnostic.severity]
end,
},
-- virtual_lines = true,
}
local servers = {
@@ -564,19 +566,19 @@ require('lazy').setup({
}, -- hybrid mode is default
eslint = {
flags = { debounce_text_changes = 500 },
on_attach = function(client, bufnr)
client.server_capabilities.documentFormattingProvider = true
if client.server_capabilities.documentFormattingProvider then
local au_lsp = vim.api.nvim_create_augroup('eslint_lsp', { clear = true })
vim.api.nvim_create_autocmd('BufWritePre', {
pattern = '*',
callback = function()
vim.lsp.buf.format { async = true }
end,
group = au_lsp,
})
end
end,
-- on_attach = function(client, bufnr)
-- client.server_capabilities.documentFormattingProvider = true
-- if client.server_capabilities.documentFormattingProvider then
-- local au_lsp = vim.api.nvim_create_augroup('eslint_lsp', { clear = true })
-- vim.api.nvim_create_autocmd('BufWritePre', {
-- pattern = '*',
-- callback = function()
-- vim.lsp.buf.format { async = true }
-- end,
-- group = au_lsp,
-- })
-- end
-- end,
},
html = {},
cssls = {},