Closed refaelsh closed 1 month ago
Is your Treesitter configured correctly?
Here is the result of :checkheakt nvim-treesitter
:
==============================================================================
nvim-treesitter: require("nvim-treesitter.health").check()
Installation ~
- OK `tree-sitter` found 0.22.6 (parser generator, only needed for :TSInstallFromGrammar)
- OK `node` found v20.17.0 (only needed for :TSInstallFromGrammar)
- OK `git` executable found.
- OK `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
Version: gcc (GCC) 13.3.0
- OK Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.
OS Info:
{
machine = "x86_64",
release = "6.6.50",
sysname = "Linux",
version = "#1-NixOS SMP PREEMPT_DYNAMIC Sun Sep 8 05:54:49 UTC 2024"
} ~
Parser/Features H L F I J
- ada ✓ ✓ ✓ . ✓
- agda ✓ . ✓ . ✓
- angular ✓ ✓ ✓ ✓ ✓
- apex ✓ ✓ ✓ . ✓
- arduino ✓ ✓ ✓ ✓ ✓
- asm ✓ . . . ✓
- astro ✓ ✓ ✓ ✓ ✓
- authzed ✓ . . . ✓
- awk ✓ . . . ✓
- bash ✓ ✓ ✓ . ✓
- bass ✓ ✓ ✓ ✓ ✓
- beancount ✓ . ✓ . ✓
- bibtex ✓ . ✓ ✓ ✓
- bicep ✓ ✓ ✓ ✓ ✓
- bitbake ✓ ✓ ✓ ✓ ✓
- blueprint ✓ . . . ✓
- bp ✓ ✓ ✓ ✓ ✓
- c ✓ ✓ ✓ ✓ ✓
- c_sharp ✓ ✓ ✓ . ✓
- cairo ✓ ✓ ✓ ✓ ✓
- capnp ✓ ✓ ✓ ✓ ✓
- chatito ✓ ✓ ✓ ✓ ✓
- clojure ✓ ✓ ✓ . ✓
- cmake ✓ . ✓ ✓ ✓
- comment ✓ . . . .
- commonlisp ✓ ✓ ✓ . ✓
- cooklang ✓ . . . ✓
- corn ✓ ✓ ✓ ✓ ✓
- cpon ✓ ✓ ✓ ✓ ✓
- cpp ✓ ✓ ✓ ✓ ✓
- css ✓ . ✓ ✓ ✓
- csv ✓ . . . .
- cuda ✓ ✓ ✓ ✓ ✓
- cue ✓ ✓ ✓ ✓ ✓
- d ✓ ✓ ✓ ✓ ✓
- dart ✓ ✓ ✓ ✓ ✓
- devicetree ✓ ✓ ✓ ✓ ✓
- dhall ✓ . ✓ . ✓
- diff ✓ . ✓ . ✓
- disassembly ✓ . . . ✓
- djot ✓ ✓ ✓ ✓ ✓
- dockerfile ✓ . . . ✓
- dot ✓ . . ✓ ✓
- doxygen ✓ . . ✓ ✓
- dtd ✓ ✓ ✓ . ✓
- earthfile ✓ . . . ✓
- ebnf ✓ . . . ✓
- editorconfig ✓ . ✓ . ✓
- eds ✓ . ✓ . .
- eex ✓ . . . ✓
- elixir ✓ ✓ ✓ ✓ ✓
- elm ✓ . ✓ . ✓
- elsa ✓ ✓ ✓ ✓ ✓
- elvish ✓ . . . ✓
- embedded_template ✓ . . . ✓
- erlang ✓ . ✓ . ✓
- facility ✓ . ✓ ✓ ✓
- faust ✓ . . . ✓
- fennel ✓ ✓ ✓ . ✓
- fidl ✓ . ✓ . ✓
- firrtl ✓ ✓ ✓ ✓ ✓
- fish ✓ ✓ ✓ ✓ ✓
- foam ✓ ✓ ✓ ✓ ✓
- forth ✓ ✓ ✓ ✓ ✓
- fortran ✓ . ✓ ✓ ✓
- fsh ✓ . . . ✓
- func ✓ . . . ✓
- fusion ✓ ✓ ✓ ✓ ✓
- gap ✓ ✓ ✓ . ✓
- gaptst ✓ . ✓ . ✓
- gdscript ✓ ✓ ✓ ✓ ✓
- gdshader ✓ . . . ✓
- git_config ✓ . ✓ . ✓
- git_rebase ✓ . . . ✓
- gitattributes ✓ ✓ . . ✓
- gitcommit ✓ . . . ✓
- gitignore ✓ . . . ✓
- gleam ✓ ✓ ✓ ✓ ✓
- glimmer ✓ ✓ ✓ ✓ ✓
- glimmer_javascript ✓ ✓ . ✓ ✓
- glimmer_typescript ✓ . . ✓ ✓
- glsl ✓ ✓ ✓ ✓ ✓
- gn ✓ ✓ ✓ ✓ ✓
- gnuplot ✓ . . . ✓
- go ✓ ✓ ✓ ✓ ✓
- goctl ✓ . ✓ ✓ ✓
- godot_resource ✓ ✓ ✓ . ✓
- gomod ✓ . . . ✓
- gosum ✓ . . . .
- gotmpl ✓ ✓ ✓ . ✓
- gowork ✓ . . . ✓
- gpg ✓ . . . ✓
- graphql ✓ . . ✓ ✓
- groovy ✓ ✓ ✓ ✓ ✓
- gstlaunch ✓ . . . .
- hack ✓ . . . ✓
- hare ✓ ✓ ✓ ✓ ✓
- haskell ✓ ✓ ✓ . ✓
- haskell_persistent ✓ . ✓ . .
- hcl ✓ . ✓ ✓ ✓
- heex ✓ ✓ ✓ ✓ ✓
- helm ✓ ✓ ✓ . ✓
- hjson ✓ ✓ ✓ ✓ ✓
- hlsl ✓ ✓ ✓ ✓ ✓
- hlsplaylist ✓ . . . ✓
- hocon ✓ . ✓ . ✓
- hoon ✓ ✓ ✓ . ✓
- html ✓ ✓ ✓ ✓ ✓
- htmldjango ✓ . ✓ ✓ ✓
- http ✓ . . . ✓
- hurl ✓ . ✓ ✓ ✓
- hyprlang ✓ . ✓ ✓ ✓
- idl ✓ . . ✓ ✓
- ini ✓ . ✓ . ✓
- inko ✓ ✓ ✓ ✓ ✓
- ispc ✓ ✓ ✓ ✓ ✓
- janet_simple ✓ ✓ ✓ . ✓
- java ✓ ✓ ✓ ✓ ✓
- javascript ✓ ✓ ✓ ✓ ✓
- jq ✓ ✓ . . ✓
- jsdoc ✓ . . . .
- json ✓ ✓ ✓ ✓ .
- json5 ✓ . . . ✓
- jsonc ✓ ✓ ✓ ✓ ✓
- jsonnet ✓ ✓ ✓ . ✓
- julia ✓ ✓ ✓ ✓ ✓
- just ✓ ✓ ✓ ✓ ✓
- kconfig ✓ ✓ ✓ ✓ ✓
- kdl ✓ ✓ ✓ ✓ ✓
- kotlin ✓ ✓ ✓ . ✓
- koto ✓ ✓ ✓ . ✓
- kusto ✓ . . . ✓
- lalrpop ✓ ✓ ✓ . ✓
- latex ✓ . ✓ . ✓
- ledger ✓ . ✓ ✓ ✓
- leo ✓ . . ✓ ✓
- linkerscript ✓ ✓ ✓ ✓ ✓
- liquid ✓ . . . ✓
- liquidsoap ✓ ✓ ✓ ✓ ✓
- llvm ✓ . . . ✓
- lua ✓ ✓ ✓ ✓ ✓
- luadoc ✓ . . . .
- luap ✓ . . . .
- luau ✓ ✓ ✓ ✓ ✓
- m68k ✓ ✓ ✓ . ✓
- make ✓ . ✓ . ✓
- markdown ✓ . ✓ ✓ ✓
- markdown_inline ✓ . . . ✓
- matlab ✓ ✓ ✓ ✓ ✓
- menhir ✓ . . . ✓
- mermaid ✓ . ✓ ✓ ✓
- meson ✓ . ✓ ✓ ✓
- mlir ✓ ✓ . . ✓
- muttrc ✓ . . . ✓
- nasm ✓ . . . ✓
- nginx ✓ . ✓ . ✓
- nickel ✓ . . ✓ ✓
- nim ✓ ✓ ✓ . ✓
- nim_format_string ✓ . . . ✓
- ninja ✓ . ✓ ✓ ✓
- nix ✓ ✓ ✓ ✓ ✓
- norg . . . . .
- nqc ✓ ✓ ✓ ✓ ✓
- objc ✓ ✓ ✓ ✓ ✓
- objdump ✓ . . . ✓
- ocaml ✓ ✓ ✓ ✓ ✓
- ocaml_interface ✓ ✓ ✓ ✓ ✓
- ocamllex ✓ . . . ✓
- odin ✓ ✓ ✓ ✓ ✓
- org ✓ . ✓ . ✓
- pascal ✓ ✓ ✓ ✓ ✓
- passwd ✓ . . . .
- pem ✓ . ✓ . ✓
- perl ✓ . ✓ . ✓
- php ✓ ✓ ✓ ✓ ✓
- php_only ✓ ✓ ✓ ✓ ✓
- phpdoc ✓ . . . .
- pioasm ✓ . . . ✓
- po ✓ . ✓ . ✓
- pod ✓ . . . .
- poe_filter ✓ . ✓ ✓ ✓
- pony ✓ ✓ ✓ ✓ ✓
- powershell ✓ ✓ ✓ ✓ ✓
- printf ✓ . . . .
- prisma ✓ . ✓ . ✓
- problog ✓ . ✓ ✓ ✓
- prolog ✓ . ✓ ✓ ✓
- promql ✓ . . . ✓
- properties ✓ ✓ . . ✓
- proto ✓ . ✓ ✓ ✓
- prql ✓ . . . ✓
- psv ✓ . . . .
- pug ✓ . . . ✓
- puppet ✓ ✓ ✓ ✓ ✓
- purescript ✓ ✓ . . ✓
- pymanifest ✓ . . . ✓
- python ✓ ✓ ✓ ✓ ✓
- ql ✓ ✓ ✓ ✓ ✓
- qmldir ✓ . . . ✓
- qmljs ✓ . ✓ . ✓
- query ✓ ✓ ✓ ✓ ✓
- r ✓ ✓ . ✓ ✓
- racket ✓ . ✓ . ✓
- ralph ✓ . . . ✓
- rasi ✓ ✓ ✓ ✓ ✓
- rbs ✓ . ✓ ✓ ✓
- re2c ✓ ✓ ✓ ✓ ✓
- readline ✓ . ✓ ✓ ✓
- regex ✓ . . . .
- rego ✓ . . . ✓
- requirements ✓ . . . ✓
- rescript ✓ ✓ ✓ ✓ ✓
- rnoweb ✓ . ✓ . ✓
- robot ✓ . ✓ ✓ ✓
- robots ✓ . . . ✓
- roc ✓ ✓ . . ✓
- ron ✓ ✓ ✓ ✓ ✓
- rst ✓ ✓ . . ✓
- ruby ✓ ✓ ✓ ✓ ✓
- rust ✓ ✓ ✓ ✓ ✓
- scala ✓ ✓ ✓ . ✓
- scfg ✓ . . . ✓
- scheme ✓ . ✓ . ✓
- scss ✓ . ✓ ✓ ✓
- sflog ✓ . . . .
- slang ✓ ✓ ✓ ✓ ✓
- slint ✓ ✓ ✓ ✓ ✓
- smali ✓ ✓ ✓ ✓ ✓
- smithy ✓ . . . ✓
- snakemake ✓ ✓ ✓ ✓ ✓
- solidity ✓ . ✓ . ✓
- soql ✓ . . . .
- sosl ✓ . . . .
- sourcepawn ✓ ✓ . . ✓
- sparql ✓ ✓ ✓ ✓ ✓
- sql ✓ . . ✓ ✓
- squirrel ✓ ✓ ✓ ✓ ✓
- ssh_config ✓ ✓ ✓ ✓ ✓
- starlark ✓ ✓ ✓ ✓ ✓
- strace ✓ . . . ✓
- styled ✓ . ✓ ✓ ✓
- supercollider ✓ ✓ ✓ ✓ ✓
- surface ✓ . ✓ ✓ ✓
- svelte ✓ ✓ ✓ ✓ ✓
- swift ✓ ✓ . ✓ ✓
- sxhkdrc ✓ . ✓ . ✓
- systemtap ✓ ✓ ✓ . ✓
- systemverilog ✓ . ✓ . ✓
- t32 ✓ ✓ ✓ ✓ ✓
- tablegen ✓ ✓ ✓ ✓ ✓
- tact ✓ ✓ ✓ ✓ ✓
- tcl ✓ . ✓ ✓ ✓
- teal ✓ ✓ ✓ ✓ ✓
- templ ✓ . ✓ . ✓
- terraform ✓ . ✓ ✓ ✓
- textproto ✓ . ✓ ✓ ✓
- thrift ✓ ✓ ✓ ✓ ✓
- tiger ✓ ✓ ✓ ✓ ✓
- tlaplus ✓ ✓ ✓ . ✓
- tmux ✓ . . . ✓
- todotxt ✓ . . . .
- toml ✓ ✓ ✓ ✓ ✓
- tsv ✓ . . . .
- tsx ✓ ✓ ✓ ✓ ✓
- turtle ✓ ✓ ✓ ✓ ✓
- twig ✓ . . . ✓
- typescript ✓ ✓ ✓ ✓ ✓
- typespec ✓ . . ✓ ✓
- typoscript ✓ . ✓ ✓ ✓
- typst ✓ . ✓ ✓ ✓
- udev ✓ ✓ . . ✓
- ungrammar ✓ ✓ ✓ ✓ ✓
- unison ✓ . . . ✓
- usd ✓ ✓ ✓ ✓ ✓
- uxntal ✓ ✓ ✓ ✓ ✓
- v ✓ ✓ ✓ ✓ ✓
- vala ✓ . ✓ . ✓
- vento ✓ . . . ✓
- verilog ✓ ✓ ✓ . ✓
- vhdl ✓ . ✓ . ✓
- vhs ✓ . . . ✓
- vim ✓ ✓ ✓ . ✓
- vimdoc ✓ . . . ✓
- vrl ✓ ✓ ✓ ✓ ✓
- vue ✓ . ✓ ✓ ✓
- wgsl ✓ . ✓ ✓ ✓
- wgsl_bevy ✓ . ✓ ✓ .
- wing ✓ ✓ ✓ . ✓
- wit ✓ . ✓ . ✓
- xcompose ✓ ✓ . . ✓
- xml ✓ ✓ ✓ ✓ ✓
- yaml ✓ ✓ ✓ ✓ ✓
- yang ✓ . ✓ ✓ ✓
- yuck ✓ ✓ ✓ ✓ ✓
- zathurarc ✓ . . . ✓
- 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} ~
Looks fine.
Is this the same issue? https://github.com/jmbuhr/otter.nvim/issues/176#issuecomment-2353788250
Is this the same issue? #176 (comment)
No.
Do you have an example file for this? Any other relevant plugins?
I dont have an init.lua
file to give you since I am using NixOS+Nixvim, and on top of that, I manage it in an org file.
Here it is: https://github.com/refaelsh/dotfiles/blob/master/configuration.org.
Ok. Happy to take a look if you can provide a minimal reproducible example with a file the produces the error and e.g. a config starting from kickstarter.nvim.
I understand your idea. So, I took the init.lua from kickstarter.nvim repo and run it likes this: nvim -u path_to_file.lua
.
The only things I added are the following:
vim.api.nvim_create_autocmd({"BufRead", "BufNewFile"}, {
pattern = "*.org",
callback = function()
require('otter').activate()
end,
})
{
'nvim-orgmode/orgmode',
event = 'VeryLazy',
ft = { 'org' },
config = function()
-- Setup orgmode
require('orgmode').setup({
org_agenda_files = '~/orgfiles/**/*',
org_default_notes_file = '~/orgfiles/refile.org',
})
end,
},
{
'jmbuhr/otter.nvim',
dependencies = {
'nvim-treesitter/nvim-treesitter',
},
opts = {},
},
The problem still persists.
Do you have an example file that exhibits the error when opened with this config?
Sure. Here is a minimal file and the issue is still there:
* Bla
asasfasd
** dsfsdf
dsfsdfs
This does not reproduce the error. You can use the NVIM_APPNAME
environment variable to create a truly independent nvim and avoid spillover from your other config and share directories.
Closing this to reduce noise, please open a new issue with the reprex once you have it.
Closing this to reduce noise, please open a new issue with the reprex once you have it.
Agreed and understood.
This does not reproduce the error. You can use the
NVIM_APPNAME
environment variable to create a truly independent nvim and avoid spillover from your other config and share directories.
I will go and google NVIM_APPNAME
and open a new issues as you rightly suggested.
Thank you :-)
FYI I had the same problem when using the autocmd you used.
I think it is coming from the fact that treesitter hasn't loaded yet when the autocmd is called.
Using FileType
works for me, as it seems to be called after treesitter has started:
vim.api.nvim_create_autocmd({ "FileType" }, {
pattern = { "org" },
callback = function()
require("otter").activate()
end,
})
Thank you @Lcchy!
I have something like this in my config:
I get this error: