diff options
author | Viktor Kojouharov <developer@sugr.org> | 2020-05-28 14:31:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-28 08:31:56 -0400 |
commit | 5a9226c800d3075821203952da7c38626180680d (patch) | |
tree | 6d36d84f9c16561d12de8fd7aafcce23a72a294f /runtime/lua/vim/lsp/protocol.lua | |
parent | 2ca8f02a6461fd4710c4ecc555fbe7ee9f75a70a (diff) | |
download | rneovim-5a9226c800d3075821203952da7c38626180680d.tar.gz rneovim-5a9226c800d3075821203952da7c38626180680d.tar.bz2 rneovim-5a9226c800d3075821203952da7c38626180680d.zip |
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
Diffstat (limited to 'runtime/lua/vim/lsp/protocol.lua')
-rw-r--r-- | runtime/lua/vim/lsp/protocol.lua | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/runtime/lua/vim/lsp/protocol.lua b/runtime/lua/vim/lsp/protocol.lua index 877d11411b..7d5f8f5ef1 100644 --- a/runtime/lua/vim/lsp/protocol.lua +++ b/runtime/lua/vim/lsp/protocol.lua @@ -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; |