require('nvim-treesitter.configs').setup {
-- enable markdown will cause crash: https://github.com/nvim-treesitter/nvim-treesitter/issues/602
ensure_installed = wanted_parsers,
highlight = {
enable = true, -- false will disable the whole extension
use_languagetree = false, -- Use this to enable language injection (this is very unstable)
disable = {'elm'},
custom_captures = { -- mapping of user defined captures to highlight groups
-- ["foo.bar"] = "Identifier" -- highlight own capture @foo.bar with highlight group "Identifier", see :h nvim-treesitter-query-extensions
},
},
-- ......
refactor = {
highlight_definitions = {enable = true},
highlight_current_scope = {enable = false},
-- Renames the symbol under the cursor within the current scope (and current file).
smart_rename = {enable = true, keymaps = {smart_rename = 'grr'}},
navigation = {
enable = true,
keymaps = {
goto_definition = 'gnd', -- mapping to go to definition of symbol under cursor
list_definitions = 'gnD', -- mapping to list all definitions in current file
list_definitions_toc = 'gO',
goto_next_usage = '<a-*>',
goto_previous_usage = '<a-#>',
},
},
},
}
Expected behaviorgoto_next_usage works like before.
Output of :checkhealth nvim_treesitter
========================================================================
## Installation
- OK: `git` executable found.
- OK: `cc` executable found.
## lua parser healthcheck
- OK: lua parser found.
- OK: `highlights.scm` found.
- OK: `locals.scm` found.
- OK: `folds.scm` found.
- OK: `indents.scm` found.
## go parser healthcheck
- OK: go parser found.
- OK: `highlights.scm` found.
- OK: `locals.scm` found.
- OK: `folds.scm` found.
- WARNING: No `indents.scm` query found for go
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
## rust parser healthcheck
- OK: rust parser found.
- OK: `highlights.scm` found.
- OK: `locals.scm` found.
- OK: `folds.scm` found.
- WARNING: No `indents.scm` query found for rust
- ADVICE:
- Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
Output of nvim --version
NVIM v0.5.0-dev+1022-g77a6049e0
Additional context
repo & parsers all updated to latest.
Describe the bug
goto_next_usage
not work from several days ago, butgoto_prev_usage
still works.To Reproduce Steps to reproduce the behavior:
'nvim-treesitter/nvim-treesitter', 'nvim-treesitter/nvim-treesitter-textobjects', 'nvim-treesitter/nvim-treesitter-refactor'
Expected behavior
goto_next_usage
works like before.Output of
:checkhealth nvim_treesitter
======================================================================== ## Installation - OK: `git` executable found. - OK: `cc` executable found. ## lua parser healthcheck - OK: lua parser found. - OK: `highlights.scm` found. - OK: `locals.scm` found. - OK: `folds.scm` found. - OK: `indents.scm` found. ## go parser healthcheck - OK: go parser found. - OK: `highlights.scm` found. - OK: `locals.scm` found. - OK: `folds.scm` found. - WARNING: No `indents.scm` query found for go - ADVICE: - Open an issue at https://github.com/nvim-treesitter/nvim-treesitter ## rust parser healthcheck - OK: rust parser found. - OK: `highlights.scm` found. - OK: `locals.scm` found. - OK: `folds.scm` found. - WARNING: No `indents.scm` query found for rust - ADVICE: - Open an issue at https://github.com/nvim-treesitter/nvim-treesitter
Output of
nvim --version
Additional context repo & parsers all updated to latest.