yioneko / nvim-yati

Yet another tree-sitter powered indent plugin for Neovim.
MIT License
149 stars 3 forks source link

bad argument #1 to 'find' (string expected, got nil) #5

Closed creasty closed 2 years ago

creasty commented 2 years ago

Started getting this error...

.../nvim/dein/.cache/init.vim/.dein/lua/nvim-yati/utils.lua:100: bad argument #1 to 'find' (string expected, got nil)
stack traceback:
<09>[C]: in function 'find'
<09>.../nvim/dein/.cache/init.vim/.dein/lua/nvim-yati/utils.lua:100: in function 'get_first_nonblank_col_at_line'
<09>.../nvim/dein/.cache/init.vim/.dein/lua/nvim-yati/utils.lua:108: in function 'get_node_at_line'
<09>...dein/.cache/init.vim/.dein/lua/nvim-yati/configs/vim.lua:51: in function 'chain'
<09>...g/nvim/dein/.cache/init.vim/.dein/lua/nvim-yati/hook.lua:28: in function 'hook_new_line'
<09>...nvim/dein/.cache/init.vim/.dein/lua/nvim-yati/indent.lua:145: in function 'get_indent_for_tree'
<09>...nvim/dein/.cache/init.vim/.dein/lua/nvim-yati/indent.lua:322: in function <...nvim/dein/.cache/init.vim/.dein/lua/nvim-yati/indent.lua:303> function: builtin#18 .../nvim/dein/.cache/init.vim/.dein/lua/nvim-yati/utils.lua:100: bad argument #1 to 'find' (string expected, got nil)

https://github.com/yioneko/nvim-yati/blob/d3a898e5afd079e1586fe39a45899bf706dfbd12/lua/nvim-yati/utils.lua#L100

yioneko commented 2 years ago

Should be fixed and please reopen it if you encounter this issue again.