quarto-nvim icon indicating copy to clipboard operation
quarto-nvim copied to clipboard

Error detected while processing CursorMoved Autocommands for "*"

Open AngelBerihuete opened this issue 9 months ago • 1 comments

After update my Linux system (ArcoLinux) I have this issue with qmd files, and only with this kind of files, using LazyVim. I have not found out any relevant information to resolve the problem. Could you help me, with any clue, to resolve this issue?

Error detected while processing CursorMoved Autocommands for "*":                                                                
Error executing lua callback: ...vim-treesitter-context/lua/treesitter-context/render.lua:51: 'height' key must be a positive Int
eger                                                                                                                             
stack traceback:                                                                                                                 
        [C]: in function 'nvim_open_win'                                                                                         
        ...vim-treesitter-context/lua/treesitter-context/render.lua:51: in function 'display_window'                             
        ...vim-treesitter-context/lua/treesitter-context/render.lua:344: in function 'open'                                      
        .../lazy/nvim-treesitter-context/lua/treesitter-context.lua:50: in function 'open'                                       
        .../lazy/nvim-treesitter-context/lua/treesitter-context.lua:111: in function 'f'                                         
        .../lazy/nvim-treesitter-context/lua/treesitter-context.lua:27: in function <.../lazy/nvim-treesitter-context/lua/treesit
ter-context.lua:21>                                                                                                              
        [C]: in function 'nvim_exec_autocmds'                                                                                    
        ...ocal/share/nvim/lazy/LazyVim/lua/lazyvim/util/plugin.lua:109: in function ''                                          
        vim/_editor.lua: in function <vim/_editor.lua:0> 

For nvim --version I have

NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1713773202

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

AngelBerihuete avatar May 09 '24 06:05 AngelBerihuete

Your issue comes from the nvim-treesitter-context plugin, not quarto-nvim. But here are the steps I would take:

  1. check that treesitter parsers are installed correctly and up-to-date, maybe reinstall some
  2. clone the plugin in question locally and use that to see where exactly in the code the error occurs. Add print functions to taste.

Though I do wonder if the issue also occurs with markdown files (since it's the same treesitter grammar) and what a problematic file looks like. Or if an empty file is already a problem.

jmbuhr avatar May 09 '24 08:05 jmbuhr

Many thanks @jmbuhr !

You're right, nvim-treesitter-context has an issue for markdown. In any case, I'll take into account your valuable advices.

AngelBerihuete avatar May 10 '24 07:05 AngelBerihuete