Compare commits

...

2 Commits

Author SHA1 Message Date
Natercio Moniz
f59fbc09d2 Added neoscroll for less disoreanting scroll 2025-01-28 12:16:14 +00:00
Natercio Moniz
99609a2471 Minor shortcuta and behaviour tweaks 2025-01-28 12:14:55 +00:00
5 changed files with 56 additions and 7 deletions

View File

@@ -591,13 +591,13 @@ require('lazy').setup({
-- Accept ([y]es) the completion.
-- This will auto-import if your LSP supports it.
-- This will expand snippets if the LSP sent a snippet.
['<C-y>'] = cmp.mapping.confirm { select = true },
-- ['<C-y>'] = cmp.mapping.confirm { select = true },
-- 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(),
['<CR>'] = 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

View File

@@ -8,6 +8,7 @@ return {
handler_opts = {
border = 'rounded',
},
toggle_key = '<C-k>',
},
config = function(_, opts)
require('lsp_signature').setup(opts)

View File

@@ -0,0 +1,46 @@
return {
'karb94/neoscroll.nvim',
config = function()
local neoscroll = require 'neoscroll'
neoscroll.setup {
mappings = {
'<C-u>',
'<C-d>',
'<C-b>',
'<C-f>',
'zt',
'zz',
'zb',
},
easing = 'quadratic',
}
local keymap = {
['<C-u>'] = function()
neoscroll.ctrl_u { duration = 150 }
end,
['<C-d>'] = function()
neoscroll.ctrl_d { duration = 150 }
end,
['<C-b>'] = function()
neoscroll.ctrl_b { duration = 300 }
end,
['<C-f>'] = function()
neoscroll.ctrl_f { duration = 300 }
end,
['zt'] = function()
neoscroll.zt { half_win_duration = 150 }
end,
['zz'] = function()
neoscroll.zz { half_win_duration = 150 }
end,
['zb'] = function()
neoscroll.zb { half_win_duration = 150 }
end,
}
local modes = { 'n', 'v', 'x' }
for key, func in pairs(keymap) do
vim.keymap.set(modes, key, func)
end
end,
}

View File

@@ -94,8 +94,8 @@ return {
}
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
dap.listeners.before.event_exited['dapui_config'] = dapui.close
-- dap.listeners.before.event_terminated['dapui_config'] = dapui.close
-- dap.listeners.before.event_exited['dapui_config'] = dapui.close
-- Install golang specific config
require('dap-go').setup {

View File

@@ -15,6 +15,7 @@ return {
},
opts = {
filesystem = {
hijack_netrw_behavior = 'open_default',
window = {
mappings = {
['\\'] = 'close_window',
@@ -30,6 +31,7 @@ return {
window = {
mappings = {
['<C-v>'] = 'open_vsplit',
['Y'] = function(state)
local node = state.tree:get_node()
local filepath = node:get_id()
@@ -37,8 +39,8 @@ return {
local results = {
vim.fn.fnamemodify(filepath, ':.'),
filename,
filepath,
filename,
}
local i = vim.fn.inputlist {