summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-12-06 01:29:46 +0100
committerThomas Voss <mail@thomasvoss.com> 2023-12-06 01:29:46 +0100
commitd9f33332f52a60130325a5d16785ee9577647d42 (patch)
tree2a99547016ba8f3fb141111a7047b9024863f7eb
parent25af166931e7d37e5989f0cdedeb982654e53c35 (diff)
nvim: Add treesitter-context
-rw-r--r--.config/nvim/after/plugin/treesitter-context.lua7
-rw-r--r--.config/nvim/lua/mango/packer.lua3
2 files changed, 10 insertions, 0 deletions
diff --git a/.config/nvim/after/plugin/treesitter-context.lua b/.config/nvim/after/plugin/treesitter-context.lua
new file mode 100644
index 0000000..c1c342f
--- /dev/null
+++ b/.config/nvim/after/plugin/treesitter-context.lua
@@ -0,0 +1,7 @@
+require('treesitter-context').setup {
+ enable = true,
+ max_lines = 1,
+ line_numbers = true,
+ trim_scope = 'inner',
+ mode = 'cursor',
+}
diff --git a/.config/nvim/lua/mango/packer.lua b/.config/nvim/lua/mango/packer.lua
index 36ca598..8b5c583 100644
--- a/.config/nvim/lua/mango/packer.lua
+++ b/.config/nvim/lua/mango/packer.lua
@@ -53,4 +53,7 @@ return require('packer').startup(function(use)
{ 'saadparwaiz1/cmp_luasnip' },
},
}
+
+ -- Function context
+ use 'nvim-treesitter/nvim-treesitter-context'
end)