I told GameDev Assistant to use tabs/spaces for the coding, but it didn't do what I asked. Why?

I told GameDev Assistant to use tabs/spaces for the coding, but it didn't do what I asked. Why?

Whether due to personal preferences or style requirements for the project, sometimes you'll need to have scripts that either specifically use tabs or spaces for indentation. Unfortunately, even if you provide the AI with specific instructions for this, it cannot always follow these requirements.

This is the result of a significant limitation of LLMs in general. Even when requested to do so, sometimes LLMs won't give a response observing these requirements simply due to how the responses are processed and rendered. As GameDev Assistant is reliant on LLMs, there isn't anything we can do about this specific issue either to ensure things are enforced 100% of the time.

This said, Godot itself actually offers a quick method to ensure enforcement. First, you must declare your indentation preference to Godot. This can be done by doing the following:

1. Open up the Editor Settings from the Editor menu item.



2. From the Editor Settings, locate the Text Editor -> Behavior settings.

3. On this window, locate the Indent section and choose which indentation type you like.



Once done, anytime you paste in code snippets with the wrong indentation and save your scripts (Ctrl + S), Godot will automatically convert the indentation to your specific settings.