nvim-treesitter / nvim-treesitter/nvim-treesitter-textobjects
No handler for make-range! for c language
Nobody has claimed this yet.
- Dominant language
- Tree-sitter Query
- Stars
- 2.8k
- Forks
- 271
- Avg merge
- 8d 8h
- Merged PRs (30d)
- 1
Description
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Nvim version 0.12.3
Latest version of this package and all other treesitter packages
Open c file
static
void uInt64_toAscii ( char* outbuf, UInt64* n )
{
Int32 i, q;
UChar buf[32];
Int32 nBuf = 0;
UInt64 n_copy = *n;
do {
q = uInt64_qrm10 ( &n_copy );
buf[nBuf] = q + '0';
nBuf++;
} while (!uInt64_isZero(&n_copy));
outbuf[nBuf] = 0;
for (i = 0; i < nBuf; i++)
outbuf[i] = buf[nBuf-i-1];
}
Try anything like a swap
require("nvim-treesitter-textobjects.swap").swap_next "@parameter.inner"
Error
E5108: Lua: ...m/0.12.3/share/nvim/runtime/lua/vim/treesitter/query.lua:861: No handler for make-range!
stack traceback:
[C]: in function 'error'
...m/0.12.3/share/nvim/runtime/lua/vim/treesitter/query.lua:861: in function '_apply_directives'
...m/0.12.3/share/nvim/runtime/lua/vim/treesitter/query.lua:1085: in function '(for generator)'
...r-textobjects/lua/nvim-treesitter-textobjects/shared.lua:68: in function 'fn'
...r-textobjects/lua/nvim-treesitter-textobjects/shared.lua:42: in function 'get_query_matches'
...r-textobjects/lua/nvim-treesitter-textobjects/shared.lua:157: in function 'fn'
...3/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:717: in function 'for_each_tree'
...r-textobjects/lua/nvim-treesitter-textobjects/shared.lua:154: in function 'get_capture_ranges_recursively'
...r-textobjects/lua/nvim-treesitter-textobjects/shared.lua:326: in function 'textobject_at_point'
...ter-textobjects/lua/nvim-treesitter-textobjects/swap.lua:179: in function 'swap_textobject'
...ter-textobjects/lua/nvim-treesitter-textobjects/swap.lua:211: in function <...ter-textobjects/lua/nvim-treesitter-textobjects/swap.lua:210>
Output of :checkhealth nvim-treesitter
==============================================================================
nvim-treesitter: ✅
Requirements ~
- ✅ OK Neovim was compiled with tree-sitter runtime ABI version 15 (required >=13).
- ✅ OK tree-sitter-cli 0.26.9 (/opt/homebrew/bin/tree-sitter)
- ✅ OK tar 3.5.3 (/usr/bin/tar)
- ✅ OK curl 8.7.1 (/usr/bin/curl)
curl 8.7.1 (x86_64-apple-darwin25.0) libcurl/8.7.1 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.68.1
Release-Date: 2024-03-27
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM SPNEGO SSL threadsafe UnixSockets
OS Info ~
- sysname: Darwin
- machine: arm64
- release: 25.5.0
- version: Darwin Kernel Version 25.5.0: Mon Apr 27 20:39:29 PDT 2026; root:xnu-12377.121.6~2/RELEASE_ARM64_T8142
Install directory for parsers and queries ~
- /Users/ilan/.local/share/nvim/site
- ✅ OK is writable.
- ✅ OK is in runtimepath.
Installed languages H L F I J ~
-
c ✓ ✓ ✓ ✓ ✓
-
c_sharp ✓ ✓ ✓ . ✓
Legend: [H]ighlights, [L]ocals, [F]olds, [I]ndents, In[J]ections ~
Output of nvim --version
0.12.3```
**Additional context**
Add any other context about the problem here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the reported stack through lua/nvim-treesitter-textobjects/shared.lua at lines 42, 68, 154, and 157, then into swap.lua at lines 179 and 210. Reproduce the failure with the supplied C example and swap_next command; done means swapping C parameters no longer raises “No handler for make-range!”.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, lua
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100