You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm experiencing a strange issue where every now and then after launching nvim, tree sitter seems to highlight the file incorrectly.
It's really intermittent so I can't tell if it's specific to typescript as show in the screenshot below.
The top half of the image is an nvim instance with a 'broken' tree sitter, and the bottom half is working as expected. These are two independent nvim instances each in a pane in a terminal.
Please ignore the darkened background/colors in the bottom half, that's just because it's not focused in the terminal.
Here's both instances with TreeSitter disabled, for good measure:
I don't have any custom highlight groups configured and I have LSP Semantic highlighting disabled so I don't think either of those are the culprit.
I'm not using an nvim 'distro' of any kind. Just a vanilla install with some keymaps/plugins configured.
To Reproduce
Unfortunately it's intermittent, but what I did to get the screenshot:
Open a typescript file, on the first try, TS was working fine.
In the second instance I just kept opening and closing the file until TS wasn't working correctly.
Expected behavior
TS should consistently highlight the same file the same way.
Output of :checkhealth nvim-treesitter
==============================================================================
nvim-treesitter: require("nvim-treesitter.health").check()
Installation ~
- OK `tree-sitter` found 0.21.0 (parser generator, only needed for :TSInstallFromGrammar)
- OK `node` found v20.10.0 (only needed for :TSInstallFromGrammar)
- OK `git` executable found.
- OK `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
Version: Apple clang version 15.0.0 (clang-1500.1.0.2.4)
- OK Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.
OS Info:
{
machine = "arm64",
release = "23.1.0",
sysname = "Darwin",
version = "Darwin Kernel Version 23.1.0: Mon Oct 9 21:27:24 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6000"
} ~
Parser/Features H L F I J
- bash ✓ ✓ ✓ . ✓
- c ✓ ✓ ✓ ✓ ✓
- cpp ✓ ✓ ✓ ✓ ✓
- dart ✓ ✓ ✓ ✓ ✓
- devicetree ✓ ✓ ✓ ✓ ✓
- gleam ✓ ✓ ✓ ✓ ✓
- go ✓ ✓ ✓ ✓ ✓
- graphql ✓ . . ✓ ✓
- javascript ✓ ✓ ✓ ✓ ✓
- json ✓ ✓ ✓ ✓ .
- lua ✓ ✓ ✓ ✓ ✓
- markdown ✓ . ✓ ✓ ✓
- markdown_inline ✓ . . . ✓
- ruby ✓ ✓ ✓ ✓ ✓
- rust ✓ ✓ ✓ ✓ ✓
- swift ✓ ✓ . x .
- tsx ✓ ✓ ✓ ✓ ✓
- typescript ✓ ✓ ✓ ✓ ✓
- vim ✓ ✓ ✓ . ✓
- zig ✓ ✓ ✓ ✓ ✓
Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
+) multiple parsers found, only one will be used
x) errors found in the query, try to run :TSUpdate {lang} ~
The following errors have been detected: ~
- ERROR swift(indents): ...-3e569d4/share/nvim/runtime/lua/vim/treesitter/query.lua:279: Query error at 35:4. Invalid node type "willset_didset_block":
(willset_didset_block)
^
swift(indents) is concatenated from the following files:
| [ERROR]:"/Users/jake/.local/share/nvim/lazy/nvim-treesitter/queries/swift/indents.scm", failed to load: ...-3e569d4/share/nvim/runtime/lua/vim/treesitter/query.lua:279: Query error at 35:4. Invalid node type "willset_didset_block":
(willset_didset_block)
^
Output of nvim --version
NVIM v0.10.0-dev-2529+g3e569d440-Homebrew
Build type: Release
LuaJIT 2.1.1703358377
Run "nvim -V1 -v" for more info
(I have also tried on the latest stable release and the same happens)
Additional context
Sorry for the waffle. I'm not sure how I can debug further but I'm keen to learn if anyone has any ideas.
The text was updated successfully, but these errors were encountered:
Describe the bug
Hi, I'm experiencing a strange issue where every now and then after launching nvim, tree sitter seems to highlight the file incorrectly.
It's really intermittent so I can't tell if it's specific to typescript as show in the screenshot below.
The top half of the image is an nvim instance with a 'broken' tree sitter, and the bottom half is working as expected. These are two independent
nvim
instances each in a pane in a terminal.Please ignore the darkened background/colors in the bottom half, that's just because it's not focused in the terminal.
Here's both instances with TreeSitter disabled, for good measure:
I don't have any custom highlight groups configured and I have LSP Semantic highlighting disabled so I don't think either of those are the culprit.
I'm not using an nvim 'distro' of any kind. Just a vanilla install with some keymaps/plugins configured.
To Reproduce
Unfortunately it's intermittent, but what I did to get the screenshot:
Open a typescript file, on the first try, TS was working fine.
In the second instance I just kept opening and closing the file until TS wasn't working correctly.
Expected behavior
TS should consistently highlight the same file the same way.
Output of
:checkhealth nvim-treesitter
Output of
nvim --version
Additional context
Sorry for the waffle. I'm not sure how I can debug further but I'm keen to learn if anyone has any ideas.
The text was updated successfully, but these errors were encountered: