adding some remamps
This commit is contained in:
parent
2c711d36a7
commit
5e922b7ef5
70
init.lua
70
init.lua
|
|
@ -419,15 +419,38 @@ require('lazy').setup({
|
||||||
pickers = {
|
pickers = {
|
||||||
find_files = {
|
find_files = {
|
||||||
hidden = true,
|
hidden = true,
|
||||||
|
-- Include .env.local files even if they're gitignored
|
||||||
|
find_command = {
|
||||||
|
'rg', '--files', '--hidden', '--no-ignore-vcs',
|
||||||
|
'--glob', '!.git/*',
|
||||||
|
'--glob', '!node_modules/*',
|
||||||
|
'--glob', '!.next/*',
|
||||||
|
'--glob', '!dist/*',
|
||||||
|
'--glob', '!build/*',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
live_grep = {
|
live_grep = {
|
||||||
additional_args = function()
|
additional_args = function()
|
||||||
return { '--hidden' }
|
return {
|
||||||
|
'--hidden', '--no-ignore-vcs',
|
||||||
|
'--glob', '!.git/*',
|
||||||
|
'--glob', '!node_modules/*',
|
||||||
|
'--glob', '!.next/*',
|
||||||
|
'--glob', '!dist/*',
|
||||||
|
'--glob', '!build/*',
|
||||||
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
grep_string = {
|
grep_string = {
|
||||||
additional_args = function()
|
additional_args = function()
|
||||||
return { '--hidden' }
|
return {
|
||||||
|
'--hidden', '--no-ignore-vcs',
|
||||||
|
'--glob', '!.git/*',
|
||||||
|
'--glob', '!node_modules/*',
|
||||||
|
'--glob', '!.next/*',
|
||||||
|
'--glob', '!dist/*',
|
||||||
|
'--glob', '!build/*',
|
||||||
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -1032,10 +1055,13 @@ require('lazy').setup({
|
||||||
{ -- Highlight, edit, and navigate code
|
{ -- Highlight, edit, and navigate code
|
||||||
'nvim-treesitter/nvim-treesitter',
|
'nvim-treesitter/nvim-treesitter',
|
||||||
build = ':TSUpdate',
|
build = ':TSUpdate',
|
||||||
|
dependencies = {
|
||||||
|
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||||
|
},
|
||||||
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
|
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
|
||||||
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
||||||
opts = {
|
opts = {
|
||||||
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
|
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc', 'vue', 'javascript', 'typescript', 'css' },
|
||||||
-- Autoinstall languages that are not installed
|
-- Autoinstall languages that are not installed
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
highlight = {
|
highlight = {
|
||||||
|
|
@ -1046,6 +1072,44 @@ require('lazy').setup({
|
||||||
additional_vim_regex_highlighting = { 'ruby' },
|
additional_vim_regex_highlighting = { 'ruby' },
|
||||||
},
|
},
|
||||||
indent = { enable = true, disable = { 'ruby' } },
|
indent = { enable = true, disable = { 'ruby' } },
|
||||||
|
textobjects = {
|
||||||
|
select = {
|
||||||
|
enable = true,
|
||||||
|
lookahead = true, -- Automatically jump forward to textobj
|
||||||
|
keymaps = {
|
||||||
|
['af'] = '@function.outer',
|
||||||
|
['if'] = '@function.inner',
|
||||||
|
['ac'] = '@class.outer',
|
||||||
|
['ic'] = '@class.inner',
|
||||||
|
['aa'] = '@parameter.outer',
|
||||||
|
['ia'] = '@parameter.inner',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
move = {
|
||||||
|
enable = true,
|
||||||
|
set_jumps = true, -- Add to jumplist
|
||||||
|
goto_next_start = {
|
||||||
|
[']m'] = '@function.outer',
|
||||||
|
[']c'] = '@class.outer',
|
||||||
|
[']a'] = '@parameter.inner',
|
||||||
|
},
|
||||||
|
goto_next_end = {
|
||||||
|
[']M'] = '@function.outer',
|
||||||
|
[']C'] = '@class.outer',
|
||||||
|
[']A'] = '@parameter.inner',
|
||||||
|
},
|
||||||
|
goto_previous_start = {
|
||||||
|
['[m'] = '@function.outer',
|
||||||
|
['[c'] = '@class.outer',
|
||||||
|
['[a'] = '@parameter.inner',
|
||||||
|
},
|
||||||
|
goto_previous_end = {
|
||||||
|
['[M'] = '@function.outer',
|
||||||
|
['[C'] = '@class.outer',
|
||||||
|
['[A'] = '@parameter.inner',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
-- There are additional nvim-treesitter modules that you can use to interact
|
-- There are additional nvim-treesitter modules that you can use to interact
|
||||||
-- with nvim-treesitter. You should go explore a few and see what interests you:
|
-- with nvim-treesitter. You should go explore a few and see what interests you:
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,10 @@ vim.keymap.set('n', '<leader>mr', '<cmd>CellularAutomaton make_it_rain<CR>')
|
||||||
|
|
||||||
vim.keymap.set('n', '<leader>sf', ':source $HOME/.config/nvim/init.lua <CR>', { desc = 'Source Neovim config' })
|
vim.keymap.set('n', '<leader>sf', ':source $HOME/.config/nvim/init.lua <CR>', { desc = 'Source Neovim config' })
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader><leader>', function()
|
||||||
|
vim.cmd 'so'
|
||||||
|
end)
|
||||||
|
|
||||||
-- Jump to beginning/end of method
|
-- Jump to beginning/end of method
|
||||||
vim.keymap.set('n', '[m', '[m', { desc = 'Jump to beginning of method' })
|
vim.keymap.set('n', '[m', '[m', { desc = 'Jump to beginning of method' })
|
||||||
vim.keymap.set('n', ']m', ']m', { desc = 'Jump to end of method' })
|
vim.keymap.set('n', ']m', ']m', { desc = 'Jump to end of method' })
|
||||||
|
|
|
||||||
|
|
@ -34,12 +34,11 @@ return {
|
||||||
harpoon:list():select(4)
|
harpoon:list():select(4)
|
||||||
end, { desc = 'Harpoon: Go to file 4' })
|
end, { desc = 'Harpoon: Go to file 4' })
|
||||||
|
|
||||||
-- Navigate to previous & next buffers in the list
|
vim.keymap.set('n', '<leader>hp', function()
|
||||||
vim.keymap.set('n', '<C-S-P>', function()
|
|
||||||
harpoon:list():prev()
|
harpoon:list():prev()
|
||||||
end, { desc = 'Harpoon: Previous buffer' })
|
end, { desc = 'Harpoon: Previous buffer' })
|
||||||
|
|
||||||
vim.keymap.set('n', '<C-S-N>', function()
|
vim.keymap.set('n', '<leader>hn', function()
|
||||||
harpoon:list():next()
|
harpoon:list():next()
|
||||||
end, { desc = 'Harpoon: Next buffer' })
|
end, { desc = 'Harpoon: Next buffer' })
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue