Tree-sitter quotes tracking
To enable, add enable_quotes = true in lua config.
- [ ] astro
- [ ] bash
- [x] c
- [x] cpp
- [ ] elm
- [x] go
- [x] html
- [x] javascript
- [x] jsx
- [ ] julia
- [x] lua
- [x] perl
- [x] python
- [ ] ruby
- [x] rust
- [x] svelte
- [x] tsx
- [x] typescript
- [ ] vim
- [x] vue
Where are we supossed to enable this exactly?
Put enable_quotes in the tree sitter config under matchup and make sure you have the latest HEAD
On Mon, May 29, 2023, 1:19 PM Zeioth @.***> wrote:
Where are we suppossed to enable this exactly? I've tried this on lazy.
-- vim-matchup [improved % motion] -- https://github.com/andymass/vim-matchup { "andymass/vim-matchup", lazy = false, config = function() enable_quotes = true end, },
And also on treesitter
"nvim-treesitter/nvim-treesitter", dependencies = { "windwp/nvim-ts-autotag", "JoosepAlviste/nvim-ts-context-commentstring", }, event = "User BaseFile", cmd = { "TSBufDisable", "TSBufEnable", "TSBufToggle", "TSDisable", "TSEnable", "TSToggle", "TSInstall", "TSInstallInfo", "TSInstallSync", "TSModuleInfo", "TSUninstall", "TSUpdate", "TSUpdateSync", }, build = ":TSUpdate", opts = { highlight = { enable = true, disable = function(_, bufnr) return vim.api.nvim_buf_line_count(bufnr) > 10000 end, }, matchup = { -- enables vim-matchup integration enable = true, -- mandatory, false will disable the whole extension enable_quotes = true, }, incremental_selection = { enable = true }, indent = { enable = true }, autotag = { enable = true }, context_commentstring = { enable = true, enable_autocmd = false }, }, config = function(_, opts) require("nvim-treesitter.configs").setup(opts) end,},
But doesn't seem to match quotes. Testing on lua.
— Reply to this email directly, view it on GitHub https://github.com/andymass/vim-matchup/issues/287#issuecomment-1567364569, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSY3DK3YAWQYNXNGLR63CDXITLAVANCNFSM6AAAAAAXYQBAJI . You are receiving this because you authored the thread.Message ID: @.***>
lazy.nvim package manager
-- vim-matchup [improved % motion]
-- https://github.com/andymass/vim-matchup
{
"andymass/vim-matchup",
lazy = false,
},
treesitter
matchup = {
-- enables vim-matchup integration
enable = true,
enable_quotes = true,
},
auto_install = true, -- Install a parser for the current language if not present.
EDIT: This is the solution that worked for me. I leave it here as reference.
Maybe you need a TSInstall or TSUpdate
On Mon, May 29, 2023, 2:01 PM Zeioth @.***> wrote:
I seem to be in HEAD [image: screenshot_2023-05-29_19-58-59_910193273] https://user-images.githubusercontent.com/3357792/241785569-9811bee0-f66b-42af-a216-f46bd7a755b4.png
I've tried with
lazy
-- vim-matchup [improved % motion] -- https://github.com/andymass/vim-matchup { "andymass/vim-matchup", lazy = false, },
treesitter
matchup = { -- enables vim-matchup integration enable = true, enable_quotes = true, -- disable = {}, -- optional, disable by language },Still not working
— Reply to this email directly, view it on GitHub https://github.com/andymass/vim-matchup/issues/287#issuecomment-1567391554, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSY3DJNI72DFX4G3X5A2UTXITQBDANCNFSM6AAAAAAXYQBAJI . You are receiving this because you authored the thread.Message ID: @.***>
Can you please share the whole config? I can't imagine what's wrong as it all seems good.
On Mon, May 29, 2023, 4:02 PM Zeioth @.***> wrote:
Still not working after
:TSInstall lua
— Reply to this email directly, view it on GitHub https://github.com/andymass/vim-matchup/issues/287#issuecomment-1567472761, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSY3DO6UVBBFCV3SYYYD4DXIT6HFANCNFSM6AAAAAAXYQBAJI . You are receiving this because you authored the thread.Message ID: @.***>
Yes it's online here. Sorry for the inconvenience.
UPDATE: Seems to be fixed now. I confirm one needs to run this to be able to use it.
:TSInstall lua
Thank you so much for your help @andymass
EDIT → :TSInstall is not necessary if you use the option auto_install = true in treesitter. See example above.
Just wanted to say thank you for this feature! Prior to this, I didn't really see the point of using this plugin, since the vanilla % was enough for me, but with matching quotes this plugin is gold and almost a must-have already ❤️