Skip to content

Commit

Permalink
feat(completion): Add vim-tabby (#904)
Browse files Browse the repository at this point in the history
* initial setup for Tabby

* remove unnecessary

* add config function to initialize parameters

* Update lua/astrocommunity/completion/tabby-nvim/README.md

* Update lua/astrocommunity/completion/tabby-nvim/init.lua

* fix init.lua, update README

* fix up

* fix README

* set completion key to <C-e>, update README

* set node path to system binary

Co-authored-by: Uzair Aftab <[email protected]>

* move init to astrocore

Co-authored-by: Micah Halter <[email protected]>

* add "User AstroFile" event

* Apply suggestions from code review

* disable lazy loading

---------

Co-authored-by: Uzair Aftab <[email protected]>
Co-authored-by: luxus <[email protected]>
Co-authored-by: Micah Halter <[email protected]>
  • Loading branch information
4 people authored Apr 24, 2024
1 parent e7f1e11 commit 93b0b67
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lua/astrocommunity/completion/tabby-nvim/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# tabby-nvim

Tabby is a self-hosted AI coding assistant that can suggest multi-line code or full functions in real-time.

**Repository:** <https://github.com/TabbyML/vim-tabby>

### Default Mappings

| Mappings | Action |
|------------|-------------------|
| `<C-e>` | Accept completion |
| `Ctrl + \` | Trigger/Dismiss |

## Known Conflicts

- Tabby internally utilizes the `<C-R><C-O>` command to insert the completion. If you have mapped `<C-R>` to other functions, you won't be able to accept the completion. In such scenarios, you may need to manually modify the function `tabby#Accept()` in [`autoload/tabby.vim`](https://github.com/TabbyML/tabby/tree/main/clients/vim/autoload/tabby.vim).
16 changes: 16 additions & 0 deletions lua/astrocommunity/completion/tabby-nvim/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
return {
"TabbyML/vim-tabby",
lazy = false,
dependencies = {
"AstroNvim/astrocore",
---@type AstroCoreOpts
opts = {
options = {
g = {
tabby_keybinding_accept = "<C-e>",
tabby_keybinding_trigger_or_dismiss = "<C-\\>",
},
},
},
},
}

0 comments on commit 93b0b67

Please sign in to comment.