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"]
|
[submodule "src/.local/share/nvim/site/pack/3pp/start/nvim-treesitter"]
|
||||||
path = 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
|
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
|
# error/warning/info box
|
||||||
# coding.lua
|
# coding.lua
|
||||||
|
@ -33,7 +33,7 @@ vim.api.nvim_create_autocmd(
|
|||||||
-- plug: nvim-treesitter
|
-- plug: nvim-treesitter
|
||||||
------
|
------
|
||||||
require 'nvim-treesitter.configs'.setup {
|
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,
|
sync_install = false,
|
||||||
auto_install = false,
|
auto_install = false,
|
||||||
highlight = {
|
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
|
-- diagnostics box
|
||||||
@ -56,8 +75,8 @@ require 'nvim-treesitter.configs'.setup {
|
|||||||
------
|
------
|
||||||
require('trouble').setup({
|
require('trouble').setup({
|
||||||
icons = false,
|
icons = false,
|
||||||
fold_open = "v", -- icon used for open folds
|
fold_open = "v", -- icon used for open folds
|
||||||
fold_closed = ">", -- icon used for closed folds
|
fold_closed = ">", -- icon used for closed folds
|
||||||
indent_lines = false, -- add an indent guide below the fold icons
|
indent_lines = false, -- add an indent guide below the fold icons
|
||||||
signs = {
|
signs = {
|
||||||
-- icons / text used for a diagnostic
|
-- icons / text used for a diagnostic
|
||||||
@ -140,7 +159,7 @@ local servers = {
|
|||||||
},
|
},
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
-- get it to stop complaining about luasnip
|
-- get it to stop complaining about luasnip
|
||||||
globals = {'s', 'f', 't', "fmt", "c", "sn", "i", "rep", "d", "k", "events"},
|
globals = { 's', 'f', 't', "fmt", "c", "sn", "i", "rep", "d", "k", "events" },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
Subproject commit f5183cea0fda26126e22e789382c208e7b1120f4
|
Loading…
Reference in New Issue
Block a user