From 93b0b67cbd156636df5d4789bd26c52270671f98 Mon Sep 17 00:00:00 2001 From: PatMulligan <43773168+PatMulligan@users.noreply.github.com> Date: Wed, 24 Apr 2024 01:16:13 -0600 Subject: [PATCH] feat(completion): Add `vim-tabby` (#904) * 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 , update README * set node path to system binary Co-authored-by: Uzair Aftab <48220549+Uzaaft@users.noreply.github.com> * move init to astrocore Co-authored-by: Micah Halter * add "User AstroFile" event * Apply suggestions from code review * disable lazy loading --------- Co-authored-by: Uzair Aftab <48220549+Uzaaft@users.noreply.github.com> Co-authored-by: luxus Co-authored-by: Micah Halter --- .../completion/tabby-nvim/README.md | 16 ++++++++++++++++ .../completion/tabby-nvim/init.lua | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 lua/astrocommunity/completion/tabby-nvim/README.md create mode 100644 lua/astrocommunity/completion/tabby-nvim/init.lua diff --git a/lua/astrocommunity/completion/tabby-nvim/README.md b/lua/astrocommunity/completion/tabby-nvim/README.md new file mode 100644 index 000000000..bc80f0638 --- /dev/null +++ b/lua/astrocommunity/completion/tabby-nvim/README.md @@ -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:** + +### Default Mappings + +| Mappings | Action | +|------------|-------------------| +| `` | Accept completion | +| `Ctrl + \` | Trigger/Dismiss | + +## Known Conflicts + +- Tabby internally utilizes the `` command to insert the completion. If you have mapped `` 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). diff --git a/lua/astrocommunity/completion/tabby-nvim/init.lua b/lua/astrocommunity/completion/tabby-nvim/init.lua new file mode 100644 index 000000000..ce3082d3c --- /dev/null +++ b/lua/astrocommunity/completion/tabby-nvim/init.lua @@ -0,0 +1,16 @@ +return { + "TabbyML/vim-tabby", + lazy = false, + dependencies = { + "AstroNvim/astrocore", + ---@type AstroCoreOpts + opts = { + options = { + g = { + tabby_keybinding_accept = "", + tabby_keybinding_trigger_or_dismiss = "", + }, + }, + }, + }, +}