[Issue]: yagChar
is Not up to Spec
#75
Labels
area/syntax
affecting syntax highlight
editor/vim-neovim
affecting both Neovim and Vim
status/triage
default label before it is marked as bug or something else
Milestone
Expected Behaviour
According to the Go specification on Rune literals1, following sequences are allowed:
Thus, it is expected that the
yagChar
syntax group also recognises those.Actual Behaviour
Instead, we see the following behaviour:
Here, through some tricky code, we try to let the user know when they are creating/using an illegal rune literal. However, according to the Go specification1 the sequences in the above screenshot are actually valid, as I copied them directly from there.
Steps to Reproduce
*.yag
file (or any accepted file extension)Additional Context
I understand that validating Unicode may be a hard task to do; if this seems unfeasible, we could just resort to finding the longest Unicode sequence available and use that as the maximum allowed.
If memory serves me right, Unicode ranges from
0
to0x10FFFF
, though not all are assigned. Perhaps we could call out to Python if we really want to validate any given Unicode sequence2, and maybe even display it as virtual text of sorts.345(Given that the user's (Neo)Vim supports said virtual text)
Code of Conduct
Footnotes
https://go.dev/ref/spec#Rune_literals ↩ ↩2
https://docs.python.org/3/howto/unicode.html ↩
https://neovim.io/doc/user/api.html#api-extmark ↩
https://vimhelp.org/textprop.txt.html ↩
https://vimhelp.org/textprop.txt.html#virtual-text ↩
The text was updated successfully, but these errors were encountered: