From d9f33332f52a60130325a5d16785ee9577647d42 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Wed, 6 Dec 2023 01:29:46 +0100 Subject: nvim: Add treesitter-context --- .config/nvim/after/plugin/treesitter-context.lua | 7 +++++++ .config/nvim/lua/mango/packer.lua | 3 +++ 2 files changed, 10 insertions(+) create mode 100644 .config/nvim/after/plugin/treesitter-context.lua (limited to '.config/nvim') 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) -- cgit v1.2.3