Skip to content

Commit

Permalink
bootstrap avante
Browse files Browse the repository at this point in the history
  • Loading branch information
fedemengo committed Nov 25, 2024
1 parent e05da67 commit 6e3d6ef
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
21 changes: 21 additions & 0 deletions fnl/mods/dev/avante.fnl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
(module mods.dev.avante {autoload {avante :avante
api :avante.api
avante_lib :avante_lib}})

(avante_lib.load)

(local config {:provider "ollama"
:vendors {:ollama {:__inherited_from "openai"
:api_key_name ""
:endpoint "http://harlie:11434/v1"
:model "codellama:13b"}}})
(avante.setup config)

(map [:n :v] :<C-a>a (bindf api.ask) {:desc "Open avante sidebar"})
(map [:n :v] :<C-a>f (bindf api.ask {:floating true}) {:desc "Open floating prompt"})
(map [:n] :<C-a>e (bindf api.edit) {:desc "Edit current selection"})
(map [:n] :<C-a>r (bindf api.refresh) {:desc "Refresh sidebar"})
(map [:n] :<C-a>p (bindf api.switch_provider) {:desc "Switch AI provider"})
(map [:n] :<C-a>g (bindf api.get_suggestion) {:desc "Get current suggestion"})
(map [:n] :<C-a>b (bindf api.build) {:desc "Build avante"})
(map [:n] :<C-a>F (bindf api.focus) {:desc "Focus sidebar/code/input"})
3 changes: 3 additions & 0 deletions fnl/mods/ui/render-markdown.fnl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(module mods.dev.copilot {autoload {render-markdown :render-markdown}})

(render-markdown.setup {:file_types [:markdown :Avante]})
9 changes: 9 additions & 0 deletions fnl/plugins.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@
; :event :InsertEnter
; :mod :dev.copilot}
;:zbirenbaum/copilot-cmp {:mod :dev.copilot_cmp}
:MeanderingProgrammer/render-markdown.nvim {:mod :ui.render-markdown}
:yetone/avante.nvim {:requires [[:nvim-treesitter/nvim-treesitter]
[:stevearc/dressing.nvim]
[:nvim-lua/plenary.nvim]
[:MunifTanjim/nui.nvim]
[:nvim-tree/nvim-web-devicons]]
:run :make
:mod :dev.avante}

;; dev
:stevearc/profile.nvim {:mod :dev.profile}
:ruifm/gitlinker.nvim {:requires [[:nvim-lua/plenary.nvim]] :mod :dev.gitlinker}
Expand Down

0 comments on commit 6e3d6ef

Please sign in to comment.