Skip to content
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

accept suggestions on enter instead of tab not working #51

Closed
steveryan opened this issue Mar 13, 2020 · 7 comments
Closed

accept suggestions on enter instead of tab not working #51

steveryan opened this issue Mar 13, 2020 · 7 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@steveryan
Copy link

steveryan commented Mar 13, 2020

Hey all,

Thanks for this awesome vs code plugin. Everything is working great, but I can't seem to be able to get it to accept suggestions on enter. I'm probably missing something simple, but I can't get it working.

Here is my vs code settings.json
{ "workbench.colorTheme": "dark+(elixir)", "editor.formatOnSave": true, "editor.acceptSuggestionOnEnter": "on" }

From reading the readme, it seems like that's all that should be required. Completeing with tab is working fine btw.

Edit: Enter is working to accept suggestions in .html.eex files, but not .ex files. Not sure if that helps

@axelson
Copy link
Member

axelson commented Mar 13, 2020

Hmm, that's a weird one. As far as I can tell there's no code in vscode-elixir-ls that relates to that. The only code is in https://github.com/elixir-lsp/vscode-elixir-ls/blob/c7e9679b782cf7ed79d2713ace1cb340fe0af56d/src/extension.ts

Maybe this is some sort of VSCode bug? Not sure what else to check. But I also see this behavior. What platform are you on? I'm on Arch Linux and running vscode-oss.

@axelson axelson added bug Something isn't working help wanted Extra attention is needed labels Mar 13, 2020
@steveryan
Copy link
Author

@axelson I'm on a Mac and running the latest VSCode. I kind of don't think it's a VSCode bug since enter to accept suggestions is working for .eex files, and in my rails projects.

@NobbZ
Copy link
Member

NobbZ commented Mar 13, 2020

As far as I remember, you need to enable that setting explicitely for the elixir edit mode…

"[elixir]": {
  "editor.acceptSuggestionOnEnter": "on"
}

It is defined here:

https://github.com/elixir-lsp/vscode-elixir-ls/blob/a65e3af/package.json#L28-L37

@steveryan
Copy link
Author

@NobbZ Amazing, thanks a lot! That solved it

@axelson
Copy link
Member

axelson commented Mar 14, 2020

@NobbZ do you think we should keep that setting as-is? Or should we remove that default and let user's set it for themselves? If we don't remove the default I think we need to document it better in the readme.

@NobbZ
Copy link
Member

NobbZ commented Mar 14, 2020

Personally I tend to remove it, as I never understood why this was there at all…

The other settings are somewhat relevant to the language, but this one is really about personal preference.

@axelson
Copy link
Member

axelson commented Mar 14, 2020

Yeah I think it makes sense to just remove it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants