Show diagnostics in status line and file tree

This commit is contained in:
2022-02-01 20:09:23 +03:00
parent 4173334340
commit cea47c0f76
3 changed files with 14 additions and 5 deletions

View File

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

View File

@@ -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,
})

View File

@@ -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 = {},
},
})