-
Notifications
You must be signed in to change notification settings - Fork 196
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
Completion always returns snippets, even if snippets are not supported by the client #171
Comments
@miquecg The "$0" indicates where the cursor is supposed to be. I'm not sure why this would change recently since not changes have been made in that area in quite a while. What version did you upgrade from and to? Are you sure you're using this repository vs https://github.com/JakeBecker/elixir-ls ? Also does Vim ALE support the
|
Hi @axelson. Well, I've started using your Elixir LS recently, from version I'm using your fork, not the original repo. Regarding ALE, looks like it doesn't support snippets feature: dense-analysis/ale#1821 In fact, support for snippets is disabled on the init message to the server: https://github.com/dense-analysis/ale/blob/master/autoload/ale/lsp.vim#L355 Knowing this, what should I expect from do/end or similar suggestions? |
@miquecg looking at this further it seems that even though ElixirLS reads snippet support, it is always sends snippets even if snippet support is disabled, which is a bug. I edited the issue title to better reflect the bug. It should be a relatively straightforward fix that is constrained to |
Thanks, glad to help discovering a bug :) |
Note: the previous regex did not match snippets Fixes #171
@miquecg can you confirm that the fix works for you on the latest master? |
@axelson Looks like it's working ok. Thanks! |
Great, glad to hear it! |
I'm not entirely sure if this issue has been fixed. On master, it seems like function completions always return snippets even if snippetSupport is false. I'm using vim-lsp which specifies snippetSupport as false. When completing Looking into the code, it seems like function completion always expands to snippet form. Also I don't think the regex for checking if it's snippet handles the case with a text placeholder (e.g. Ideally, I would like it if the function completion without snippets is just an empty arguments list. |
@jeffrey-xiao you're probably right, can you file that as a new issue? |
I'd like to ask what to expect from suggestions like
do/end
blocks. In my case they are literally inserted:I was expecting to have:
Looks like a problem supporting snippets provided by the LS. It didn't happend before with previous versions of
elixir-ls
. I'm running Vim on terminal with ALE.The text was updated successfully, but these errors were encountered: