Skip to content

Commit

Permalink
vim: Add nvim-treesitter-textobjects (disabled, needs fixing)
Browse files Browse the repository at this point in the history
Unfortunately unusable for markdown:
nvim-treesitter/nvim-treesitter-textobjects#479
  • Loading branch information
liskin committed Sep 18, 2024
1 parent b816b33 commit 7231465
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .config/nvim/lua/init/plug_treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,16 @@ require'nvim-treesitter.configs'.setup {
highlight = {
enable = true,
},
textobjects = {
-- FIXME: doesn't work (https://github.com/nvim-treesitter/nvim-treesitter-textobjects/issues/479)
-- move = {
-- enable = true,
-- goto_next_start = {
-- ["]l"] = "@markup.link.label"
-- },
-- goto_previous_start = {
-- ["[l"] = "@markup.link.label"
-- },
-- },
},
}
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@
path = .local/share/nvim/site/bundle/dropbar.nvim
# url = https://github.com/Bekaboo/dropbar.nvim
url = https://github.com/liskin/dropbar.nvim
[submodule ".local/share/nvim/site/bundle/nvim-treesitter-textobjects"]
path = .local/share/nvim/site/bundle/nvim-treesitter-textobjects
url = https://github.com/nvim-treesitter/nvim-treesitter-textobjects
[submodule "src/tig-colors-neonwolf"]
path = src/tig-colors-neonwolf
url = https://github.com/h3xx/tig-colors-neonwolf
Expand Down
1 change: 1 addition & 0 deletions .local/share/nvim/site/bundle/nvim-treesitter-textobjects
8 changes: 8 additions & 0 deletions .vim/after/queries/markdown_inline/textobjects.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
; extends

[
(link_label)
(link_text)
(link_title)
(image_description)
] @markup.link.label

0 comments on commit 7231465

Please sign in to comment.