nordtheme / vim

An arctic, north-bluish clean and elegant Vim theme.
https://www.nordtheme.com/ports/vim
MIT License
2.53k stars 273 forks source link

Support for LspReferenceRead (native LSP symbol highlight) #241

Open samhh opened 3 years ago

samhh commented 3 years ago

Nord doesn't appear to support LspReferenceRead (or its siblings, though I'm unclear when those are relevant).

At the moment I'm doing this to hack in highlight support.

jan-xyz commented 3 years ago

From the spec

The document highlight request is sent from the client to the server to resolve a document highlights for a given text document position. For programming languages this usually highlights all references to the symbol scoped to this file. However we kept ‘textDocument/documentHighlight’ and ‘textDocument/references’ separate requests since the first one is allowed to be more fuzzy. Symbol matches usually have a DocumentHighlightKind of Read or Write whereas fuzzy or textual matches use Textas the kind.

If it is a location where it's being written to the found reference then it should be highlighted with LspReferenceWrite, if it's being read from LspReferenceRead, and if it's unclear it's LspReferenceText

svengreb commented 1 year ago

Thank you for your patience! 🙏🏼 It‘s been a while since I had free time to focus more on Nord, and my open source projects in general, and invest time in this issue due to work-life balance.

I recently published the first “Northern Post — The state and roadmap of Nord“ announcement which includes all details about the plans and future of the Nord project, including the goal of catching up with the backlog. This issue is part of the backlog and therefore I want to triage and process it to get one step closer to a “clean state“. Read the announcement about reaching the “clean“ contribution triage state in Nord‘s discussions for more details about the goal.

Therefore it has been added for triage in the central and single-source-of-truth project board that is also described in more detail in the roadmap announcement.


@samhh Thanks again for your contribution and example implementation. I guess this has been implemented in the meantime through #284 and the LspReferenceRead syntax group is now supported, next to other LSP features. Would be nice if you could quickly check if this solves this issue :smile:

samhh commented 1 year ago

Hey @svengreb! Totally resonate with how the outside world can affect the velocity of open source contributions. Certainly focus on you and your life first.

In my case I've moved on from Nord to Kanagawa, so I'm no longer in a place to verify.