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

Keyword Indentation Error #77

Open
heart-of-code opened this issue Sep 5, 2023 · 2 comments
Open

Keyword Indentation Error #77

heart-of-code opened this issue Sep 5, 2023 · 2 comments

Comments

@heart-of-code
Copy link

Hello,

I am using vanilla brightscript (not brighterscript) and came across an indentation issue while creating some functions for an app.

The terms enum and class trigger indentation that applies to the remainder of the file after the keyword, even though these terms don't mean anything and aren't reserved in brightscript.

class:
image

enum:
image

The indentation affects the entire file..

Could we distinguish formatting needs for Brightscript vs Brighterscript?

@TwitchBronBron
Copy link
Member

Currently our formatter has some fairly very primitive handling, it just looks for keywords and formats based on that. This is definitely a bug, and it should be fixed. It shouldn't be indenting that in brightscript OR brighterscript.

Thanks for the issue. No guarantees, but I'll try and fit in a fix sometime in the next month or so.

@TwitchBronBron TwitchBronBron transferred this issue from rokucommunity/vscode-brightscript-language Sep 21, 2023
@TwitchBronBron
Copy link
Member

Let's make sure that all of these keywords can be properly used as functions and not cause indentation issues:

https://github.com/rokucommunity/brighterscript/blob/ec0341b6e54343d4efcb928b8630b0b3c326270d/src/lexer/TokenKind.ts#L149C3-L165C27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants