Skip to content
Discussion options

You must be logged in to vote

I got the following to work. It includes italics, bold, italics + bold. In ~/.config/nvim/after/queries/markdown_inline/textobjects.scm:

; extends
; ...

(emphasis) @emphasis
(strong_emphasis) @emphasis_strong

In ~/.config/nvim/lua/plugins/treesitter-textobjects.lua:

-- Markdown emphasis
local tree_shared = require('nvim-treesitter-textobjects.shared')

-- From `select.lua` with comments removed.
---@param range Range
---@param selection_mode TSTextObjects.SelectionMode
local function update_selection(range, selection_mode)
  ---@type integer, integer, integer, integer
  local start_row, start_col, end_row, end_col = vim.treesitter._range.unpack4(range)
  selection_mode = selection_mode or 

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by stevenxxiu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants