andersevenrud / nordic.nvim

A nord-esque colorscheme for neovim
MIT License
174 stars 12 forks source link

Incorrect multiline string highlighting in Python #52

Closed 9seconds closed 2 years ago

9seconds commented 2 years ago

Hey! Thanks for the amazing colorscheme. I do have a problem though with incorrect multiline string highlighting in Python :/ Please take a look at this asciinema: https://asciinema.org/a/S7uEVWTm7wxxM8un1p0uu64zH Just FYI: https://github.com/EdenEast/nightfox.nvim this guy does it correct.

andersevenrud commented 2 years ago

Hm. I'm not actually able to reproduce this.

Are you using treesitter ?

9seconds commented 2 years ago

Yes. Here is my neovim init.lua: https://github.com/9seconds/dotfiles/blob/master/neovim/init.lua I'm on 0.6.0~ubuntu1+git202112091249-6063e07a0-adeb5640f-bb94ef4f0~ubuntu18.04.1 version now.

andersevenrud commented 2 years ago

Untitled

I used the ascinnema side-by-side and wrote it exactly the way you did there, and it did not see any of these issues.

Looks to me like the actual syntax is what's breaking, and not something in this colorscheme :thinking:

I will try your config when I get back home from work and see if that does not help with reproduction.

9seconds commented 2 years ago

I see. I'm using neovim from nightly so it is very possible that something is broken. I've tried to recompile parsers but no luck. I'll try with a stable later.

andersevenrud commented 2 years ago

I'm also on nightly but without issues. However I was able to reproduce this with your configuration.

After some digging I found that this happens when change my config to ensure_installed = 'maintained' instead of having an explicit list. I'm not quite sure why yet (example: I set it to { 'python' }, but still no issues).

9seconds commented 2 years ago

Thanks! It seems that it is a regression in a parser for RST: https://github.com/stsewd/tree-sitter-rst/issues/22

andersevenrud commented 2 years ago

After a process of elimination I found that it's reStructuredText that causes this: https://github.com/stsewd/tree-sitter-rst

Not really sure where to go from here though...

andersevenrud commented 2 years ago

Hah. Posted at the same time! I didn't look at the issues yet. Thanks :)