fix: Changing nvim git shortcuts and general cleanup

This commit is contained in:
Finch 2025-04-21 06:12:19 -05:00
parent e72b5fff60
commit 34de0cfe23
8 changed files with 29 additions and 41 deletions

View File

@ -3,10 +3,3 @@ vim.api.nvim_create_user_command('FindAndReplace', function(opts)
-- TODO: Does not close the buffers opened through changes -- TODO: Does not close the buffers opened through changes
vim.api.nvim_command(string.format('cdo s/%s/%s/g', opts.fargs[1], opts.fargs[2]) .. '| update | cclose') vim.api.nvim_command(string.format('cdo s/%s/%s/g', opts.fargs[1], opts.fargs[2]) .. '| update | cclose')
end, { nargs = '*' }) end, { nargs = '*' })
vim.api.nvim_set_keymap(
'n',
'<leader>ir',
':FindAndReplace ',
{ noremap = true }
)

View File

@ -29,19 +29,20 @@ return {
end) end)
-- Actions -- Actions
map('n', '<leader>hs', gitsigns.stage_hunk) map('n', '<leader>gs', gitsigns.stage_hunk)
map('n', '<leader>hr', gitsigns.reset_hunk) map('n', '<leader>gu', gitsigns.undo_stage_hunk)
map('v', '<leader>hs', function() gitsigns.stage_hunk {vim.fn.line('.'), vim.fn.line('v')} end) map('n', '<leader>gr', gitsigns.reset_hunk)
map('v', '<leader>hr', function() gitsigns.reset_hunk {vim.fn.line('.'), vim.fn.line('v')} end) map('v', '<leader>gs', function() gitsigns.stage_hunk {vim.fn.line('.'), vim.fn.line('v')} end)
map('n', '<leader>hS', gitsigns.stage_buffer) map('v', '<leader>gu', function() gitsigns.undo_stage_hunk {vim.fn.line('.'), vim.fn.line('v')} end)
map('n', '<leader>hu', gitsigns.undo_stage_hunk) map('v', '<leader>gr', function() gitsigns.reset_hunk {vim.fn.line('.'), vim.fn.line('v')} end)
map('n', '<leader>hR', gitsigns.reset_buffer) map('n', '<leader>gS', gitsigns.stage_buffer)
map('n', '<leader>hp', gitsigns.preview_hunk) map('n', '<leader>gR', gitsigns.reset_buffer)
map('n', '<leader>hb', function() gitsigns.blame_line{full=true} end) map('n', '<leader>gp', gitsigns.preview_hunk)
map('n', '<leader>tb', gitsigns.toggle_current_line_blame) map('n', '<leader>gb', function() gitsigns.blame_line{full=true} end)
map('n', '<leader>hd', gitsigns.diffthis) map('n', '<leader>gtb', gitsigns.toggle_current_line_blame)
map('n', '<leader>hD', function() gitsigns.diffthis('~') end) map('n', '<leader>gd', gitsigns.diffthis)
map('n', '<leader>td', gitsigns.toggle_deleted) map('n', '<leader>gD', function() gitsigns.diffthis('~') end)
map('n', '<leader>gtd', gitsigns.toggle_deleted)
-- Text object -- Text object
map({'o', 'x'}, 'ih', ':<C-U>Gitsigns select_hunk<CR>') map({'o', 'x'}, 'ih', ':<C-U>Gitsigns select_hunk<CR>')

View File

@ -1,11 +1,6 @@
return { return {
-- 'ellisonleao/gruvbox.nvim',
'sainnhe/gruvbox-material', 'sainnhe/gruvbox-material',
config = function() config = function()
-- require('gruvbox').setup({
-- contrast = 'hard',
-- })
-- vim.cmd([[colorscheme gruvbox]])
vim.g.gruvbox_material_enable_italic = true vim.g.gruvbox_material_enable_italic = true
vim.g.gruvbox_material_background = 'hard' vim.g.gruvbox_material_background = 'hard'
vim.cmd.colorscheme('gruvbox-material') vim.cmd.colorscheme('gruvbox-material')

View File

@ -44,18 +44,17 @@ return {
'ansiblels', 'ansiblels',
'arduino_language_server', 'arduino_language_server',
'bashls', 'bashls',
'clangd', 'clangd', -- C/C++
-- 'hadolint', -- Dockerfile linting -- 'hadolint', -- Dockerfile linting
'intelephense', 'intelephense', -- PHP
-- 'jdtls', -- java 'jdtls', -- java
'lua_ls', 'lua_ls',
'marksman', -- markdown 'marksman', -- markdown
-- 'prettier', -- 'prettier',
'pylsp', 'pylsp',
'rust_analyzer', 'rust_analyzer',
-- 'snyk', -- 'snyk_ls',
'ts_ls', -- Typscript 'ts_ls', -- Typscript
-- 'volar', -- Vue
'yamlls', 'yamlls',
} }
} }
@ -114,7 +113,8 @@ return {
pylsp = { pylsp = {
plugins = { plugins = {
pycodestyle = { pycodestyle = {
ignore = {'E501'} ignore = {'E501'},
maxLineLength = 120
} }
} }
} }
@ -128,14 +128,7 @@ return {
flags = { flags = {
debounce_text_changes = 100, debounce_text_changes = 100,
} }
} },
-- ['gdshader_lsp'] = function()
-- lspconfig.gdshader_lsp.setup {
-- capabilities = capabilities,
-- on_attach = on_attach,
-- }
-- end,
} }
end, end,
dependencies = { dependencies = {

View File

@ -23,6 +23,7 @@ return {
if num_selections > 1 then if num_selections > 1 then
actions.send_selected_to_qflist(prompt_bufnr) actions.send_selected_to_qflist(prompt_bufnr)
actions.open_qflist() actions.open_qflist()
print(action_state.get_current_picker(prompt_bufnr))
else else
actions.file_edit(prompt_bufnr) actions.file_edit(prompt_bufnr)
end end
@ -38,6 +39,7 @@ return {
'.webp$', '.webp$',
'.uproject$', '.uproject$',
'-workspace$', '-workspace$',
'node_modules',
}, },
layout_config = { prompt_position = 'top' }, layout_config = { prompt_position = 'top' },
layout_strategy = 'horizontal', layout_strategy = 'horizontal',

View File

@ -11,6 +11,7 @@ return {
'c_sharp', 'c_sharp',
'comment', 'comment',
'css', 'css',
'gdscript',
'gitignore', 'gitignore',
'html', 'html',
'java', 'java',
@ -43,5 +44,5 @@ return {
-- require('nvim-treesitter.install').prefer_git = true -- require('nvim-treesitter.install').prefer_git = true
-- TSUpdate -- TSUpdate
end, end,
lazy = false, -- lazy = false,
} }

3
test.json Normal file
View File

@ -0,0 +1,3 @@
{
"test_key": "AOjVpTKShHk/GNvUltiWHtCyEJplup2nMmdl8/L2Aao="
}

View File

@ -16,7 +16,7 @@ set-option -g prefix C-Space
bind \\ split-window -h -c "#{pane_current_path}" bind \\ split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}" bind - split-window -v -c "#{pane_current_path}"
bind -n C-M-\\ split-window -h -c "#{pane_current_path}" bind -n C-M-\\ split-window -h -c "#{pane_current_path}"
bind -n C-M-- split-window -v -c "#{pane_current_path}" bind -n C-M-_ split-window -v -c "#{pane_current_path}"
unbind '"' unbind '"'
unbind % unbind %