Skip to content

Column value outside range on cik inside markdown code block #801

@serranomorante

Description

@serranomorante

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. nvim --clean -u minimal
  2. Press Y to accept plugins installation
  3. :e repro.md to open the markdown file
  4. Position your cursor inside the code block
  5. Do cik to delete the block and write

Expected behavior
A clear and concise description of what you expected to happen.

Output of :checkhealth nvim-treesitter

Details

nvim-treesitter: 1 ❌

Requirements ~

  • ✅ OK Neovim was compiled with tree-sitter runtime ABI version 15 (required >=13).
  • ✅ OK tree-sitter-cli 0.25.9 (/home/serranomorante/bin/tree-sitter)
  • ✅ OK node 21.7.3 (/home/serranomorante/.volta/bin/node)
  • ✅ OK tar 1.35.0 (/usr/bin/tar)
  • ✅ OK curl 8.16.0 (/usr/bin/curl)
    curl 8.16.0 (x86_64-pc-linux-gnu) libcurl/8.16.0 OpenSSL/3.5.2 zlib/1.3.1 brotli/1.1.0 zstd/1.5.7 libidn2/2.3.7 libpsl/0.21.5 libssh2/1.11.1 nghttp2/1.67.0 nghttp3/1.11.0
    Release-Date: 2025-09-10
    Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
    Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd

OS Info ~

  • sysname: Linux
  • machine: x86_64
  • release: 6.12.47-1-lts
  • version: #1 SMP PREEMPT_DYNAMIC Fri, 12 Sep 2025 08:06:51 +0000

Install directory for parsers and queries ~

  • /home/serranomorante/issues/textobjects-column-outside-range/.repro/share/nvim/site/
  • ✅ OK is writable.
  • ❌ ERROR is not in runtimepath.

Installed languages H L F I J ~

Legend: H[ighlights], L[ocals], F[olds], I[ndents], In[J]ections ~

Output of nvim --version

NVIM v0.12.0-dev-1247+g0bb74f0fe2-dirty

Additional context
Add any other context about the problem here.

neovim latest
arch latest
tmux
kitty

minimal.lua

local repro_dir = vim.fs.joinpath(vim.uv.cwd(), ".repro")
vim.env.XDG_CONFIG_HOME = repro_dir .. "/config"
vim.env.XDG_DATA_HOME = repro_dir .. "/share"
vim.env.XDG_STATE_HOME = repro_dir .. "/state"
vim.env.XDG_CACHE_HOME = repro_dir .. "/cache"
vim.opt.packpath:prepend(repro_dir .. "/share/nvim/site")

---options

vim.cmd.syntax("off")
vim.o.swapfile = false
vim.go.backup = false

---install plugins

vim.pack.add({
	{
		src = "https://github.com/nvim-treesitter/nvim-treesitter",
		version = "main",
	},
	{
		src = "https://github.com/nvim-treesitter/nvim-treesitter-textobjects",
		version = "main",
	},
})

vim.api.nvim_create_autocmd("FileType", {
	pattern = "markdown",
	callback = function()
		vim.treesitter.start()
	end,
})

require("nvim-treesitter-textobjects").setup({
	select = { lookahead = true },
	move = { set_jumps = true },
})

vim.keymap.set({ "x", "o" }, "ik", function()
	require("nvim-treesitter-textobjects.select").select_textobject("@block.inner", "textobjects")
end, { desc = "Treesitter: inside block" })

repro.md

# Testing

<```> --> remove the anchors, I put them because of github
Hello
<```>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions