nvim: nvim-treesitter-text-objects plugin added
This commit is contained in:
parent
3946138b96
commit
db835d9628
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -48,6 +48,10 @@
|
||||
[submodule "src/.local/share/nvim/site/pack/3pp/start/nvim-treesitter"]
|
||||
path = src/.local/share/nvim/site/pack/3pp/start/nvim-treesitter
|
||||
url = https://github.com/nvim-treesitter/nvim-treesitter.git
|
||||
# intelligent motions based on treesitter
|
||||
[submodule "src/.local/share/nvim/site/pack/3pp/start/nvim-treesitter-textobjects"]
|
||||
path = src/.local/share/nvim/site/pack/3pp/start/nvim-treesitter-textobjects
|
||||
url = https://github.com/nvim-treesitter/nvim-treesitter-textobjects
|
||||
|
||||
# error/warning/info box
|
||||
# coding.lua
|
||||
|
@ -33,7 +33,7 @@ vim.api.nvim_create_autocmd(
|
||||
-- plug: nvim-treesitter
|
||||
------
|
||||
require 'nvim-treesitter.configs'.setup {
|
||||
ensure_installed = { "c", "cpp", "javascript", "typescript", "python", "vim", "fish", "bash" },
|
||||
ensure_installed = { "c", "cpp", "javascript", "typescript", "python", "vim", "fish", "bash", "lua", "rust" },
|
||||
sync_install = false,
|
||||
auto_install = false,
|
||||
highlight = {
|
||||
@ -49,6 +49,25 @@ require 'nvim-treesitter.configs'.setup {
|
||||
},
|
||||
}
|
||||
|
||||
------
|
||||
-- treesitter (language intelligent) motions
|
||||
-- plug: nvim-treesitter-textobjects
|
||||
------
|
||||
require("nvim-treesitter.configs").setup {
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
|
||||
keymaps = {
|
||||
["af"] = "@function.outer",
|
||||
["if"] = "@function.inner",
|
||||
["ac"] = "@class.outer",
|
||||
["ic"] = "@class.inner",
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
------
|
||||
-- diagnostics box
|
||||
|
@ -0,0 +1 @@
|
||||
Subproject commit f5183cea0fda26126e22e789382c208e7b1120f4
|
Loading…
Reference in New Issue
Block a user