summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/user/plugins/treesitter.lua
diff options
context:
space:
mode:
authorcafebabe <77344710+yuzu-eva@users.noreply.github.com>2022-05-21 23:33:01 +0200
committercafebabe <77344710+yuzu-eva@users.noreply.github.com>2022-05-21 23:33:01 +0200
commit16d566da938b049dda8998beec43e3cd85c4ed47 (patch)
treee138daaf0e6496f2f72659766f54544cda9c1245 /.config/nvim/lua/user/plugins/treesitter.lua
parent5825759403e9f316c03c771f64a89ac89547b4de (diff)
Add nvim configuration
Diffstat (limited to '.config/nvim/lua/user/plugins/treesitter.lua')
-rw-r--r--.config/nvim/lua/user/plugins/treesitter.lua30
1 files changed, 30 insertions, 0 deletions
diff --git a/.config/nvim/lua/user/plugins/treesitter.lua b/.config/nvim/lua/user/plugins/treesitter.lua
new file mode 100644
index 0000000..44cf008
--- /dev/null
+++ b/.config/nvim/lua/user/plugins/treesitter.lua
@@ -0,0 +1,30 @@
+require('nvim-treesitter.configs').setup {
+ indent = {
+ enable = true,
+ },
+ highlight = {
+ enable = true,
+ disable = { 'NvimTree' },
+ additional_vim_regex_highlighting = true,
+ },
+ textobjects = {
+ select = {
+ enable = true,
+ lookahead = true,
+ keymaps = {
+ ['ia'] = '@parameter.inner',
+ -- ['aa'] = {
+ -- php = "" '@parameter.outer',
+
+ -- python = "(function_definition) @function",
+ -- cpp = "(function_definition) @function",
+ -- c = "(function_definition) @function",
+ -- java = "(method_declaration) @function",
+ -- },
+ },
+ },
+ },
+ context_commentstring = {
+ enable = true,
+ },
+}