63 lines
2.1 KiB
Lua
63 lines
2.1 KiB
Lua
require("config.lazy")
|
|
|
|
|
|
vim.opt.number = true
|
|
vim.opt.mouse = ''
|
|
vim.opt.ignorecase = true
|
|
vim.opt.smartcase = true
|
|
vim.opt.tabstop = 4
|
|
vim.opt.shiftwidth = 4
|
|
vim.opt.expandtab = true
|
|
vim.opt.relativenumber = true
|
|
vim.opt.wildmenu = true
|
|
vim.opt.scrolloff = 10
|
|
|
|
vim.g.mapleader = ' '
|
|
|
|
vim.opt.termguicolors = true
|
|
vim.cmd.colorscheme('catppuccin-latte')
|
|
|
|
local builtin = require('telescope.builtin')
|
|
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
|
|
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = 'Telescope live grep' })
|
|
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' })
|
|
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' })
|
|
|
|
require("codecompanion").setup({
|
|
adapters = {
|
|
localLama = function ()
|
|
return require("codecompanion.adapters").extend("ollama", {
|
|
schema = {
|
|
model = {
|
|
default = "qwen2.5-coder:14b"
|
|
}
|
|
}
|
|
})
|
|
end
|
|
},
|
|
strategies = {
|
|
chat = {
|
|
adapter = "localLama",
|
|
},
|
|
inline = {
|
|
adapter = "localLama",
|
|
},
|
|
agent = {
|
|
adapter = "localLama",
|
|
}
|
|
}
|
|
})
|
|
|
|
|
|
require('scrollEOF').setup()
|
|
vim.api.nvim_set_keymap("n", "<C-a>", "<cmd>CodeCompanionActions<cr>", { noremap = true, silent = true })
|
|
vim.api.nvim_set_keymap("v", "<C-a>", "<cmd>CodeCompanionActions<cr>", { noremap = true, silent = true })
|
|
vim.api.nvim_set_keymap("n", "<leader>a", "<cmd>CodeCompanionChat Toggle<cr>", { noremap = true, silent = true })
|
|
vim.api.nvim_set_keymap("v", "<leader>a", "<cmd>CodeCompanionChat Toggle<cr>", { noremap = true, silent = true })
|
|
vim.api.nvim_set_keymap("v", "ga", "<cmd>CodeCompanionChat Add<cr>", { noremap = true, silent = true })
|
|
vim.api.nvim_set_keymap("n", "<leader>n", "<cmd>Neotree toggle<cr>", { noremap = true, silent = true })
|
|
|
|
-- Expand 'cc' into 'CodeCompanion' in the command line
|
|
vim.cmd([[cab cc CodeCompanion]])
|
|
vim.cmd([[cab ccc CodeCompanionChat]])
|
|
|