mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-09 15:00:04 -04:00
feat(refactor.navigation): allow a fallback_function for goto_definition
`fallback_function` is called when nvim-treesitter can not resolve the variable under the cursor.
This commit is contained in:
parent
6352cdc943
commit
bc36521967
3 changed files with 19 additions and 7 deletions
|
|
@ -184,9 +184,10 @@ EOF
|
|||
## Refactor: navigation
|
||||
|
||||
Provides "go to definition" for the symbol under the cursor,
|
||||
and lists the definitions from the current file.
|
||||
goto_next_usage/goto_previous_usage go to the next usage of the
|
||||
identifier under the cursor.
|
||||
and lists the definitions from the current file. If you use
|
||||
`goto_definition_lsp_fallback` instead of `goto_definition` in the config below
|
||||
`vim.lsp.buf.definition` is used if nvim-treesitter can not resolve the variable.
|
||||
`goto_next_usage`/`goto_previous_usage` go to the next usage of the identifier under the cursor.
|
||||
|
||||
|
||||
```lua
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue