Nvim: add back codecompanion and add replace (Subvert)
This commit is contained in:
48
.config/nvim/lua/plugins/codecompanion.lua
Normal file
48
.config/nvim/lua/plugins/codecompanion.lua
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
return {
|
||||||
|
"olimorris/codecompanion.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
strategies = {
|
||||||
|
-- Change the default chat adapter
|
||||||
|
chat = {
|
||||||
|
adapter = "ollama",
|
||||||
|
},
|
||||||
|
inline = {
|
||||||
|
adapter = "ollama",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
adapters = {
|
||||||
|
ollama = function()
|
||||||
|
return require("codecompanion.adapters").extend("ollama", {
|
||||||
|
name = "qwen2.5-coder:latest",
|
||||||
|
env = {
|
||||||
|
url = "http://192.168.10.99:11434",
|
||||||
|
api_key = "OLLAMA_API_KEY",
|
||||||
|
},
|
||||||
|
headers = {
|
||||||
|
["Content-Type"] = "application/json",
|
||||||
|
["Authorization"] = "Bearer ${api_key}",
|
||||||
|
},
|
||||||
|
parameters = {
|
||||||
|
sync = true,
|
||||||
|
},
|
||||||
|
schema = {
|
||||||
|
model = {
|
||||||
|
default = "qwen2.5-coder:latest",
|
||||||
|
},
|
||||||
|
num_ctx = {
|
||||||
|
default = 16384,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
-- Set debug logging
|
||||||
|
log_level = "DEBUG",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
3
.config/nvim/lua/plugins/replace.lua
Normal file
3
.config/nvim/lua/plugins/replace.lua
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
return {
|
||||||
|
'tpope/vim-abolish'
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user