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

Make keybindings configurable #40

Closed
tmerse opened this issue Jan 29, 2025 · 2 comments
Closed

Make keybindings configurable #40

tmerse opened this issue Jan 29, 2025 · 2 comments

Comments

@tmerse
Copy link

tmerse commented Jan 29, 2025

The hardcoded keybindings may clash with other plugins that make use of e.g. <TAB> like autocompletion plugins (blink, cmp, etc.).

A nice solution would be to make those hardcoded keybindings configurable

inoremap <buffer> <Tab>   <C-O>:call llama#fim_accept('full')<CR>
inoremap <buffer> <S-Tab> <C-O>:call llama#fim_accept('line')<CR>
inoremap <buffer> <C-B>   <C-O>:call llama#fim_accept('word')<CR>

...

silent! iunmap <buffer> <Tab>
silent! iunmap <buffer> <S-Tab>
silent! iunmap <buffer> <Esc>

In addition a mechanism that does not overwrite the original behavior of e.g. <TAB>, respecting existing bindings should help. For example, a new <TAB> binding could pass-through to the existing binding and only trigger the llama completion if there are completion candidates.

@ggerganov
Copy link
Member

Seems related to #34

@tmerse
Copy link
Author

tmerse commented Jan 30, 2025

Seems related to #34

Thank you very much, I missed that.

@tmerse tmerse closed this as completed Jan 30, 2025
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

2 participants