config
This commit is contained in:
parent
49a2c15d1d
commit
af22c7ff32
7 changed files with 83 additions and 6 deletions
|
|
@ -1,4 +1,3 @@
|
|||
-- [[ Basic Keymaps ]]
|
||||
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
||||
vim.keymap.set('n', '<leader>h', '<cmd>nohlsearch<CR>')
|
||||
vim.keymap.set('i', 'jj', '<Esc>')
|
||||
|
|
|
|||
2
lua/custom/macros.lua
Normal file
2
lua/custom/macros.lua
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
-- console.log("cursor: , cursor)
|
||||
vim.fn.setreg('l', 'yiwoconsole.log("jjpa:" , jjpa);jj')
|
||||
|
|
@ -37,7 +37,7 @@ vim.opt.smartcase = true
|
|||
vim.opt.signcolumn = 'yes'
|
||||
|
||||
-- Decrease update time
|
||||
vim.opt.updatetime = 250
|
||||
vim.opt.updatetime = 50
|
||||
|
||||
-- Decrease mapped sequence wait time
|
||||
vim.opt.timeoutlen = 300
|
||||
|
|
@ -65,3 +65,25 @@ vim.opt.scrolloff = 10
|
|||
-- instead raise a dialog asking if you wish to save the current file(s)
|
||||
-- See `:help 'confirm'`
|
||||
vim.opt.confirm = true
|
||||
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
-- set to 0 becouse of empty line
|
||||
vim.opt.cmdheight = 0
|
||||
|
||||
-- set cmd height when entering command mode
|
||||
vim.api.nvim_command 'autocmd CmdlineEnter * set cmdheight=1'
|
||||
vim.api.nvim_command 'autocmd CmdlineLeave * set cmdheight=0'
|
||||
vim.api.nvim_command 'autocmd RecordingEnter * set cmdheight=1'
|
||||
vim.api.nvim_command 'autocmd RecordingLeave * set cmdheight=0'
|
||||
|
||||
-- auto resize screen
|
||||
-- Create an autocommand group for auto resizing
|
||||
vim.api.nvim_create_augroup('autoequalize', { clear = true })
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'VimEnter', 'VimResized' }, {
|
||||
callback = function()
|
||||
vim.cmd 'wincmd ='
|
||||
end,
|
||||
group = 'autoequalize',
|
||||
})
|
||||
|
|
@ -8,7 +8,7 @@ return {
|
|||
provider = 'openai',
|
||||
openai = {
|
||||
endpoint = 'https://api.openai.com/v1',
|
||||
model = 'gpt-4o-mini', -- your desired model (or use gpt-4o, etc.)
|
||||
model = 'gpt-4o', -- your desired model (or use gpt-4o, etc.)
|
||||
timeout = 30000, -- Timeout in milliseconds, increase this for reasoning models
|
||||
temperature = 0,
|
||||
max_completion_tokens = 8192, -- Increase this to include reasoning tokens (for reasoning models)
|
||||
|
|
|
|||
45
lua/custom/plugins/harpoon.lua
Normal file
45
lua/custom/plugins/harpoon.lua
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
return {
|
||||
'ThePrimeagen/harpoon',
|
||||
branch = 'harpoon2',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
config = function()
|
||||
local harpoon = require 'harpoon'
|
||||
|
||||
-- REQUIRED
|
||||
harpoon:setup()
|
||||
-- REQUIRED
|
||||
|
||||
vim.keymap.set('n', '<leader>oa', function()
|
||||
harpoon:list():add()
|
||||
end, { desc = 'Add File' })
|
||||
|
||||
vim.keymap.set('n', '<leader>oi', function()
|
||||
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||
end, { desc = 'Open L[I]st' })
|
||||
|
||||
vim.keymap.set('n', '<leader>1', function()
|
||||
harpoon:list():select(1)
|
||||
end, { desc = 'Select [1]' })
|
||||
|
||||
vim.keymap.set('n', '<leader>2', function()
|
||||
harpoon:list():select(2)
|
||||
end, { desc = 'Select [2]' })
|
||||
|
||||
vim.keymap.set('n', '<leader>3', function()
|
||||
harpoon:list():select(3)
|
||||
end, { desc = 'Select [3]' })
|
||||
|
||||
vim.keymap.set('n', '<leader>4', function()
|
||||
harpoon:list():select(4)
|
||||
end, { desc = 'Select [4]' })
|
||||
|
||||
-- Toggle previous & next buffers stored within Harpoon list
|
||||
vim.keymap.set('n', '<leader>oj', function()
|
||||
harpoon:list():prev()
|
||||
end, { desc = 'Previus File' })
|
||||
|
||||
vim.keymap.set('n', '<leader>ok', function()
|
||||
harpoon:list():next()
|
||||
end, { desc = 'Next File' })
|
||||
end,
|
||||
}
|
||||
|
|
@ -14,6 +14,7 @@ return {
|
|||
},
|
||||
-------------------------------------UTILS-------------------------------------
|
||||
require 'custom.plugins.avante',
|
||||
-- i use this so i can comment in TS components etc
|
||||
'JoosepAlviste/nvim-ts-context-commentstring',
|
||||
{
|
||||
'numToStr/Comment.nvim',
|
||||
|
|
@ -59,7 +60,7 @@ return {
|
|||
'<leader>y',
|
||||
mode = { 'n', 'v' },
|
||||
'<cmd>Yazi<cr>',
|
||||
desc = 'Open yazi at the current file',
|
||||
desc = 'Open [Y]azi at the current file',
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue