NVIM: Local AI Plugin added, updates to existing plugins

- gen.nvim to use local ollama LLM
- New _required_ DAP dependency: nvim-nio
- nvim-ufo: breaking change adapted
This commit is contained in:
Pratik Tripathy
2024-03-25 22:28:17 +05:30
parent b7be385529
commit 903d3a1253
3 changed files with 7 additions and 5 deletions

View File

@@ -2,10 +2,10 @@ return {
{ {
"David-Kunz/gen.nvim", "David-Kunz/gen.nvim",
opts = { opts = {
model = "mistral", -- The default model to use. model = "mistral:instruct", -- The default model to use.
host = "localhost", -- The host running the Ollama service. host = "127.0.0.1", -- The host running the Ollama service.
port = "11434", -- The port on which the Ollama service is listening. port = "11434", -- The port on which the Ollama service is listening.
display_mode = "float", -- The display mode. Can be "float" or "split". display_mode = "split", -- The display mode. Can be "float" or "split".
show_prompt = true, -- Shows the Prompt submitted to Ollama. show_prompt = true, -- Shows the Prompt submitted to Ollama.
show_model = true, -- Displays which model you are using at the beginning of your chat session. show_model = true, -- Displays which model you are using at the beginning of your chat session.
quit_map = "q", -- set keymap for quit quit_map = "q", -- set keymap for quit
@@ -25,7 +25,8 @@ return {
debug = false, -- Prints errors and the command which is run. debug = false, -- Prints errors and the command which is run.
}, },
keys = { keys = {
{ "<leader>]", "<cmd>Gen<cr>", desc = "AI Prompt", mode = { "n", "v" } }, { "<leader>[", ":Gen<cr>", desc = "AI Prompt", mode = { "n" } },
{ "<leader>]", ":'<,'>Gen<cr>", desc = "Contextual AI Prompt", mode = { "v" } },
}, },
}, },
} }

View File

@@ -6,6 +6,7 @@ return {
dependencies = { dependencies = {
-- Creates a beautiful debugger UI -- Creates a beautiful debugger UI
"rcarriga/nvim-dap-ui", "rcarriga/nvim-dap-ui",
"nvim-neotest/nvim-nio",
-- Installs the debug adapters for you -- Installs the debug adapters for you
"williamboman/mason.nvim", "williamboman/mason.nvim",

View File

@@ -49,7 +49,7 @@ return {
return { "treesitter", "indent" } return { "treesitter", "indent" }
end, end,
open_fold_hl_timeout = 0, open_fold_hl_timeout = 0,
close_fold_kinds = { "imports", "comment" }, close_fold_kinds_for_ft = { "imports", "comment" },
fold_virt_text_handler = function(virtText, lnum, endLnum, width, truncate) fold_virt_text_handler = function(virtText, lnum, endLnum, width, truncate)
local newVirtText = {} local newVirtText = {}
local totalLines = vim.api.nvim_buf_line_count(0) local totalLines = vim.api.nvim_buf_line_count(0)