elixir-ls icon indicating copy to clipboard operation
elixir-ls copied to clipboard

VS Code autocomplete does not work with return

Open joshua-andrassy opened this issue 8 years ago • 2 comments

Been digging into Elixir for the first time over the weekend and noticed a UX issue with the autocomplete.

When confirming a selection with return, VS Code creates a new-line in the code rather than injecting the selected suggestion.

This does not happen when confirming the selection with tab. Also compared observation with other languages like JavaScript and Python, and all work with both return and tab.

Environment

  • Elixir & Erlang versions (elixir --version):
Erlang/OTP 20 [erts-9.3] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Elixir 1.6.4 (compiled with OTP 20)
  • Operating system: macOS High Siera 10.13.3
  • Client (editor or IDE): VSCode 1.22.1
  1. If using a client other than VS Code, please try VS Code's ElixirLS extension. Does it reproduce your failure? NA - this is a UX issue with the VS Code integration

  2. Create a new Mix project with mix new empty, then open that project with VS Code and open an Elixir file. Is your issue reproducible on the empty project? If not, please publish a repo on Github that does reproduce it. Am able to reproduce in an empty project. https://github.com/joshua-andrassy/empty-elixir-project

  3. Check the output log by opening View > Output and selecting "ElixirLS" in the dropdown. Please include any output that looks relevant. (If ElixirLS isn't in the dropdown, the server failed to launch.) Don't see any output generated while reproducing the issue.

  4. Check the developer console by opening Help > Toggle Developer Tools and include any errors that look relevant. Don't see any errors while reproducing the issue.

joshua-andrassy avatar Apr 08 '18 12:04 joshua-andrassy

This is deliberate and explained in the readme: https://github.com/JakeBecker/vscode-elixir-ls#default-settings . You can change it in your settings file if you like.

JakeBecker avatar Apr 08 '18 19:04 JakeBecker

I had the same issue and now it's working well make sure to add this following to vscode settings.json file "[elixir]": { "editor.acceptSuggestionOnEnter": "on" },

even if you have this option enabled globally specify it to elixir Once More and it will work

abhafez avatar Jun 20 '19 18:06 abhafez