Compare commits
2 Commits
29c6bf2107
...
f59fbc09d2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f59fbc09d2 | ||
|
|
99609a2471 |
8
init.lua
8
init.lua
@@ -591,13 +591,13 @@ require('lazy').setup({
|
|||||||
-- Accept ([y]es) the completion.
|
-- Accept ([y]es) the completion.
|
||||||
-- This will auto-import if your LSP supports it.
|
-- This will auto-import if your LSP supports it.
|
||||||
-- This will expand snippets if the LSP sent a snippet.
|
-- 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,
|
-- If you prefer more traditional completion keymaps,
|
||||||
-- you can uncomment the following lines
|
-- you can uncomment the following lines
|
||||||
--['<CR>'] = cmp.mapping.confirm { select = true },
|
['<CR>'] = cmp.mapping.confirm { select = true },
|
||||||
--['<Tab>'] = cmp.mapping.select_next_item(),
|
-- ['<Tab>'] = cmp.mapping.select_next_item(),
|
||||||
--['<S-Tab>'] = cmp.mapping.select_prev_item(),
|
-- ['<S-Tab>'] = cmp.mapping.select_prev_item(),
|
||||||
|
|
||||||
-- Manually trigger a completion from nvim-cmp.
|
-- Manually trigger a completion from nvim-cmp.
|
||||||
-- Generally you don't need this, because nvim-cmp will display
|
-- Generally you don't need this, because nvim-cmp will display
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ return {
|
|||||||
handler_opts = {
|
handler_opts = {
|
||||||
border = 'rounded',
|
border = 'rounded',
|
||||||
},
|
},
|
||||||
|
toggle_key = '<C-k>',
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
require('lsp_signature').setup(opts)
|
require('lsp_signature').setup(opts)
|
||||||
|
|||||||
46
lua/custom/plugins/neoscroll.lua
Normal file
46
lua/custom/plugins/neoscroll.lua
Normal 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,
|
||||||
|
}
|
||||||
@@ -94,8 +94,8 @@ return {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
|
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
|
||||||
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
|
-- dap.listeners.before.event_terminated['dapui_config'] = dapui.close
|
||||||
dap.listeners.before.event_exited['dapui_config'] = dapui.close
|
-- dap.listeners.before.event_exited['dapui_config'] = dapui.close
|
||||||
|
|
||||||
-- Install golang specific config
|
-- Install golang specific config
|
||||||
require('dap-go').setup {
|
require('dap-go').setup {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ return {
|
|||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
filesystem = {
|
filesystem = {
|
||||||
|
hijack_netrw_behavior = 'open_default',
|
||||||
window = {
|
window = {
|
||||||
mappings = {
|
mappings = {
|
||||||
['\\'] = 'close_window',
|
['\\'] = 'close_window',
|
||||||
@@ -30,6 +31,7 @@ return {
|
|||||||
|
|
||||||
window = {
|
window = {
|
||||||
mappings = {
|
mappings = {
|
||||||
|
['<C-v>'] = 'open_vsplit',
|
||||||
['Y'] = function(state)
|
['Y'] = function(state)
|
||||||
local node = state.tree:get_node()
|
local node = state.tree:get_node()
|
||||||
local filepath = node:get_id()
|
local filepath = node:get_id()
|
||||||
@@ -37,8 +39,8 @@ return {
|
|||||||
|
|
||||||
local results = {
|
local results = {
|
||||||
vim.fn.fnamemodify(filepath, ':.'),
|
vim.fn.fnamemodify(filepath, ':.'),
|
||||||
filename,
|
|
||||||
filepath,
|
filepath,
|
||||||
|
filename,
|
||||||
}
|
}
|
||||||
|
|
||||||
local i = vim.fn.inputlist {
|
local i = vim.fn.inputlist {
|
||||||
|
|||||||
Reference in New Issue
Block a user