Move back diag to line endings
This commit is contained in:
@@ -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 = {},
|
||||
|
||||
Reference in New Issue
Block a user