diff --git a/fnl/mods/dev/avante.fnl b/fnl/mods/dev/avante.fnl new file mode 100644 index 0000000..0cf02ea --- /dev/null +++ b/fnl/mods/dev/avante.fnl @@ -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] :a (bindf api.ask) {:desc "Open avante sidebar"}) +(map [:n :v] :f (bindf api.ask {:floating true}) {:desc "Open floating prompt"}) +(map [:n] :e (bindf api.edit) {:desc "Edit current selection"}) +(map [:n] :r (bindf api.refresh) {:desc "Refresh sidebar"}) +(map [:n] :p (bindf api.switch_provider) {:desc "Switch AI provider"}) +(map [:n] :g (bindf api.get_suggestion) {:desc "Get current suggestion"}) +(map [:n] :b (bindf api.build) {:desc "Build avante"}) +(map [:n] :F (bindf api.focus) {:desc "Focus sidebar/code/input"}) diff --git a/fnl/mods/ui/render-markdown.fnl b/fnl/mods/ui/render-markdown.fnl new file mode 100644 index 0000000..4a3dfb4 --- /dev/null +++ b/fnl/mods/ui/render-markdown.fnl @@ -0,0 +1,3 @@ +(module mods.dev.copilot {autoload {render-markdown :render-markdown}}) + +(render-markdown.setup {:file_types [:markdown :Avante]}) diff --git a/fnl/plugins.fnl b/fnl/plugins.fnl index 16667db..cce8cba 100644 --- a/fnl/plugins.fnl +++ b/fnl/plugins.fnl @@ -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}