diff options
| author | Lewis Russell <lewis6991@gmail.com> | 2026-09-28 14:19:42 +0100 |
|---|---|---|
| committer | Lewis Russell <lewis6991@gmail.com> | 2026-09-28 14:43:14 +0100 |
| commit | c6535538f8717a8f6134020a5bee65341cf8280f (patch) | |
| tree | a3c7512c9b98a571744d49ca6ff7f8c6568d373e /runtime/lua/vim/treesitter/_range.lua | |
| parent | b597af006fbb7c94c03ea9e7fa13cab7394b0501 (diff) | |
| download | rneovim-c6535538f8717a8f6134020a5bee65341cf8280f.tar.gz rneovim-c6535538f8717a8f6134020a5bee65341cf8280f.tar.bz2 rneovim-c6535538f8717a8f6134020a5bee65341cf8280f.zip | |
fix(lua): enable param-type-mismatch diagnostic
Problem: Argument type mismatches are excluded from EmmyLua checks.
Solution: Correct runtime annotations and calls, document local checker
workarounds, and enable the diagnostic.
AI-assisted
Diffstat (limited to 'runtime/lua/vim/treesitter/_range.lua')
| -rw-r--r-- | runtime/lua/vim/treesitter/_range.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/lua/vim/treesitter/_range.lua b/runtime/lua/vim/treesitter/_range.lua index 1526acb8aa..a754539f26 100644 --- a/runtime/lua/vim/treesitter/_range.lua +++ b/runtime/lua/vim/treesitter/_range.lua @@ -168,6 +168,8 @@ function M.add_bytes(source, range) return range --[[@as Range6]] end + -- EmmyLua incorrectly makes range nullable after the table check. + ---@cast range -nil local start_row, start_col, end_row, end_col = M.unpack4(range) -- TODO(vigoux): proper byte computation here, and account for EOL ? local start_byte = get_offset(source, start_row) + start_col |