thqby / vscode-autohotkey2-lsp

Autohotkey v2 Language Support using vscode-lsp.
https://marketplace.visualstudio.com/items?itemName=thqby.vscode-autohotkey2-lsp
GNU Lesser General Public License v3.0
219 stars 21 forks source link

Auto add asterisk on multiline comment #350

Closed RaptorX closed 1 year ago

RaptorX commented 1 year ago

Type: Feature Request

I use multiline comments with asterisks at the beginning for styling purposes.

It would be great if the lexer could detect if a line has an asterisk and when I press enter it would add it to the next line as well like this:

Code_SU2HV1GF6U


Extension version: 2.0.8 VS Code version: Code 1.80.1 (74f6148eb9ea00507ec113ec51c489d6ffb4b771, 2023-07-12T17:22:07.651Z) OS version: Windows_NT x64 10.0.19045 Modes:

thqby commented 1 year ago

2

That's the way it is right now.

RaptorX commented 1 year ago

Not working on my end.

Do I have to set some settings?

Code_anpjHub3Cr

Code_Zj8DeeDUaS

Code_DZm6S8TstQ

thqby commented 1 year ago

No need for additional settings, I don't know why you can't do it there.

https://github.com/thqby/vscode-autohotkey2-lsp/blob/main/ahk2.configuration.json#L98 This feature is implemented here.

RaptorX commented 1 year ago

Maybe a conflicting extension?

I don't have any extension that messes with the comments though, but I'll take a quick look.

Is there a way to reset your extensions settings without having to uninstall?

thqby commented 1 year ago

Probably not.

RaptorX commented 1 year ago

It is indeed interacting with another extension. I will let you know which one after I continue testing.

EDIT:

After further testing i noticed it is not an extension but rather the settings file. When I clear my settings.json file things start working as intended.

RaptorX commented 1 year ago

When this setting is set like this I get the issue shown above:

"editor.autoIndent": "brackets"

Can you check if you can replicate?

EDIT:

Now I understand the problem. Only Advanced and Full options invoke the language defined onEnter Rules. So, your rules are not being applied when I have the settings for the brackets only.

I will play with this a bit further.

thqby commented 1 year ago

yes, i see that.