From 593849cee85a88391dd70c26e1c36687343ec654 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Sat, 19 Aug 2023 04:54:52 -0500 Subject: [PATCH] refactor(nvim): minor treesitter improvements --- .../nvim/lua/plugins/configs/treesitter.lua | 54 ++----------------- 1 file changed, 5 insertions(+), 49 deletions(-) diff --git a/dots/.config/nvim/lua/plugins/configs/treesitter.lua b/dots/.config/nvim/lua/plugins/configs/treesitter.lua index 2832d6fb..b6ad08dd 100644 --- a/dots/.config/nvim/lua/plugins/configs/treesitter.lua +++ b/dots/.config/nvim/lua/plugins/configs/treesitter.lua @@ -98,7 +98,7 @@ return { { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate", - event = { "BufReadPost", "BufNewFile" }, + event = { "BufReadPre", "BufNewFile" }, dependencies = { "nvim-treesitter/playground", { @@ -148,54 +148,10 @@ return { autotag = { enable = true, }, - indent = { enable = true }, - -- textobjects = { - -- select = { - -- enable = true, - -- lookahead = true, - -- disable = function(lang, bufnr) - -- local mode = vim.fn.mode() - -- if mode == "c" then - -- return true - -- end - -- end, - -- keymaps = { - -- ["af"] = "@function.outer", - -- ["if"] = "@function.inner", - -- ["ac"] = "@class.outer", - -- ["ic"] = "@class.inner", - -- ["ib"] = "@block.inner", - -- ["ab"] = "@block.outer", - -- ["as"] = { query = "@scope", query_group = "locals", desc = "Select language scope" }, - -- }, - -- }, - -- move = { - -- enable = true, - -- disable = function(lang, bufnr) - -- local mode = vim.fn.mode() - -- if mode == "c" then - -- return true - -- end - -- end, - -- set_jumps = true, - -- goto_next_start = { - -- ["]fs"] = "@function.outer", - -- ["]bs"] = "@block.outer", - -- }, - -- goto_next_end = { - -- ["]fe"] = "@function.outer", - -- ["]be"] = "@block.outer", - -- }, - -- goto_previous_start = { - -- ["[fs"] = "@function.outer", - -- ["[bs"] = "@block.outer", - -- }, - -- goto_previous_end = { - -- ["[fe"] = "@function.outer", - -- ["[bs"] = "@block.outer", - -- }, - -- }, - -- }, + indent = { + enable = true, + disable = { "lua" }, + }, playground = { enable = true, },