Commit Graph

8 Commits (e91289fda1c81bc3f3cc32735a1b6841e6df55a5)

Author SHA1 Message Date
Andrii Grynenko 0d924255e4 Add nested placeholder parsing for LSP snippets
And fix `text` over-parsing, inspired by
d18f8d5c2d/runtime/lua/vim/lsp/_snippet.lua
2 years ago
Andrii Grynenko 1866b43cd3 Render every LSP snippets for every cursor
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.
2 years ago
Urgau ec6e575a40 Correctly handle multiple cursors with LSP snippets 2 years ago
Pascal Kuthe ba24cfe912 Delete snippet placeholders when accepting completion
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.
2 years ago
Urgau ded4381728 Implement LSP snippet tabstops sorting and merging 2 years ago
Michael Davis b9b1ec2208 Apply snippets as transactions 2 years ago
Urgau e973b71c83 Optimize LSP snippet parsing 2 years ago
Michael Davis 9c12e0fb76 Add parser for LSP snippet 2 years ago