added ollama integration
This commit is contained in:
parent
5d5dcabad7
commit
96add0cf96
9
init.lua
9
init.lua
|
@ -239,7 +239,9 @@ require('lazy').setup({
|
||||||
|
|
||||||
-- "gc" to comment visual regions/lines
|
-- "gc" to comment visual regions/lines
|
||||||
{ 'numToStr/Comment.nvim', opts = {} },
|
{ 'numToStr/Comment.nvim', opts = {} },
|
||||||
--
|
-- dependency for lots of plugins
|
||||||
|
'nvim-tree/nvim-web-devicons',
|
||||||
|
-- default kickstart plugins
|
||||||
require 'kickstart.plugins.gitsigns',
|
require 'kickstart.plugins.gitsigns',
|
||||||
require 'kickstart.plugins.which_key',
|
require 'kickstart.plugins.which_key',
|
||||||
require 'kickstart.plugins.telescope',
|
require 'kickstart.plugins.telescope',
|
||||||
|
@ -247,6 +249,10 @@ require('lazy').setup({
|
||||||
require 'kickstart.plugins.conform',
|
require 'kickstart.plugins.conform',
|
||||||
require 'kickstart.plugins.cmp',
|
require 'kickstart.plugins.cmp',
|
||||||
require 'kickstart.plugins.kanagawa',
|
require 'kickstart.plugins.kanagawa',
|
||||||
|
-- ollama integration
|
||||||
|
require 'custom.plugins.ollama',
|
||||||
|
-- oil, a file explorer
|
||||||
|
require 'custom.plugins.oil',
|
||||||
-- Highlight todo, notes, etc in comments
|
-- Highlight todo, notes, etc in comments
|
||||||
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
|
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
|
||||||
|
|
||||||
|
@ -352,5 +358,6 @@ vim.api.nvim_set_hl(0, 'Normal', { bg = 'none' })
|
||||||
vim.api.nvim_set_hl(0, 'NormalFloat', { bg = 'none' })
|
vim.api.nvim_set_hl(0, 'NormalFloat', { bg = 'none' })
|
||||||
|
|
||||||
vim.keymap.set('n', '<leader>dt', ':DocsViewToggle<enter>', { desc = 'Toggle Documentation' })
|
vim.keymap.set('n', '<leader>dt', ':DocsViewToggle<enter>', { desc = 'Toggle Documentation' })
|
||||||
|
vim.keymap.set('n', '-', '<CMD>Oil<CR>', { desc = 'Open parent directory' })
|
||||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||||
-- vim: ts=2 sts=2 sw=2 et
|
-- vim: ts=2 sts=2 sw=2 et
|
||||||
|
|
|
@ -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,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -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
|
||||||
|
}
|
|
@ -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
|
||||||
|
},
|
||||||
|
}
|
Loading…
Reference in New Issue