nvim-treesitter-refactor icon indicating copy to clipboard operation
nvim-treesitter-refactor copied to clipboard

not working with "which key"?

Open jsomedon opened this issue 2 years ago • 2 comments

Describe the bug I have installed both this plugin and which key and I followed example configuration of both plugins on readme. I don't see this plugin's key hint showing up on which key prompt. For example, key hint for things like grr for smart renaming and gnd for goto definition are not showing up on key press. I think my which key config works fine because other mappings from other plugins are all working as expected.

To Reproduce Install both plugin and follow readme to config them.

Expected behavior Pressing relevant key should give me which key prompt.

Output of :checkhealth nvim_treesitter

nvim_treesitter: health#nvim_treesitter#check

Installation

  • OK: tree-sitter found 0.20.6 (parser generator, only needed for :TSInstallFromGrammar)
  • OK: node found v17.9.0 (only needed for :TSInstallFromGrammar)
  • OK: git executable found.
  • OK: cc executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" } Version: Apple clang version 13.1.6 (clang-1316.0.21.2.3)
  • OK: Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.

Parser/Features H L F I J

  • rust ✓ ✓ ✓ ✓ ✓
  • lua ✓ ✓ ✓ ✓ ✓

Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections +) multiple parsers found, only one will be used x) errors found in the query, try to run :TSUpdate {lang}

Output of nvim --version

nvim --version
NVIM v0.7.0
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by [email protected]

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

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

Run :checkhealth for more info

Additional context Add any other context about the problem here.

jsomedon avatar Apr 18 '22 01:04 jsomedon

I think you need to register those mapping on your own https://github.com/folke/which-key.nvim#-setup, nvim-treesitter-rafactor creates the mappings for you using the neovim api. Or if that plugin makes use of list from :map, then you should check that the mapping is correctly set with :map grr

stsewd avatar May 02 '22 21:05 stsewd

I get the definitions this plugins adds in whic-key without problem. Which key is able to read vim definitions, and if they have a description it shows that value, which helps a lot in readability

danielo515 avatar Aug 25 '22 09:08 danielo515