Comments (4)
I had the same issue. The workaround I came up with was just calling the config function when loading the textobjects instead of treesitter.
from nvim-treesitter-textobjects.
I ended calling:
require "nvim-treesitter-textobjects"
before
require("nvim-treesitter.configs").setup {}
inside config.treesitter
Not sure it is the best option but it works at least.
from nvim-treesitter-textobjects.
I moved loading the config to the textobjects section and it worked for me.
use {
'nvim-treesitter/nvim-treesitter',
requires = {
{
'nvim-treesitter/nvim-treesitter-textobjects',
after = 'nvim-treesitter',
config = function() require('settings.treesitter') end,
},
},
-- initially the config setting was here.
run = ':TSUpdate',
event = { 'BufRead', 'BufNewFile', 'InsertEnter' },
}
It's not ideal, but the mappings are applied at the right time.
from nvim-treesitter-textobjects.
Yeah. Both workarounds are fine. I don't think there is more to discuss.
from nvim-treesitter-textobjects.
Related Issues (20)
- Nim parser fails at compiling and installs incorrectly HOT 7
- error on perl files HOT 1
- Rust @function.outer breaks with indentation HOT 1
- Swap Keymaps Not Being Used in TypeScript, Javascript, or Ruby Buffers HOT 4
- Allow multiple queries for `select` to increase configurability
- Richer Nix queries
- after nvim-treesitter/nvim-treesitter#6024, `nvim-treesitter-textobject` started showing errors HOT 1
- Scope locals not correct for lua files
- The `move` function is very slow on some large cpp files HOT 2
- Add `set_jumps` option to `select` module
- Delete @function.outer deletes more than it should HOT 3
- Errors on Fennel files; need to update queries HOT 1
- nvim-treesitter.textobjects.repeatable_move is not found HOT 1
- Built in textobjects table is hard to read
- Assignment operator do not exist for c/cpp HOT 12
- Select Mode Keymaps appear broken HOT 2
- @inner.block @outer.block makes no sense in C I believe HOT 2
- Operator pending linewise mode override not observed for motions
- Extra text objects for latex: environments, maths, and sections HOT 1
- example "scope" ]s mapping seemingly does nothing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvim-treesitter-textobjects.