mirror of
https://github.com/neovim/neovim.git
synced 2026-04-30 11:14:10 +00:00
lua: simple snippet support in the completion items (#12118)
Old behavior is: foo(${placeholder: bar, ...)
with lots of random garbage you'd never want inserted.
New behavior is: foo(bar, baz)
(which maybe is good, maybe is bad [depends on user], but definitely better than it was).
-----
* Implement rudimentary snippet parsing
Add support for parsing and discarding snippet tokens from the completion items.
Fixes #11982
* Enable snippet support
* Functional tests for snippet parsing
Add simplified real-world snippet text examples to the completion items
test
* Add a test for nested snippet tokens
* Remove TODO comment
* Return the unmodified item if the format is plain text
* Add a plain text completion item
This commit is contained in:
committed by
GitHub
parent
2ca8f02a64
commit
5a9226c800
@@ -633,8 +633,7 @@ function protocol.make_client_capabilities()
|
||||
dynamicRegistration = false;
|
||||
completionItem = {
|
||||
|
||||
-- TODO(tjdevries): Is it possible to implement this in plain lua?
|
||||
snippetSupport = false;
|
||||
snippetSupport = true;
|
||||
commitCharactersSupport = false;
|
||||
preselectSupport = false;
|
||||
deprecatedSupport = false;
|
||||
|
||||
Reference in New Issue
Block a user