-
-
Notifications
You must be signed in to change notification settings - Fork 637
Labels
Description
Can this functionality be implemented utilising API?
nvim-tree exposes extensive API (see :h nvim-tree-api
). Can it be used to achieve your goal? Is there a missing API that would make it possible?
Given stable status of nvim-tree it's preferred to add new API than new functionality.
Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
use({
'nvim-tree/nvim-tree.lua',
requires = 'nvim-tree/nvim-web-devicons',
config = function()
require('nvim-tree').setup({
diagnostics = {
enable = true,
-- This is the additional option I'm proposing
use_diagnostic_signs = true,
on_dirs = true,
},
})
end,
})
Describe alternatives you've considered
use({
'nvim-tree/nvim-tree.lua',
requires = 'nvim-tree/nvim-web-devicons',
config = function()
require('nvim-tree').setup({
diagnostics = {
enable = true,
icons = {
error = vim.fn.sign_getdefined('DiagnosticSignError')[1].text,
hint = vim.fn.sign_getdefined('DiagnosticSignHint')[1].text,
info = vim.fn.sign_getdefined('DiagnosticSignInfo')[1].text,
warning = vim.fn.sign_getdefined('DiagnosticSignWarn')[1].text,
},
},
})
end,
})
Additional context
I think this is probably the common scenario. Most folks want to share the diagnostic signs across plugins related to LSP. I'd be happy to open a PR for this if it is determined to be valuable.
lcheylus