- Remove macOS/Windows clipboard branches, homebrew fzf path from .vimrc - Remove is_macos/is_windows logic from wezterm.lua - Drop scripts/nvim-offline-* and NVIM_OFFLINE plumbing from nvim config - Clean macOS section from .gitignore; simplify .gitattributes to LF-only - Trim README of offline-bundle section
109 lines
2.4 KiB
Lua
109 lines
2.4 KiB
Lua
-- Highlight, edit, and navigate code
|
|
return {
|
|
'nvim-treesitter/nvim-treesitter',
|
|
branch = 'master',
|
|
build = ':TSUpdate',
|
|
main = 'nvim-treesitter.configs',
|
|
dependencies = {
|
|
'nvim-treesitter/nvim-treesitter-textobjects',
|
|
},
|
|
opts = {
|
|
ensure_installed = {
|
|
'angular',
|
|
'lua',
|
|
'python',
|
|
'javascript',
|
|
'typescript',
|
|
'vimdoc',
|
|
'vim',
|
|
'regex',
|
|
'terraform',
|
|
'sql',
|
|
'dockerfile',
|
|
'toml',
|
|
'json',
|
|
'java',
|
|
'groovy',
|
|
'gitignore',
|
|
'graphql',
|
|
'yaml',
|
|
'make',
|
|
'cmake',
|
|
'markdown',
|
|
'markdown_inline',
|
|
'bash',
|
|
'tsx',
|
|
'css',
|
|
'html',
|
|
'rust',
|
|
},
|
|
auto_install = true,
|
|
highlight = { enable = true },
|
|
indent = { enable = true },
|
|
incremental_selection = {
|
|
enable = true,
|
|
keymaps = {
|
|
init_selection = '<c-space>',
|
|
node_incremental = '<c-space>',
|
|
scope_incremental = '<c-s>',
|
|
node_decremental = '<M-space>',
|
|
},
|
|
},
|
|
textobjects = {
|
|
select = {
|
|
enable = true,
|
|
lookahead = true,
|
|
keymaps = {
|
|
['aa'] = '@parameter.outer',
|
|
['ia'] = '@parameter.inner',
|
|
['af'] = '@function.outer',
|
|
['if'] = '@function.inner',
|
|
['ac'] = '@class.outer',
|
|
['ic'] = '@class.inner',
|
|
},
|
|
},
|
|
move = {
|
|
enable = true,
|
|
set_jumps = true,
|
|
goto_next_start = {
|
|
[']m'] = '@function.outer',
|
|
[']]'] = '@class.outer',
|
|
},
|
|
goto_next_end = {
|
|
[']M'] = '@function.outer',
|
|
[']['] = '@class.outer',
|
|
},
|
|
goto_previous_start = {
|
|
['[m'] = '@function.outer',
|
|
['[['] = '@class.outer',
|
|
},
|
|
goto_previous_end = {
|
|
['[M'] = '@function.outer',
|
|
['[]'] = '@class.outer',
|
|
},
|
|
},
|
|
swap = {
|
|
enable = true,
|
|
swap_next = {
|
|
['<leader>a'] = '@parameter.inner',
|
|
},
|
|
swap_previous = {
|
|
['<leader>A'] = '@parameter.inner',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
config = function(_, opts)
|
|
require('nvim-treesitter.configs').setup(opts)
|
|
|
|
-- Register additional file extensions
|
|
vim.filetype.add {
|
|
extension = {
|
|
tf = 'terraform',
|
|
tfvars = 'terraform',
|
|
pipeline = 'groovy',
|
|
multibranch = 'groovy',
|
|
},
|
|
}
|
|
end,
|
|
}
|