Copilot suggesting lines with different indentation space amounts than editor settings (Jetbrains) #11724
Replies: 17 comments 4 replies
-
I'm having a similar issue, in my case the ghost text shows as 2 spaces as it should but the completion gets set to 4, maybe the IDE is trying to auto-indent the code that was already indented? |
Beta Was this translation helpful? Give feedback.
-
This issue is still relevant |
Beta Was this translation helpful? Give feedback.
-
Seems like it's still not fixed. |
Beta Was this translation helpful? Give feedback.
-
Seems like it's still not fixed. |
Beta Was this translation helpful? Give feedback.
-
It's now been a year and a half. At this point I'd love to just fix this shit myself |
Beta Was this translation helpful? Give feedback.
-
Currently seeing tabs inserted via Copilot completions in a Go project that is spaces. |
Beta Was this translation helpful? Give feedback.
-
Same problem. Moreover, it kinda conflicts with Webstorm's automatic indent detection ( it doesn't care if it is turned off ) and funked up my formatting here and there. |
Beta Was this translation helpful? Give feedback.
-
still relevant. it's particularly nasty in languages like yaml which really do care about the indents |
Beta Was this translation helpful? Give feedback.
-
Still relevant |
Beta Was this translation helpful? Give feedback.
-
Like Wizzerinus said, yaml files are really nasty. It's really hard to write OpenAPI specs, for example, as I have to correct indentations for each autocompleted chunk otherwise the document is invalid. |
Beta Was this translation helpful? Give feedback.
-
seems to me like this is something that could at least be fixed on the client side relatively easily without having to make it work in the upstream LLM interaction 🤔 just need to adjust output formatting before rendering perhaps? |
Beta Was this translation helpful? Give feedback.
-
Sure. However, it still needs to be done in the plugin, not in the IDE. The issue does fall under GitHub/Microsoft, not JetBrains. |
Beta Was this translation helpful? Give feedback.
-
Having this problem too (vscode) |
Beta Was this translation helpful? Give feedback.
-
For vscode (haven't tried JetBrains), change |
Beta Was this translation helpful? Give feedback.
-
Thats horrible to try to fix the format in each sentence. :'( Someone please fix this! |
Beta Was this translation helpful? Give feedback.
-
Something that helped for jetbrains (using rubymine) was changing editor>code style> language(ruby, javascript, typescript) to have the same indentation as my files. |
Beta Was this translation helpful? Give feedback.
-
Every now and then Copilot will start predicting what I want to write next, but its suggestions will not match the indent settings within Jetbrains IDEs (or at least in this case, WebStorm while writing javascript, since I haven't tested this in the other IDEs).
Most of the time it will suggest code lines indented by 2 spaces, although I have my editor settings set to 4 spaces for javascript.
I think it starts properly suggesting 4 spaces indents as long as there is a leading line before it that I have entered first in that scope. But if it's the first line suggested in a new scope / code block, the indentation doesn't always match. I haven't verified this as the exact reproducible behavior yet though, just that it has been occurring sporadically.
Is there a workaround for this?
Beta Was this translation helpful? Give feedback.
All reactions