nvim-treesitter / nvim-treesitter-refactor

Refactor module for nvim-treesitter
Apache License 2.0
407 stars 25 forks source link

Function `index_of` does not exist #46

Closed benjamineskola closed 1 year ago

benjamineskola commented 1 year ago

Describe the bug

When using the * key to jump to the next occurrence of the word I get the following error:

E5108: Error executing lua ...ter-refactor/lua/nvim-treesitter-refactor/navigation.lua:156: attempt to call field 'index_of' (a nil value)
stack traceback:
        ...ter-refactor/lua/nvim-treesitter-refactor/navigation.lua:156: in function 'goto_next_usage'
        [string ":lua"]:1: in main chunk
Press ENTER or type command to continue

It looks like that function was removed in 853b1ab39.

To Reproduce Steps to reproduce the behavior:

  1. Press *

Expected behavior Jump to the next occurrence of the word under the cursor.

Output of :checkhealth nvim_treesitter

1 2 vim.treesitter: require("vim.treesitter.health").check() 3 ======================================================================== 4 - INFO: Runtime ABI version : 14 5 - OK: Loaded parser for c: ABI version 13 6 - OK: Loaded parser for help: ABI version 14 7 - OK: Loaded parser for lua: ABI version 13 8 - OK: Loaded parser for vim: ABI version 14

Output of nvim --version


NVIM v0.8.3
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@Ventura-arm64.local

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.8.3/share/nvim"

Run :checkhealth for more info```

**Additional context**
Add any other context about the problem here.