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

Autocomplete on dot, parenthesis, and semicolon #2501

Open
salgiza opened this issue Jun 7, 2018 · 2 comments
Open

Autocomplete on dot, parenthesis, and semicolon #2501

salgiza opened this issue Jun 7, 2018 · 2 comments
Labels
enhancement This is an enhancement suggestion to existing functionality intellisense

Comments

@salgiza
Copy link

salgiza commented Jun 7, 2018

In Visual Studio Code there is this user setting:

  // Controls if suggestions should be accepted on commit characters. For instance in JavaScript the semi-colon (';') can be a commit character that accepts a suggestion and types that character.
  "editor.acceptSuggestionOnCommitCharacter": true,

As the comment mentions, what this does is accept the autocomplete suggestion not just on enter/tab, but also when entering certain characters that are usually used after the suggested text.

For example, if programming in Javascript you would write (as typed on the keyboard):

win.al('hello');

And Visual Studio will confirm the suggestion after each '.' and '('. So the resulting code would actually be:

window.alert('hello');

Now, what characters accept the suggestion depend on the language, and AL doesn't seem to autocomplete on any of the characters that would usually continue a suggestion. For example: '.', '(' and ';' just write the specified char, cancelling the selected suggestion.

It would be great if the NAV extension supported this setting. Specially for those of us who also work with C# or Javascript and keep cancelling suggestions by mistake, when writing AL code! :)

P.S. I checked that this was not implemented in version 0.17.19506.

@atoader atoader added the enhancement This is an enhancement suggestion to existing functionality label Jun 7, 2018
@atoader
Copy link
Contributor

atoader commented Jun 7, 2018

Hi @salgiza ! Thank you for the suggestion! We'll take it into consideration for future work.

@dannoe
Copy link

dannoe commented Nov 27, 2020

Pretty annonying if you change from other languages to AL and can not use the default behavior of vscode.
Would appreciate a fix for this 😄

Edit: For a workaround see https://gist.github.com/dannoe/a2ca82fa8673a8410eec27fe0ef19088

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is an enhancement suggestion to existing functionality intellisense
Projects
None yet
Development

No branches or pull requests

3 participants