-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(builtins): add completion source for nvim-snippets #201
base: main
Are you sure you want to change the base?
Conversation
I see that none-ls cannot recognize the prefix boundary if the snippet is prefixed with non-keyword character like this ( none-ls.nvim/lua/null-ls/utils/make_params.lua Lines 62 to 68 in dcc8cd4
|
Thanks to the case for Expanding such snippets is longer incorrect. For diff --git a/lib/Completion/Bridge/TolerantParser/WorseReflection/KeywordCompletor.php b/lib/Completion/Bridge/TolerantParser/WorseReflection/KeywordCompletor.php
index 37190f27..562c0c48 100644
--- a/lib/Completion/Bridge/TolerantParser/WorseReflection/KeywordCompletor.php
+++ b/lib/Completion/Bridge/TolerantParser/WorseReflection/KeywordCompletor.php
@@ -47,6 +47,7 @@ class KeywordCompletor implements TolerantCompletor
'try' => " {\$3\n} catch (\${1:Exception} \\\$\${2:error}) {\$4\n}",
'while' => " (\$1) {\$0\n}",
'yield' => ' $1;$0',
+ '/**' => ' $1 */$0',
]; |
Full Nvim example: neovim/neovim#30905 |
- empty line case can be checked once per cb - no need to iterate through snippets twice
Using |
https://github.com/garymjr/nvim-snippets