diff --git a/7.-Contoh-Custom-Plugins.md b/7.-Contoh-Custom-Plugins.md index 684bd02..6c6e35c 100644 --- a/7.-Contoh-Custom-Plugins.md +++ b/7.-Contoh-Custom-Plugins.md @@ -1452,4 +1452,35 @@ return { ``` Sumber :
https://github.com/folke/noice.nvim
-https://github.com/hrsh7th/cmp-cmdline \ No newline at end of file +https://github.com/hrsh7th/cmp-cmdline + +# nvim-treesitter-context +- but file lua/plugin/context.lua +```lua +return { + { + "romgrk/nvim-treesitter-context", + event = "BufRead", + config = function() + require("treesitter-context").setup({ + enable = true, -- Enable this plugin (Can be enabled/disabled later via commands) + throttle = true, -- Throttles plugin updates (may improve performance) + max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit. + patterns = { -- Match patterns for TS nodes. These get wrapped to match at word boundaries. + -- For all filetypes + -- Note that setting an entry here replaces all other patterns for this entry. + -- By setting the 'default' entry below, you can control which nodes you want to + -- appear in the context window. + default = { + "class", + "function", + "method", + }, + }, + }) + end, + }, +} +``` +Sumber :
+https://github.com/nvim-treesitter/nvim-treesitter-context \ No newline at end of file