|
|
|
@ -285,7 +285,7 @@ vim.o.completeopt = 'menuone,noselect'
|
|
|
|
|
vim.o.termguicolors = true
|
|
|
|
|
|
|
|
|
|
-- [[ Basic Keymaps ]]
|
|
|
|
|
|
|
|
|
|
-- Save with Control + s
|
|
|
|
|
vim.keymap.set('n', '<C-s>', ':w<CR>', { silent = true })
|
|
|
|
|
vim.keymap.set('n', '<C-b>', ':Neotree toggle<CR>', { desc = 'Toggle Tree', silent = true })
|
|
|
|
|
-- Keymaps for better default experience
|
|
|
|
@ -313,8 +313,8 @@ require('telescope').setup {
|
|
|
|
|
defaults = {
|
|
|
|
|
mappings = {
|
|
|
|
|
i = {
|
|
|
|
|
['<C-u>'] = false,
|
|
|
|
|
['<C-d>'] = false,
|
|
|
|
|
['<C-u>'] = false,
|
|
|
|
|
['<C-d>'] = false,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
@ -366,41 +366,41 @@ require('nvim-treesitter.configs').setup {
|
|
|
|
|
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
|
|
|
|
|
keymaps = {
|
|
|
|
|
-- You can use the capture groups defined in textobjects.scm
|
|
|
|
|
['aa'] = '@parameter.outer',
|
|
|
|
|
['ia'] = '@parameter.inner',
|
|
|
|
|
['af'] = '@function.outer',
|
|
|
|
|
['if'] = '@function.inner',
|
|
|
|
|
['ac'] = '@class.outer',
|
|
|
|
|
['ic'] = '@class.inner',
|
|
|
|
|
['aa'] = '@parameter.outer',
|
|
|
|
|
['ia'] = '@parameter.inner',
|
|
|
|
|
['af'] = '@function.outer',
|
|
|
|
|
['if'] = '@function.inner',
|
|
|
|
|
['ac'] = '@class.outer',
|
|
|
|
|
['ic'] = '@class.inner',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
move = {
|
|
|
|
|
enable = true,
|
|
|
|
|
set_jumps = true, -- whether to set jumps in the jumplist
|
|
|
|
|
goto_next_start = {
|
|
|
|
|
[']m'] = '@function.outer',
|
|
|
|
|
[']]'] = '@class.outer',
|
|
|
|
|
[']m'] = '@function.outer',
|
|
|
|
|
[']]'] = '@class.outer',
|
|
|
|
|
},
|
|
|
|
|
goto_next_end = {
|
|
|
|
|
[']M'] = '@function.outer',
|
|
|
|
|
[']['] = '@class.outer',
|
|
|
|
|
[']M'] = '@function.outer',
|
|
|
|
|
[']['] = '@class.outer',
|
|
|
|
|
},
|
|
|
|
|
goto_previous_start = {
|
|
|
|
|
['[m'] = '@function.outer',
|
|
|
|
|
['[['] = '@class.outer',
|
|
|
|
|
['[m'] = '@function.outer',
|
|
|
|
|
['[['] = '@class.outer',
|
|
|
|
|
},
|
|
|
|
|
goto_previous_end = {
|
|
|
|
|
['[M'] = '@function.outer',
|
|
|
|
|
['[]'] = '@class.outer',
|
|
|
|
|
['[M'] = '@function.outer',
|
|
|
|
|
['[]'] = '@class.outer',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
swap = {
|
|
|
|
|
enable = true,
|
|
|
|
|
swap_next = {
|
|
|
|
|
['<leader>a'] = '@parameter.inner',
|
|
|
|
|
['<leader>a'] = '@parameter.inner',
|
|
|
|
|
},
|
|
|
|
|
swap_previous = {
|
|
|
|
|
['<leader>A'] = '@parameter.inner',
|
|
|
|
|
['<leader>A'] = '@parameter.inner',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
@ -518,14 +518,14 @@ cmp.setup {
|
|
|
|
|
end,
|
|
|
|
|
},
|
|
|
|
|
mapping = cmp.mapping.preset.insert {
|
|
|
|
|
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
|
|
|
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
|
|
|
|
['<C-Space>'] = cmp.mapping.complete {},
|
|
|
|
|
['<CR>'] = cmp.mapping.confirm {
|
|
|
|
|
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
|
|
|
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
|
|
|
|
['<C-Space>'] = cmp.mapping.complete {},
|
|
|
|
|
['<CR>'] = cmp.mapping.confirm {
|
|
|
|
|
behavior = cmp.ConfirmBehavior.Replace,
|
|
|
|
|
select = true,
|
|
|
|
|
},
|
|
|
|
|
['<Tab>'] = cmp.mapping(function(fallback)
|
|
|
|
|
['<Tab>'] = cmp.mapping(function(fallback)
|
|
|
|
|
if cmp.visible() then
|
|
|
|
|
cmp.select_next_item()
|
|
|
|
|
elseif luasnip.expand_or_jumpable() then
|
|
|
|
@ -534,7 +534,7 @@ cmp.setup {
|
|
|
|
|
fallback()
|
|
|
|
|
end
|
|
|
|
|
end, { 'i', 's' }),
|
|
|
|
|
['<S-Tab>'] = cmp.mapping(function(fallback)
|
|
|
|
|
['<S-Tab>'] = cmp.mapping(function(fallback)
|
|
|
|
|
if cmp.visible() then
|
|
|
|
|
cmp.select_prev_item()
|
|
|
|
|
elseif luasnip.jumpable(-1) then
|
|
|
|
|