added a keymap to toggel the chat buffer for code companion <leader>mt. I think I will make the letter m from normal mode the conduit into code companion keymaps since it was unoccupied

This commit is contained in:
lowell 2025-02-23 21:34:00 -05:00
parent bdcdcc11ea
commit 98a9cab64b
3 changed files with 25 additions and 3 deletions

View File

@ -8,6 +8,9 @@ vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
-- For conciseness -- For conciseness
local opts = { noremap = true, silent = true } local opts = { noremap = true, silent = true }
-- This is for CodeCompanion Plugin. I will move this later
vim.keymap.set('n', '<leader>mt', ':CodeCompanionChat Toggle<CR>', opts)
-- save file -- save file
vim.keymap.set('n', '<C-s>', '<cmd> w <CR>', opts) vim.keymap.set('n', '<C-s>', '<cmd> w <CR>', opts)

View File

@ -5,6 +5,9 @@ return {
'nvim-treesitter/nvim-treesitter', 'nvim-treesitter/nvim-treesitter',
}, },
config = { config = {
-- keymaps = {
--
-- }
prompt_library = { prompt_library = {
['prompt2prompt'] = { ['prompt2prompt'] = {
strategy = 'chat', strategy = 'chat',
@ -22,6 +25,22 @@ return {
}, },
}, },
adapters = { adapters = {
codellama = function()
return require('codecompanion.adapters').extend('ollama', {
name = 'codellama', -- Give this adapter a different name to differentiate it from the default ollama adapter
schema = {
model = {
default = 'codellama',
},
-- num_ctx = {
-- default = 16384,
-- },
-- num_predict = {
-- default = -1,
-- },
},
})
end,
llama3 = function() llama3 = function()
return require('codecompanion.adapters').extend('ollama', { return require('codecompanion.adapters').extend('ollama', {
name = 'llama3', -- Give this adapter a different name to differentiate it from the default ollama adapter name = 'llama3', -- Give this adapter a different name to differentiate it from the default ollama adapter
@ -57,10 +76,10 @@ return {
}, },
strategies = { strategies = {
chat = { chat = {
adapter = 'deepseekr1', adapter = 'codellama',
}, },
inline = { inline = {
adapter = 'deepseekr1', adapter = 'codellama',
}, },
}, },
}, },

View File

@ -6,7 +6,7 @@ return {
-- Example config in lua -- Example config in lua
vim.g.nord_contrast = true vim.g.nord_contrast = true
vim.g.nord_borders = false vim.g.nord_borders = false
vim.g.nord_disable_background = true vim.g.nord_disable_background = false
vim.g.nord_italic = false vim.g.nord_italic = false
vim.g.nord_uniform_diff_background = true vim.g.nord_uniform_diff_background = true
vim.g.nord_bold = false vim.g.nord_bold = false