| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
An operator on a target that creates a Visual selection (`cgn`,
`d<C-v>j`, an omap text object like `:<C-U>normal! viw`) sets `'< '>`,
`gv` and `visualmode()` to the operator target.
This causes at least the following problems:
- clobbers the user's previous `'< '>` (annoying and usually unwanted)
- E.g. after a custom textobj, `:help text-object-define`.
- "cgn" with a `\%V` pattern can't be dot-repeated (".")
Solution:
Don't save the Visual area if the operator target created it (operator
was pending).
Also fix `an`/`in` with `'selection'=exclusive` starting from an empty
range.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
The magic globals `it`, `describe`, etc., are more trouble than they are
worth.
- Hooking into `after_each` requires `getfenv()` hacks.
- They confuse luals/emmylua, because the top-level `.luarc.json` isn't
merged with `test/.luarc.json` (apparently a luals limitation?)
- They totally defeat discoverability because the user just has to
"know" about the various magic symbols.
So they harm DX, which means they serve no purpose at all.
Solution:
- Expose the test API from `testutil`, so tests can call `t.it()`,
`t.describe()`, etc., in the conventional way.
- Drop `getfenv()` hacks.
- Drop the `setfenv()` injection in `load_chunk`.
- Drop `test/_meta.lua`.
|
| |
|
|
|
| |
Problem: select_spec tests a public function, but uses private enums.
Solution: Replace private enums with public enums.
|
| |
|
|
|
|
|
| |
Problem:
Unnecessary kwargs.
Solution:
Use param instead of kwargs.
|
| |
|
|
|
| |
Problem: No public method for treesitter incremental selection.
Solution: Add `vim.treesitter.select()`.
|
| |
|
|
|
|
|
|
|
| |
Problem:
Can't expand treesitter-incremental-selection to the next and previous
sibling nodes.
Solution:
Pressing `]N` in visual mode will expand the selection to the next
sibling node, and `[N` will do the same with the previous node.
|
| |
|
|
|
|
|
|
|
|
|
| |
Problem:
`TSNode:id()` returns the underlying c pointer as a string, which may include
NUL bytes. In PUC Lua, `('%s'):format('\0a\0')` returns `''` and not `'\0a\0'`
(i.e. treats the string as a c-string (which terminates at the NUL byte)).
This resulted in two different nodes being able to have the same id.
Solution:
Use concatenation `..` instead of `string.format()`.
|
| |
|
| |
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
| |
|
| |
The test sometimes(around 1/30) fails on PUC-lua.
|
| |
|
|
|
| |
gen_vimdoc.lua: In prepare for the upcoming release, comment-out the
"Experimental" warning for prerelease features.
|
|
|
Co-authored-by: György Andorka <gyorgy.andorka@protonmail.com>
|