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:
Stephan Seitz 2020-08-29 11:37:26 +02:00 committed by Thomas Vigouroux
parent 6352cdc943
commit bc36521967
3 changed files with 19 additions and 7 deletions

View file

@ -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