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

Bad Tabs(Indentation) auto-detection. #13920

Closed
Tracked by #13192
mifth opened this issue Jul 13, 2024 · 5 comments · Fixed by #13994
Closed
Tracked by #13192

Bad Tabs(Indentation) auto-detection. #13920

mifth opened this issue Jul 13, 2024 · 5 comments · Fixed by #13994
Milestone

Comments

@mifth
Copy link

mifth commented Jul 13, 2024

Bug Description:

Hi, I found that Theia has bad tabs auto-detection. Instead of tabs I get spaces.

Theia, downloaded yesterday.
image

image

VSCode works ok.
image

image

I tested this file:
https://github.com/mifth/Dialogue-Creator/blob/main/addons/dialoguecreatorgame/Scripts/Dialogue/DCGDialogueData.gd

Steps to Reproduce:

  1. Install the Godot extension.
  2. Download the project or file above. https://github.com/mifth/Dialogue-Creator
  3. Open the file

Additional Information

  • Operating System: Win 11
  • Theia Version: 1.51.0
@mifth mifth changed the title Bad Tabs autodetection. Bad Tabs(Indentation) autodetection. Jul 14, 2024
@mifth mifth changed the title Bad Tabs(Indentation) autodetection. Bad Tabs(Indentation) auto-detection. Jul 14, 2024
@JonasHelming
Copy link
Contributor

Does it seem to be the same issue as: #13929?

@JonasHelming JonasHelming mentioned this issue Jul 23, 2024
55 tasks
@mifth
Copy link
Author

mifth commented Jul 23, 2024

@JonasHelming possibly but this can be a bit different. In my case the IDE should choose what to use. Either Spaces or Tabs.

In the bug you mentioned it's more about the config. In my case the config is not used but the IDE should determine indentation mode when a file is being opened.

@tsmaeder
Copy link
Contributor

tsmaeder commented Aug 2, 2024

This seems like an old issue: we update the monaco text model options when we open an editor (and also on editor preferences). However, I don't think this should be necessary: we are configuring a monaco IConfigurationService that is based on our preferences implementation. If that service functions correctly (including language-specific settings and change propagation), we should not have to update the model by hand.

@tsmaeder
Copy link
Contributor

tsmaeder commented Aug 2, 2024

Btw: we're updating the options without taking the detectIndentation preference into account. But the correct fix is simply to remove the manual update code.

@mifth
Copy link
Author

mifth commented Aug 2, 2024

I'm pretty sure that a fix is just 2 lines of code somewhere. :)

Just my thoughts. At the moment, it's hard to use Theia with Godot as I have to change Spaces to Tabs manually for an every .gd file which has been opened. Godot uses Tabs by default.

And I don't want to use only Tabs for everything (for example the default Python style uses Spaces). So, I switched to VSCode back for a while as it's pretty straightforward. But I and Godot community are looking forward at using Theia in our production!

tsmaeder added a commit to tsmaeder/theia that referenced this issue Aug 2, 2024
Fixes eclipse-theia#13920, eclipse-theia#13929

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
tsmaeder added a commit that referenced this issue Aug 21, 2024
…13994)

Fixes #13920, #13929

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
@jfaltermeier jfaltermeier added this to the 1.53.0 milestone Aug 29, 2024
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

Successfully merging a pull request may close this issue.

4 participants