I cant get move text object to work. #611
Unanswered
Muizzyranking
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I need help with making the move in treesitter text object work. I have tried asking on reddit and my questions was removed multiple times for some reasons i do not know. I have been on it for days and I dont know what is to do. This is my code please help me.
{ "nvim-treesitter/nvim-treesitter", version = false, build = ":TSUpdate", event = { "BufReadPost", "BufNewFile", "BufWritePre", "VeryLazy" }, init = function(plugin) -- PERF: add nvim-treesitter queries to the rtp and it's custom query predicates early -- This is needed because a bunch of plugins no longer `require("nvim-treesitter")`, which -- no longer trigger the **nvim-treesitter** module to be loaded in time. -- Luckily, the only things that those plugins need are the custom queries, which we make available -- during startup. require("lazy.core.loader").add_to_rtp(plugin) require("nvim-treesitter.query_predicates") end, dependencies = { "nvim-treesitter/nvim-treesitter-textobjects", -- init = function() -- -- no need to load the plugin, since we only need its queries -- require("lazy.core.loader").disable_rtp_plugin("nvim-treesitter-textobjects") -- end, "windwp/nvim-ts-autotag", }, opts = { textobjects = { move = { enable = true, goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer" }, goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer" }, goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer" }, goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer" }, }, }, config = function(_, opts) require("nvim-treesitter.configs").setup(opts) end, }Beta Was this translation helpful? Give feedback.
All reactions