davidgranstrom / scnvim

Neovim frontend for SuperCollider.
GNU General Public License v3.0
208 stars 28 forks source link

[BUG] Syntax highlighting is not consistent with multiline strings #217

Closed dmorgan-github closed 2 months ago

dmorgan-github commented 1 year ago

Describe the bug Syntax highlighting becomes jumbled with multiline strings. Sometimes multiline strings will appear with correct syntax highlighting. Other times syntax highlighting will break on a new line while still within a string block.

Expected behavior String blocks should consistently retain syntax color and should not break outer code blocks denoted by open and closed parens.

Steps to reproduce Paste the below code into an scd file. The multiline string will not retain consistent syntax highlighting. Additionally, when trying to execute an entire block of code between open and closed paren a syntax error will be thrown. Highlighting the block and executing will work.

(
~l = "+ pm * adsr
degree ~ ~ <0 1> ~
stretch 0.25
amp 0.5
mindex Pwhite(0.0, 2.0)
mfb 0.3
octave 4
"
)
Screen Shot 2023-05-08 at 8 59 27 PM

Additional context Using Zenburn theme

Information

Features: +acl +iconv +tui See ":help feature-compile"

system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/local/Cellar/neovim/0.8.3/share/nvim"

Run :checkhealth for more info

madskjeldgaard commented 1 year ago

Are you using treesitter for syntax highlighting? If so, the problem is here and not in scnvim :) -> https://github.com/madskjeldgaard/tree-sitter-supercollider

dmorgan-github commented 1 year ago

I'm not using treesitter. I also did verify that the issue was present even after disabling all my plugins except scnvim.

davidgranstrom commented 2 months ago

Thanks for the report. I was not able to reproduce the issue, please try using a newer version of nvim and feel free to re-open this issue if the problem persists.