Show diagnostics in status line and file tree
This commit is contained in:
@@ -48,6 +48,11 @@ require("nvim-tree").setup({
|
||||
git = {
|
||||
ignore = false,
|
||||
},
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
show_on_dirs = true,
|
||||
icons = { hint = "", info = "", warning = "", error = "" },
|
||||
},
|
||||
})
|
||||
|
||||
nmap("<leader>b", ":NvimTreeToggle<CR>")
|
||||
|
||||
@@ -170,10 +170,9 @@ lsp_installer.on_server_ready(function(server)
|
||||
server:setup(opts)
|
||||
end)
|
||||
|
||||
-- Don't show diagnostics as virtual text
|
||||
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
|
||||
update_in_insert = true,
|
||||
virtual_text = false,
|
||||
virtual_text = true,
|
||||
signs = false,
|
||||
})
|
||||
|
||||
|
||||
@@ -11,6 +11,11 @@ local branch = {
|
||||
icons_enabled = true,
|
||||
icon = "",
|
||||
}
|
||||
local diagnostics = {
|
||||
"diagnostics",
|
||||
always_visible = true,
|
||||
sections = { "error", "warn" },
|
||||
}
|
||||
|
||||
-- Section "c"
|
||||
local filename = {
|
||||
@@ -47,9 +52,9 @@ lualine.setup({
|
||||
sections = {
|
||||
lualine_a = { mode },
|
||||
lualine_b = { branch },
|
||||
lualine_c = { filename, fileformat },
|
||||
lualine_x = { location },
|
||||
lualine_y = { encoding, filetype },
|
||||
lualine_c = { diagnostics, filename, fileformat },
|
||||
lualine_x = { location, encoding, filetype },
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user