Comments (3)
This is not a bug. The preview mode uses nvim_buf_add_highlight
, which :nohlsearch
does not affect. The highlight is only visible while the preview mode is active. You can disable the preview using revert_preview
(mapped to <Esc>
by default) or toggle_preview
(mapped to P
). Leaving the neo-tree buffer also disables the preview automatically. If you're using the preview with a floating window, this will close the window, but if you're using an existing split it will be reverted to the state it was in before the preview started.
The open
command (mapped to <CR>
by default) will jump to the diagnostic location and clear all highlights as a result. I recommend using this. There's no command I know of currently that will disable the preview mode but keep the preview window (if using an existing split) as it is. If this is what you're looking for, I would open an issue in neo-tree, since the preview is defined there.
from neo-tree-diagnostics.nvim.
[...] The preview mode uses nvim_buf_add_highlight, which :nohlsearch does not affect.
For me, this is not intuitive and can be reported to the source. (I will do it later)
[...] Leaving the neo-tree buffer also disables the preview automatically. [...]
It seems that this is not my case. I did change back to use open
as my previous issue (and you since you have suggested).
[...] There's no command I know of currently that will disable the preview mode but keep the preview window [...] If this is what you're looking for [...]
No. That isn't what I meant. My imagination of "follow" is that the targeted buffer gets changed when my cursor is moving through the diagnostic item list. (this can be thought of as the reverse of the relation between "targeted buffer" and "vertical cursorline" on the neo-tree drawer. i.e. We change the targeted buffer and the vertical cursorline follows it.)
from neo-tree-diagnostics.nvim.
For me, this is not intuitive and can be reported to the source. (I will do it later)
The problem is that nvim_buf_add_highlight
can apply highlights arbitrarily while hlsearch
only applies to text which has been searched (using /
or :s
, for example). It wouldn't make sense to clear all buffer highlights when clearing search highlights.
It seems that this is not my case. I did change back to use open as my previous issue (and you since you have suggested).
Interesting, it works on my end. What behavior are you seeing?
My imagination of "follow" is that the targeted buffer gets changed when my cursor is moving through the diagnostic item list.
The option follow_current_file
is named in accordance with neo-tree's base sources, where the option changes the focus in the source based on the file/buffer which is currently in use.
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
- 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
- Alternate renderer for diagnostics.. WIki? HOT 3
- 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.