CFiggers / vscode-janet-plus-plus

Janet language support for Visual Studio Code
Other
10 stars 2 forks source link

TODO: Handle Anonymous functions correctly #2

Closed CFiggers closed 10 months ago

CFiggers commented 2 years ago

Currently will re-format Janet's anonymous function macro, which should look like this:

|(fn args)

to this instead:

| (fn args

Fortunately doesn't cause anonymous function to break (Janet ignores the whitespace) but should still fix.

Probably as simple as adding | to a regex somewhere that handles prefixes (like # or @ in other places).

CFiggers commented 1 year ago

Partially fixed—now having a | in a form makes format-on-type behave weirdly.

CFiggers commented 10 months ago

Fixed with b7111abef43f71d2de832e72d710213fdf7923c6