Closed primeapple closed 11 months ago
I don't use neovim any more so I don't have it set up to test this. But this seems to work fine in other editors, so I would guess it's a problem of nvim-treesitter.
Removing
markdown
andmarkdown_inline
TS Parsers fixes this issue
You're saying standalone .jsx
files are not parsed correctly when a markdown jsx
code block is active in another file, but they are parsed correctly when the markdown parser is not installed?
(Btw you can have nested code blocks in markdown by giving the outer code block more `
s: like this
````markdown
Text in outer code block
```jsx
// Comment in inner code block
)
You're saying standalone
.jsx
files are not parsed correctly when a markdownjsx
code block is active in another file, but they are parsed correctly when the markdown parser is not installed?
Exactly. When uninstalling the markdown parser, there is no problem when opening jsx
files while having open markdown buffers.
Thanks for investigating. I realized that jsx
blocks in markdown are not correctly recognized/parsed yet, may this be the issue?
I think there's some kind of support for that in nvim-treesitter. Best you ask there
Removing markdown and markdown_inline TS Parsers fixes this issue
Can confirm the same. Uninstalling them works and I no longer get that error.
It's a Neovim issue. I have one merged (https://github.com/neovim/neovim/pull/25151) and one open (https://github.com/neovim/neovim/pull/25143) PR to resolve it.
This can be closed
Describe the bug After opening a markdown buffer with
.jsx
codeblocks, Treesitter can't parse new.jsx
buffers anymore.STR:
javscript
,markdown
andmarkdown_inline
TS Parsers installed in Neovimtest.jsx
test.md
, look at code example below (without the_
):e test.jsx
, see that jsx is not getting parsed by treesitterCode example
Expected behavior Highlight the code snippet as
jsx
codesActual behavior No highlighting is applied, even worse, Treesitter does not parse
.jsx
files from now on anymore.Infos I found this here: https://github.com/nvim-treesitter/nvim-treesitter/issues/4918 Removing
markdown
andmarkdown_inline
TS Parsers fixes this issue, so I came here :)