Compare commits

..

7 Commits

7 changed files with 63 additions and 24 deletions
+3
View File
@@ -8,6 +8,9 @@ vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
-- For conciseness
local opts = { noremap = true, silent = true }
-- This is for CodeCompanion Plugin. I will move this later
vim.keymap.set('n', '<leader><leader>', ':CodeCompanionChat Toggle<CR>', opts)
-- save file
vim.keymap.set('n', '<C-s>', '<cmd> w <CR>', opts)
+21 -20
View File
@@ -97,8 +97,9 @@ return { -- Autocompletion
-- If you prefer more traditional completion keymaps,
-- you can uncomment the following lines
['<CR>'] = cmp.mapping.confirm { select = true },
--['<Tab>'] = cmp.mapping.select_next_item(),
--['<S-Tab>'] = cmp.mapping.select_prev_item(),
-- ['<Tab>'] = cmp.mapping.confirm { select = true },
['<Tab>'] = cmp.mapping.select_next_item(),
['<S-Tab>'] = cmp.mapping.select_prev_item(),
-- Manually trigger a completion from nvim-cmp.
-- Generally you don't need this, because nvim-cmp will display
@@ -127,24 +128,24 @@ return { -- Autocompletion
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
-- Select next/previous item with Tab / Shift + Tab
['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_locally_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end, { 'i', 's' }),
['<S-Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { 'i', 's' }),
-- ['<Tab>'] = cmp.mapping(function(fallback)
-- if cmp.visible() then
-- cmp.select_next_item()
-- elseif luasnip.expand_or_locally_jumpable() then
-- luasnip.expand_or_jump()
-- else
-- fallback()
-- end
-- end, { 'i', 's' }),
-- ['<S-Tab>'] = cmp.mapping(function(fallback)
-- if cmp.visible() then
-- cmp.select_prev_item()
-- elseif luasnip.locally_jumpable(-1) then
-- luasnip.jump(-1)
-- else
-- fallback()
-- end
-- end, { 'i', 's' }),
},
sources = {
{
+33 -2
View File
@@ -5,6 +5,9 @@ return {
'nvim-treesitter/nvim-treesitter',
},
config = {
-- keymaps = {
--
-- }
prompt_library = {
['prompt2prompt'] = {
strategy = 'chat',
@@ -22,6 +25,22 @@ return {
},
},
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()
return require('codecompanion.adapters').extend('ollama', {
name = 'llama3', -- Give this adapter a different name to differentiate it from the default ollama adapter
@@ -38,6 +57,18 @@ return {
},
})
end,
openai = function()
return require('codecompanion.adapters').extend('openai', {
env = {
api_key = os.getenv 'OPEN_API_KEY',
},
schema = {
model = {
default = 'gpt-3.5-turbo',
},
},
})
end,
deepseekr1 = function()
return require('codecompanion.adapters').extend('ollama', {
name = 'deepseekr1', -- Give this adapter a different name to differentiate it from the default ollama adapter
@@ -57,10 +88,10 @@ return {
},
strategies = {
chat = {
adapter = 'deepseekr1',
adapter = 'llama3',
},
inline = {
adapter = 'deepseekr1',
adapter = 'llama3',
},
},
},
+1 -1
View File
@@ -6,7 +6,7 @@ return {
-- Example config in lua
vim.g.nord_contrast = true
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_uniform_diff_background = true
vim.g.nord_bold = false
+4
View File
@@ -162,6 +162,10 @@ return {
-- https://github.com/pmizio/typescript-tools.nvim
--
-- But for many setups, the LSP (`tsserver`) will work just fine
astro = {},
rubocop = {},
rufo = {},
ruby_lsp = {},
tsserver = {},
ruff = {},
pylsp = {
+1 -1
View File
@@ -90,7 +90,7 @@ return {
vim.keymap.set('n', '<leader>sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' })
vim.keymap.set('n', '<leader>sr', builtin.resume, { desc = '[S]earch [R]esume' })
vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
vim.keymap.set('n', '<leader>b', builtin.buffers, { desc = '[ ] Find existing buffers' })
-- Slightly advanced example of overriding default behavior and theme
vim.keymap.set('n', '<leader>/', function()
View File