Comments (3)
I've created a wiki page for this. This has given me a few ideas for new component options though, so I might revisit it later.
from neo-tree-diagnostics.nvim.
I have a second variation, this one also changes the file node style. I think these changes make the information easier to parse:
require("neo-tree").setup({
sources = {
"filesystem",
"buffers",
"git_status",
"diagnostics",
},
diagnostics = {
components = {
linenr = function(config, node)
local lnum = tostring(node.extra.diag_struct.lnum + 1)
local pad = string.rep(" ", 4 - #lnum)
return {
{
text = pad .. lnum,
highlight = "LineNr",
},
{
text = "▕ ",
highlight = "NeoTreeDimText",
}
}
end
},
renderers = {
file = {
{ "indent" },
{ "icon" },
{ "grouped_path" },
{ "name", highlight = "NeoTreeFileNameOpened" },
--{ "diagnostic_count", show_when_none = true },
{ "diagnostic_count", highlight = "NeoTreeDimText", severity = "Error", right_padding = 0 },
{ "diagnostic_count", highlight = "NeoTreeDimText", severity = "Warn", right_padding = 0 },
{ "diagnostic_count", highlight = "NeoTreeDimText", severity = "Info", right_padding = 0 },
{ "diagnostic_count", highlight = "NeoTreeDimText", severity = "Hint", right_padding = 0 },
{ "clipboard" },
},
diagnostic = {
{ "indent" },
{ "icon" },
{ "linenr" },
{ "name" },
--{ "source" },
--{ "code" },
},
},
},
})
from neo-tree-diagnostics.nvim.
Looks great, I might use this myself! A wiki page sounds good. I'll set one up for documenting the default components and to showcase custom renderers.
from neo-tree-diagnostics.nvim.
Related Issues (13)
- Status of "preview" code? HOT 1
- Improve rendering multi-line diagnostic messages HOT 2
- Enable overriding diagnostic symbols and highlights HOT 1
- Is it possible to jump to that line on `<CR>`? HOT 2
- The `follow_current_file = true` doesn't seem to work HOT 5
- The highlight of keyword from `'preview'` cannot be cleared with `:noh` HOT 3
- Error in event handler for event neo_tree_buffer_enter[diagnostics.neo_tree_buffer_enter]: .../lua/nui/tree/init.lua:254: Expected Lua number HOT 8
- `reveal` does not respect `follow_behavior` HOT 4
- Support for TODO comments HOT 1
- Error arised when move focus from neo-tree-diagnostics window to a normal window HOT 4
- Control auto-refresh with config option HOT 6
- Warning Invalid mapping for HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neo-tree-diagnostics.nvim.