File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ local MODIFIER_REGEX = create_regex({
2929}, true )
3030
3131local COUNT_RANGE_REGEX = create_regex ({
32- [=[ \s*\%(\d\+\|\$\),\%(\d\+\|\$\)\s*]=] ,
33- [=[ \s*'<,'>\s*]=] ,
32+ [=[ \s*\%(\d\+\|\$\)\%[ ,\%(\d\+\|\$\)] \s*]=] ,
33+ [=[ \s*'\%[ <,'>] \s*]=] ,
3434 [=[ \s*\%(\d\+\|\$\)\s*]=] ,
3535}, true )
3636
@@ -73,9 +73,10 @@ local definitions = {
7373 -- Support `lua vim.treesitter._get|` or `'<,'>del|` completion.
7474 -- In this case, the `vim.fn.getcompletion` will return only `get_query` for `vim.treesitter.get_|`.
7575 -- We should detect `vim.treesitter.` and `get_query` separately.
76+ -- TODO: The `\h\w*` was choosed by huristic. We should consider more suitable detection.
7677 local fixed_input
7778 do
78- local suffix_pos = vim .regex ([[ \k *$]] ):match_str (arglead )
79+ local suffix_pos = vim .regex ([[ \h\w *$]] ):match_str (arglead )
7980 fixed_input = string.sub (arglead , 1 , suffix_pos or # arglead )
8081 end
8182
You can’t perform that action at this time.
0 commit comments