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

Support for autocompletion #167

Open
Braste opened this issue Apr 30, 2024 · 3 comments
Open

Support for autocompletion #167

Braste opened this issue Apr 30, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@Braste
Copy link

Braste commented Apr 30, 2024

Does HSM support autocompletion like
export default (_context: Context, args: Arguments) => { // t:[#s.]

@samualtnorman
Copy link
Owner

it does but you need a // @autocomplete foo: "bar" comment above your export default.

Notes for future me:
I should look for autocomplete comments in the following places:

  • ExportDefaultDeclaration's .leadingComments
  • ExportDefaultDeclaration's .declaration ArrowFunctionExpression (or FunctionDeclaration)'s .body BlockStatement's .innerComments
  • ExportDefaultDeclaration's .declaration ArrowFunctionExpression (or FunctionDeclaration)'s .body BlockStatement's .body's first element's .leadingComments

@Braste
Copy link
Author

Braste commented Apr 30, 2024

Thank you

EDIT: Sorry for the not really related question

It seems to work now, I have this in my final js
function(f,e){//t: [#s.your.targets]
But after upload I only get
braste.t1 }
when I press tab

@samualtnorman
Copy link
Owner

please can you send a minimal reproduction to @samualn on discord

@samualtnorman samualtnorman added the enhancement New feature or request label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants