loganch / AutoIt-VSCode

AutoIt Extension for Visual Studio Code

Home Page:https://marketplace.visualstudio.com/items?itemName=Damien.autoit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Indent behaviour changes also for other languages

segelkma opened this issue · comments

Hi there,
upon installing the plugin the indent behaviour within VS Code changes from using 4 spaces to a full tab. This applies to all languages being used, which is not a problem for most, but catastrophic for python development. I wouldn't want to disable the plugin every time I code in python, is there a way to fix this? I did not find a setting for this.
In best case, the indent change would only be applied to au3 files in my opinion.

Thanks

@segelkma Can you try running the extension with the following modified package.json to see if it behaves better?

https://github.com/Danp2/AutoIt-VSCode/blob/dp_defaults/package.json

Thank you! Looks good. Still tabs in au3 files, now spaces in py files

commented

Why does this override editor's settings in the first place? This should be left for the user to decide...

I can't speak for others, but it was very puzzling to me why my editor would not remember my settings after restart...

This whole section should be removed:

    "configurationDefaults": {
      "[autoit]": {
        "editor.detectIndentation": false,
        "editor.tabSize": 4,
        "editor.insertSpaces": false
    },

I was trying to have it format scripts in AutoIt/SciTe/Tidy standards, but definitely didn't intend for it ignore settings.

commented

I see. As it works right now, when you change settings via statusbar (or via command line)
image
it doesn't remember them after editor restart.

Hopefully VSCode allow overwrite them, but it's a bit involved and not quiet straight forward or intuitive:
image
One need hover over Modified elsewhere and then click on Autoit

Perhaps this should be "fixed" on VSCode side then, if something is overwriting settings from different scopes, then changing it via command line should be done in that scope and not globally?