-
Notifications
You must be signed in to change notification settings - Fork 16
fix: argument in "vim.foo({bar})" #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There's still a parse error (but not wrong highlighting) in
(but not in |
Looks like the |
Ah, I had assumed that the (I have hesitated to touch upstream docs so far, but if it's open season now...) |
This definitely improves things, but also causes a few errors. Will see if those can be avoided with some tweaks. |
Prepare for neovim/tree-sitter-vimdoc#108 which improves `{arg}` highlighting in many common cases: vim.foo({bar}) vim.foo( {bar}) nvim_foo({bar}) nvim_foo({bar},{baz}) nvim_foo({bar}, {baz}) foo[{buf}] The tradeoff is that things like `"[{"` are flagged as parse errors. We could avoid if we drop support for `foo[{buf}]`, but that is rather common (see `builtin.txt`).
Problem: In "vim.foo({bar})", {bar} is not recognized as (argument). Solution: Add more special-cases for plain (word). Closes #102
- Dropping ")" and "]" special-cases avoids 10 (out of ~30) new errors in a full `gen_help_html.validate()` run. - The /\w+\(/ special is no longer needed since "(" was added. - Other cases appear redundant, they don't affect test results nor `gen_help_html.validate()` results.
Prepare for neovim/tree-sitter-vimdoc#108 which improves `{arg}` highlighting in many common cases: vim.foo({bar}) vim.foo( {bar}) nvim_foo({bar}) nvim_foo({bar},{baz}) nvim_foo({bar}, {baz}) foo[{buf}] The tradeoff is that things like `"[{"` are flagged as parse errors. We could avoid if we drop support for `foo[{buf}]`, but that is rather common (see `builtin.txt`).
Prepare for neovim/tree-sitter-vimdoc#108 which improves `{arg}` highlighting in many common cases: vim.foo({bar}) vim.foo( {bar}) nvim_foo({bar}) nvim_foo({bar},{baz}) nvim_foo({bar}, {baz}) foo[{buf}] The tradeoff is that things like `"[{"` are flagged as parse errors. We could avoid if we drop support for `foo[{buf}]`, but that is rather common (see `builtin.txt`).
Prepare for neovim/tree-sitter-vimdoc#108 which improves `{arg}` highlighting in many common cases: vim.foo({bar}) vim.foo( {bar}) nvim_foo({bar}) nvim_foo({bar},{baz}) nvim_foo({bar}, {baz}) foo[{buf}] The tradeoff is that things like `"[{"` are flagged as parse errors. We could avoid if we drop support for `foo[{buf}]`, but that is rather common (see `builtin.txt`).
(Continues #103 )
Problem:
In "vim.foo({bar})", {bar} is not recognized as (argument).
Solution:
Add more special-cases for plain (word).
Closes #102
Notes
(url)
case:tree-sitter-vimdoc/corpus/url.txt
Line 42 in 755b801