Description
openedon Jul 16, 2020
Hey guys,
First of all, great plugin, I really like what you have created here. Keep up the great work.
Describe the bug
I got a bug with the plugin vim-clap.
After a while vim-clap providers will result in an error message and resulting in a floating window without content. I'm not sure if this is a bug on your, vim-clap or neovim core side.
When i tried to create a minimal vimrc i noticed that this bug only appears when foldmethod=expr foldexpr=nvim_treesitter#foldexpr()
is set.
To Reproduce
Steps to reproduce the behavior:
- Minimal vimrc
let mapleader = ','
call plug#begin('~/.config/nvim/plugged')
Plug 'nvim-treesitter/nvim-treesitter'
Plug 'liuchengxu/vim-clap'
call plug#end()
nnoremap <leader>q :Clap files<CR>
lua << EOF
require'nvim-treesitter.configs'.setup {
highlight = {
enable = true, -- false will disable the whole extension
},
ensure_installed = { -- one of 'all', 'language' or a list of languages
'c',
}
}
EOF
set foldmethod=expr foldexpr=nvim_treesitter#foldexpr()
- Go for example to neovim repo
- Open random c file. Example:
nvim -u ~/minimalrc.vim src/nvim/ui.c
- Open another file with
:Clap files
or<leader>q
. e.g.src/tree_sitter/parser.c
- Try opening vim-clap again triggers error message:
Error detected while processing function clap#[41]..clap#for[39]..clap#floating_win#open[17]..clap#_init[3]..48[4]..47[7]..clap#job#regular#forerunner#start[1]..<SNR>52_run_maple_command[3]..clap#spinner#refresh[1]..<SNR>47_set_spinner[2]..clap#spinner#set:
line 2:
Error executing lua callback: /usr/share/nvim/runtime/lua/vim/treesitter.lua:215: invalid start
Pressing enter opens vim-claps floating window without content.
6. If message is not triggered, try opening more files with vim-clap or move around in the file. It is not entirely deterministic when it fails.
Expected behavior
vim-clap opens normally without triggering a error message and being able to open a new file.
Output of :checkhealth nvim_treesitter
health#nvim_treesitter#check
Installation
- OK:
git
executable found.
- OK:
cc
executable found.
html parser healthcheck
- OK: html parser found.
- OK:
highlights.scm
found.
- WARNING: No
locals.scm
query found for html
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
- WARNING: No
textobjects.scm
query found for html
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
typescript parser healthcheck
- OK: typescript parser found.
- OK:
highlights.scm
found.
- OK:
locals.scm
found.
- WARNING: No
textobjects.scm
query found for typescript
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
markdown parser healthcheck
- OK: markdown parser found.
- WARNING: No
highlights.scm
query found for markdown
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
- WARNING: No
locals.scm
query found for markdown
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
- WARNING: No
textobjects.scm
query found for markdown
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
regex parser healthcheck
- OK: regex parser found.
- OK:
highlights.scm
found.
- WARNING: No
locals.scm
query found for regex
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
- WARNING: No
textobjects.scm
query found for regex
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
c parser healthcheck
- OK: c parser found.
- OK:
highlights.scm
found.
- OK:
locals.scm
found.
- OK:
textobjects.scm
found.
java parser healthcheck
- OK: java parser found.
- OK:
highlights.scm
found.
- OK:
locals.scm
found.
- WARNING: No
textobjects.scm
query found for java
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
python parser healthcheck
- OK: python parser found.
- OK:
highlights.scm
found.
- OK:
locals.scm
found.
- OK:
textobjects.scm
found.
yaml parser healthcheck
- OK: yaml parser found.
- WARNING: No
highlights.scm
query found for yaml
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
- WARNING: No
locals.scm
query found for yaml
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
- WARNING: No
textobjects.scm
query found for yaml
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
cpp parser healthcheck
- OK: cpp parser found.
- OK:
highlights.scm
found.
- OK:
locals.scm
found.
- OK:
textobjects.scm
found.
toml parser healthcheck
- OK: toml parser found.
- WARNING: No
highlights.scm
query found for toml
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
- WARNING: No
locals.scm
query found for toml
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
- WARNING: No
textobjects.scm
query found for toml
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
lua parser healthcheck
- OK: lua parser found.
- OK:
highlights.scm
found.
- OK:
locals.scm
found.
- WARNING: No
textobjects.scm
query found for lua
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
ruby parser healthcheck
- OK: ruby parser found.
- OK:
highlights.scm
found.
- OK:
locals.scm
found.
- WARNING: No
textobjects.scm
query found for ruby
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
go parser healthcheck
- OK: go parser found.
- OK:
highlights.scm
found.
- OK:
locals.scm
found.
- OK:
textobjects.scm
found.
scala parser healthcheck
- OK: scala parser found.
- WARNING: No
highlights.scm
query found for scala
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
- WARNING: No
locals.scm
query found for scala
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
- WARNING: No
textobjects.scm
query found for scala
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
rust parser healthcheck
- OK: rust parser found.
- OK:
highlights.scm
found.
- OK:
locals.scm
found.
- WARNING: No
textobjects.scm
query found for rust
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
json parser healthcheck
- OK: json parser found.
- OK:
highlights.scm
found.
- WARNING: No
locals.scm
query found for json
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
- WARNING: No
textobjects.scm
query found for json
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
javascript parser healthcheck
- OK: javascript parser found.
- OK:
highlights.scm
found.
- OK:
locals.scm
found.
- WARNING: No
textobjects.scm
query found for javascript
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
css parser healthcheck
- OK: css parser found.
- OK:
highlights.scm
found.
- WARNING: No
locals.scm
query found for css
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
- WARNING: No
textobjects.scm
query found for css
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
c_sharp parser healthcheck
- OK: c_sharp parser found.
- WARNING: No
highlights.scm
query found for c_sharp
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
- WARNING: No
locals.scm
query found for c_sharp
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
- WARNING: No
textobjects.scm
query found for c_sharp
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
bash parser healthcheck
- OK: bash parser found.
- OK:
highlights.scm
found.
- WARNING: No
locals.scm
query found for bash
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
- WARNING: No
textobjects.scm
query found for bash
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
Missing parsers
- WARNING: Some parsers are not installed:
nix
swift
elm
vue
ocaml
haskell
jsdoc
julia
php
tsx
- ADVICE:
- Install them using `:TSInstall language
Output of nvim --version
NVIM v0.5.0-593-g1ca67a73c
Build type: RelWithDebInfo
LuaJIT 2.0.5
Compilation: /usr/lib/ccache/bin/cc -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/conni/.cache/yay/neovim-git/src/build/config -I/home/conni/.cache/yay/neovim-git/src/neovim-git/src -I/usr/include -I/home/conni/.cache/yay/neovim-git/src/build/src/nvim/auto -I/home/conni/.cache/yay/neovim-git/src/build/include
Compiled by conni@home
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
Additional context
Installing vim-claps binaries does not fix this bug so I left this one out.