Skip to content

I want to set a callback to run after the execute #24

@yuki-yano

Description

@yuki-yano

When I use hrargs.nvim it highlights where I used the argument, but it remains highlighted when I run treehopper's nodes.
https://github.com/m-demare/hlargs.nvim

CleanShot 2022-08-31 at 15 32 07

I have disabled hlargs when using treehopper for fold, but there is no way to enable it after the move.
Is it possible to issue a User event after completion or pass a callback when treehopper runs?

" current settings
function! s:tree_hopper_fold() abort
  lua require('hlargs').disable()
  lua require('tsht').nodes()
  normal! zf
endfunction
nmap <silent> zf <Cmd>call <SID>tree_hopper_fold()<CR>

" I want to do this setup.
autocmd User TreeHopperEnter lua require('hlargs').disable()
autocmd User TreeHopperLeave lua require('hlargs').enable()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions