Update config

This commit is contained in:
Karolis Arbačiauskas 2025-03-09 18:56:07 +02:00
parent de76eeffc4
commit 9678e43efe
9 changed files with 128 additions and 11 deletions

View file

@ -2,11 +2,6 @@
-- I promise not to create any merge conflicts in this directory :)
--
-- See the kickstart.nvim README for more information
vim.api.nvim_create_autocmd({ 'FocusGained', 'BufEnter' }, { command = 'checktime' })
vim.api.nvim_create_user_command('DeleteOtherBuffers', function()
require('snacks').bufdelete.other()
end, { desc = 'Delete Other Buffers' })
-- Resizing windows
vim.keymap.set('n', '<A-h>', '<C-w>5<', { desc = 'Decrease window width' })

View file

@ -16,7 +16,6 @@ return {
}
end,
keys = {
-- { '=', '<cmd>Oil<cr>', mode = 'n', desc = 'Open Filesystem' },
{ '-', '<cmd>Oil --float<cr>', mode = 'n', desc = 'Open Floating Filesystem' },
},
}

View file

@ -0,0 +1,29 @@
return {
'rgroli/other.nvim',
lazy = false,
config = function()
require('other-nvim').setup {
mappings = {
'golang',
{ pattern = '/app/(.*)/(.*).rb', target = { { context = 'test', target = '/spec/%1/%2_spec.rb' } } },
{ pattern = '(.+)/spec/(.*)/(.*)_spec.rb', target = { { target = '%1/app/%2/%3.rb' } } },
},
}
end,
keys = {
{
'<leader>to',
function()
require('other-nvim').open()
end,
mode = 'n',
},
{
'<leader>tO',
function()
require('other-nvim').openVSplit()
end,
mode = 'n',
},
},
}

View file

@ -1,13 +1,14 @@
vim.api.nvim_create_user_command('DeleteOtherBuffers', function()
require('snacks').bufdelete.other()
end, { desc = 'Delete Other Buffers' })
return {
'folke/snacks.nvim',
---@diagnostic disable-next-line: undefined-doc-name
---@type snacks.Config
opts = {
lazygit = {
-- your lazygit configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
},
lazygit = {},
gitbrowse = {},
},
keys = {
{
@ -33,5 +34,12 @@ return {
},
{ '<leader>gb', '<cmd>Gitsigns blame<cr>', desc = 'Git blame' },
{ '<leader>gs', '<cmd>Telescope git_status<CR>', desc = 'Git Status' },
{
'<leader>go',
function()
Snacks.gitbrowse()
end,
desc = 'Git Browse',
},
},
}