Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keybind is not working when open multiple buffers (nvchad) #26

Open
phamngocquy opened this issue Dec 30, 2024 · 0 comments
Open

keybind is not working when open multiple buffers (nvchad) #26

phamngocquy opened this issue Dec 30, 2024 · 0 comments

Comments

@phamngocquy
Copy link

phamngocquy commented Dec 30, 2024

I'm using nvchad + tabby-nvim and realize a problem while open multiple buffers:
open nvim with first buffer opened:
Screenshot 2024-12-30 at 14 46 33
when open new buffer:
Screenshot 2024-12-30 at 14 46 51

After checking around I see that, the function tabby#inline_completion#keybindings#Setup is just initilized when open fisrt buffer.

function! tabby#inline_completion#Install()
  call tabby#inline_completion#events#Install()
  call tabby#inline_completion#keybindings#Setup()
  call tabby#inline_completion#virtual_text#Setup()
endfunction

sulution here is create an autocmd

function! tabby#inline_completion#Setup()
  augroup tabby_inline_completion_events
    autocmd!
    autocmd User tabby_lsp_on_buffer_attached call tabby#inline_completion#Install()
  augroup end
  autocmd BufNewFile,BufRead * call tabby#inline_completion#keybindings#Setup()
endfunction

I have created pull request here: #26
Noted: I'm quite new in lua and nvim plugin, please help to review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant