added ollama integration

This commit is contained in:
topper3418 2024-07-13 09:44:15 -05:00
parent 5d5dcabad7
commit 96add0cf96
4 changed files with 47 additions and 24 deletions

View file

@ -1,23 +0,0 @@
-- You can add your own plugins here or in other files in this directory!
-- I promise not to create any merge conflicts in this directory :)
--
-- See the kickstart.nvim README for more information
return {
{
'nvim-tree/nvim-tree.lua',
opts = {
sort = {
sorter = 'case_sensitive',
},
view = {
width = 30,
},
renderer = {
group_empty = true,
},
filters = {
dotfiles = true,
},
},
},
}

View file

@ -0,0 +1,7 @@
return {
'stevearc/oil.nvim',
opts = {},
-- Optional dependencies
dependencies = { 'echasnovski/mini.icons' },
-- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if prefer nvim-web-devicons
}

View file

@ -0,0 +1,32 @@
return {
'nomnivore/ollama.nvim',
dependencies = {
'nvim-lua/plenary.nvim',
},
-- All the user commands added by the plugin
cmd = { 'Ollama', 'OllamaModel', 'OllamaServe', 'OllamaServeStop' },
keys = {
-- Sample keybind for prompt menu. Note that the <c-u> is important for selections to work properly.
{
'<leader>oo',
":<c-u>lua require('ollama').prompt()<cr>",
desc = 'ollama prompt',
mode = { 'n', 'v' },
},
-- Sample keybind for direct prompting. Note that the <c-u> is important for selections to work properly.
{
'<leader>oG',
":<c-u>lua require('ollama').prompt('Generate_Code')<cr>",
desc = 'ollama Generate Code',
mode = { 'n', 'v' },
},
},
---@type Ollama.Config
opts = {
-- your configuration overrides
},
}