diff --git a/lua/plugins/neo-tree.lua b/lua/plugins/neo-tree.lua index 5b4951f..e19075c 100644 --- a/lua/plugins/neo-tree.lua +++ b/lua/plugins/neo-tree.lua @@ -19,11 +19,24 @@ return { dependencies = { "nvim-lua/plenary.nvim", "nvim-tree/nvim-web-devicons", - "MunifTanjim/nui.nvim" + "MunifTanjim/nui.nvim", + -- + -- List language server diagnostics + -- + -- Source: https://github.com/mrbjarksen/neo-tree-diagnostics.nvim + -- .............................................. + -- + 'mrbjarksen/neo-tree-diagnostics.nvim' }, cmd = "Neotree", opts = { popup_border_style = ui.border, + sources = { + "filesystem", + "document_symbols", + "git_status", + "diagnostics" + }, source_selector = { winbar = true, statusline = false, @@ -33,15 +46,24 @@ return { display_name = " 󰉓 Files " }, { - source = "buffers", - display_name = " 󰈚 Buffers " + source = "document_symbols", + display_name = "  Symbols " }, { - source = "document_symbols", - display_name = " 󰊢 Git " - }, + source = "diagnostics", + display_name = "  Diagnostics " + } }, }, + diagnostics = { + follow_current_file = { -- May also be set to `true` or `false` + enabled = true, -- This will find and focus the file in the active buffer every time + always_focus_file = false, -- Focus the followed file, even when focus is currently on a diagnostic item belonging to that file + expand_followed = true, -- Ensure the node of the followed file is expanded + leave_dirs_open = true, -- `false` closes auto expanded dirs, such as with `:Neotree reveal` + leave_files_open = true, -- `false` closes auto expanded files, such as with `:Neotree reveal` + } + }, filesystem = { bind_to_cwd = false, follow_current_file = { enabled = true },