-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
[Bug]: Doesn't seem to work for JSX filetypes #14
Comments
You could be experiencing the same problem as #2. Does highlighting work if you As for the health check, if you don't have any custom configuration (which you don't need to have) there is nothing to check, so the health report will be empty. Perhaps I should add an explicit message for that case. |
#2 seems like a different problem as it was present in Does the repro works on your machine? Or it's working fine on yours? EDIT: oh and yes, I did try |
Can you please update to the current vim.g.rainbow_delimiters = {
log = {
level = vim.log.levels.TRACE
}
} |
For
For
Interestingly, it started working for |
Oops, I had a typo in my logger logic. Can you please update again and post the news logs? The error message indicates that something is wrong with the query. Please run local q = vim.fn.join(vim.fn.readfile('path/to/plugins/rainbow-delimiters.nvim/queries/javascript/rainbow-delimiters-react.scm'), '\n')
local query = vim._ts_parse_query('javascript', s)
print(query) The first line loads the text of the query from file. The second line call the function which fails in your error message. If everything went correctly the last line should print something like |
Sorry for the delay, was busy with work. When running those commands it fails at the E5108: Error executing lua [string ":lua"]:1: no such language: javascript
stack traceback:
[C]: in function '_ts_parse_query'
[string ":lua"]:1: in main chunk Which is weird as I made sure that the parser for Running the commands with E5108: Error executing lua [string ":lua"]:1: query: invalid structure at posi
tion 1065 for language tsx
stack traceback:
[C]: in function '_ts_parse_query'
[string ":lua"]:1: in main chunk And here are the logs:
|
What do you get if you try a language that does work for you? (Remember that you have to adjust the path to the query as well, otherwise you will get an error.) |
for local q = vim.fn.join(vim.fn.readfile('/home/schardev/.local/share/nvim/lazy/rai
nbow-delimiters.nvim/queries/css/rainbow-delimiters.scm'), '\n')
local query = vim._ts_parse_query('css', q)
print(query) -- returns `<query>` and the logs says:
and the same for
|
So CSS and JSON are working correctly. Then the problem must be either with my query or with your Neovim, because by calling |
So, I was able to get it to work now. Apparently, this query from (jsx_self_closing_element
name: (identifier) @opening
"/>" @closing) @container ; <-- here It works but the highlighting is a little bit off (see EDIT: Here are the logs (just for the sake of it):
|
Please try the current
Yes, that is unfortunate. Currently Neovim can only have one match per capture, so I can have only one opening and one closing node. The three nodes are Ideally both |
Updating to You can close the issue now. Thanks for the support :) |
Neovim version
0.9.1
Language affected
all I guess
Query
No response
Strategy
No response
Description
The text was updated successfully, but these errors were encountered: