Coder Social home page Coder Social logo

Comments (3)

mrbjarksen avatar mrbjarksen commented on June 5, 2024

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.

nyngwang avatar nyngwang commented on June 5, 2024

[...] 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.

mrbjarksen avatar mrbjarksen commented on June 5, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.