Skip to content

Commit

Permalink
do not parse mappings with lua implementations (#233)
Browse files Browse the repository at this point in the history
Co-authored-by: burnettk <[email protected]>
  • Loading branch information
burnettk and burnettk authored May 31, 2023
1 parent c0eb7a6 commit 9157338
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions autoload/which_key/mappings.vim
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ function! which_key#mappings#parse(key, dict, visual) " {{{
endif

for line in lines
" filter out lines like: n <Space>ca *@<Lua 129: /opt/homebrew/Cellar/neovim/0.9.0/share/nvim/runtime/lua/vim/lsp/buf.lua:758>
" we're not going to get anything useful to display from the rhs of these anyway
if line =~? '<Lua '
continue
endif

let mapd = maparg(split(line[3:])[0], line[0], 0, 1)
if empty(mapd) || mapd.lhs =~? '<Plug>.*' || mapd.lhs =~? '<SNR>.*'
continue
Expand Down

0 comments on commit 9157338

Please sign in to comment.