aboutsummaryrefslogtreecommitdiff
path: root/helix-lsp/src/snippet.rs
Commit message (Collapse)AuthorAge
* detailed snippet testsPascal Kuthe2023-03-22
|
* accept bracket snippet variables without defaultPascal Kuthe2023-03-22
|
* accept empty snippet regex replace elementsPascal Kuthe2023-03-22
|
* fix single-char variable namesPascal Kuthe2023-03-22
|
* do not fail snippet parsing when control chars are not explicitly escapedPascal Kuthe2023-03-22
|
* fix typoPascal Kuthe2023-03-16
| | | Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* allow empty placeholdersPascal Kuthe2023-03-16
|
* revamped snippet text element parsingPascal Kuthe2023-03-16
| | | | | | | | | | | | | | Snippet text elements can contain escape sequences that must be treated properly. Furthermore snippets must always escape certain characters (like `}` or `\`). The function has been updated to account for that. `text` is now also included with `anything` to match the grammar and can also match empty text. To avoid infinite loops the `non-empty` combinator has been added which is automatically used in the `one_or_more` and `zero_or more` combinator where the problemn would occur.
* always parse the entire snippetPascal Kuthe2023-03-16
| | | | | | Previously any remaining text of the snippet that could not be parsed was ignored. This commit adds the `parse_all` function which reports an error if any text was not consumed by the parser
* avoid allocations during snippet renderingPascal Kuthe2023-03-10
|
* Add nested placeholder parsing for LSP snippetsAndrii Grynenko2023-03-08
| | | | | And fix `text` over-parsing, inspired by https://github.com/neovim/neovim/blob/d18f8d5c2d82b209093b2feaa8921a4792b71d59/runtime/lua/vim/lsp/_snippet.lua
* Render every LSP snippets for every cursorAndrii Grynenko2023-03-08
| | | | | | | This refactors the snippet logic to be largely unaware of the rest of the document. The completion application logic is moved into generate_transaction_from_snippet which is extended to support dynamically computing replacement text.
* Correctly handle multiple cursors with LSP snippetsUrgau2023-03-08
|
* Delete snippet placeholders when accepting completionPascal Kuthe2023-03-08
| | | | | | | When accepting a snippet completion we automatically delete the placeholders for now as doing so manual is quite cumbersome. In the future we should keep these as a mark + virtual text that is automatically removed once the cursor moves there.
* Implement LSP snippet tabstops sorting and mergingUrgau2023-03-08
|
* Apply snippets as transactionsMichael Davis2023-03-08
|
* Optimize LSP snippet parsingUrgau2023-03-08
|
* Add parser for LSP snippetMichael Davis2023-03-08