mirror of
https://github.com/He4eT/dotfiles.git
synced 2026-05-04 23:47:23 +00:00
nvim: inline treesitter config
This commit is contained in:
parent
bac27b5539
commit
92eee842b1
1 changed files with 75 additions and 75 deletions
136
nvim/init.lua
136
nvim/init.lua
|
|
@ -347,74 +347,7 @@ require('lazy').setup({
|
|||
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||
},
|
||||
build = ':TSUpdate',
|
||||
},
|
||||
{
|
||||
'nomnivore/ollama.nvim',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
},
|
||||
cmd = { 'Ollama', 'OllamaModel' },
|
||||
keys = {
|
||||
{
|
||||
'<leader>j',
|
||||
':Ollama<CR>',
|
||||
desc = 'Ollama Menu',
|
||||
mode = { 'v' },
|
||||
},
|
||||
{
|
||||
'<leader>j',
|
||||
":lua require('ollama').prompt('Generate_Code')<cr>",
|
||||
desc = 'Ollama Code Generation',
|
||||
mode = { 'n' },
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
model = 'mistral',
|
||||
url = 'http://ollama.internal:11434', -- see /etc/hosts
|
||||
prompts = {
|
||||
Ask_About_Code = false,
|
||||
Simplify_Code = false,
|
||||
Improve_Text = {
|
||||
prompt = 'Make this text simple and readable. Respond with improved version of this text: ```$sel```',
|
||||
extract = false,
|
||||
action = 'replace',
|
||||
},
|
||||
Modify_Text = {
|
||||
prompt = 'Modify this text in the following way: $input\n\n' .. '```$sel```',
|
||||
extract = false,
|
||||
action = 'replace',
|
||||
},
|
||||
Use_selection_as_prompt = {
|
||||
prompt = '$sel',
|
||||
extract = false,
|
||||
action = 'replace',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}, {
|
||||
-- Lazy options
|
||||
ui = {
|
||||
size = { width = 0.85, height = 0.7 },
|
||||
border = 'solid',
|
||||
icons = {
|
||||
cmd = '[cmd]',
|
||||
config = '[cfg]',
|
||||
event = '[e]',
|
||||
ft = '[ft]',
|
||||
init = '[init]',
|
||||
keys = '[key]',
|
||||
plugin = '[plugin]',
|
||||
runtime = '[rt]',
|
||||
source = '[src]',
|
||||
start = '[active]',
|
||||
task = '[task]',
|
||||
lazy = '[lazy]',
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- [[ Configure Treesitter ]]
|
||||
config = function ()
|
||||
-- See `:help nvim-treesitter`
|
||||
require('nvim-treesitter.configs').setup {
|
||||
-- Add languages to be installed here that you want installed for treesitter
|
||||
|
|
@ -488,6 +421,73 @@ require('nvim-treesitter.configs').setup {
|
|||
},
|
||||
},
|
||||
}
|
||||
end
|
||||
},
|
||||
{
|
||||
'nomnivore/ollama.nvim',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
},
|
||||
cmd = { 'Ollama', 'OllamaModel' },
|
||||
keys = {
|
||||
{
|
||||
'<leader>j',
|
||||
':Ollama<CR>',
|
||||
desc = 'Ollama Menu',
|
||||
mode = { 'v' },
|
||||
},
|
||||
{
|
||||
'<leader>j',
|
||||
":lua require('ollama').prompt('Generate_Code')<cr>",
|
||||
desc = 'Ollama Code Generation',
|
||||
mode = { 'n' },
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
model = 'mistral',
|
||||
url = 'http://ollama.internal:11434', -- see /etc/hosts
|
||||
prompts = {
|
||||
Ask_About_Code = false,
|
||||
Simplify_Code = false,
|
||||
Improve_Text = {
|
||||
prompt = 'Make this text simple and readable. Respond with improved version of this text: ```$sel```',
|
||||
extract = false,
|
||||
action = 'replace',
|
||||
},
|
||||
Modify_Text = {
|
||||
prompt = 'Modify this text in the following way: $input\n\n' .. '```$sel```',
|
||||
extract = false,
|
||||
action = 'replace',
|
||||
},
|
||||
Use_selection_as_prompt = {
|
||||
prompt = '$sel',
|
||||
extract = false,
|
||||
action = 'replace',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}, {
|
||||
-- Lazy options
|
||||
ui = {
|
||||
size = { width = 0.85, height = 0.7 },
|
||||
border = 'solid',
|
||||
icons = {
|
||||
cmd = '[cmd]',
|
||||
config = '[cfg]',
|
||||
event = '[e]',
|
||||
ft = '[ft]',
|
||||
init = '[init]',
|
||||
keys = '[key]',
|
||||
plugin = '[plugin]',
|
||||
runtime = '[rt]',
|
||||
source = '[src]',
|
||||
start = '[active]',
|
||||
task = '[task]',
|
||||
lazy = '[lazy]',
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- [[ LSP settings ]]
|
||||
-- This function gets run when an LSP connects to a particular buffer.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue