aznhe21 / actions-preview.nvim

Fully customizable previewer for LSP code actions.
GNU General Public License v3.0
365 stars 9 forks source link

don't force regex highlighting #34

Closed jan-xyz closed 3 months ago

jan-xyz commented 5 months ago

The current highlighter is using the regex highlighter per default, this tries to do it with tree sitter and if fails uses the regex highlighting.

image
aznhe21 commented 4 months ago

Thank you! However, it seems that the syntax highlighting is not correct, especially on the first line.

before

image

after

image

jan-xyz commented 4 months ago

I think that's a problem with the tree-sitter parser. I also noticed that in other diff scenarios.

jan-xyz commented 4 months ago

the problem is now fixed, the tree sitter parser only allows diff --git ... as a command to parse the output.

jan-xyz commented 4 months ago

Here is the currently hard-coded --git: https://github.com/the-mikedavis/tree-sitter-diff/blob/c165725c28e69b36c5799ff0e458713a844f1aaf/grammar.js#L68

dsully commented 3 months ago

+1 - this would be great to get merged.

jan-xyz commented 3 months ago

The git parser for treesitter fixed the problem upstream and should be fine now, @aznhe21

rubiin commented 3 months ago

+1

aznhe21 commented 3 months ago

Apologies for the delayed response. Thank you for addressing this!