-
The May I ask if anybody can recommend a Thanks. PS: I found markdown-drawer which is very close to what I'm expecting, i.e. it provides a |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can define a textobject based on treesiter like so: https://github.com/jmbuhr/quarto-nvim-kickstarter/blob/f0c3aef0c31252f0fe8c29167e8920a13291eb33/lua/plugins/quarto.lua#L126 Furthermore, with a language server for markdown configured such as Often, you don't need a specialized plugin, you can get a lot of power with these more general plugins that will tie in nicely with the rest of your workflow |
Beta Was this translation helpful? Give feedback.
You can define a textobject based on treesiter like so: https://github.com/jmbuhr/quarto-nvim-kickstarter/blob/f0c3aef0c31252f0fe8c29167e8920a13291eb33/lua/plugins/quarto.lua#L126
These allow you to do things like jump to next or even select inside etc. like with regular text objects in vim (like word, paragraph etc.).
For example, I use
]]
to jump to the next code block or heading.Furthermore, with a language server for markdown configured such as
marskman
: https://github.com/jmbuhr/quarto-nvim-kickstarter/blob/f0c3aef0c31252f0fe8c29167e8920a13291eb33/lua/plugins/quarto.lua#L226-L235headings will become document symbols provided by the lsp. You can view a list with e.g.
:Telescope lsp_…