lf-lang / vscode-lingua-franca

Lingua Franca extension for Visual Studio Code
Other
6 stars 3 forks source link

"Reindent Lines" replaces spaces with tabs #15

Closed lhstrh closed 2 years ago

lhstrh commented 2 years ago

In VS Code, the "Reindent Lines" command changes spaces to tabs. Is there a way we can setup our extension to always use spaces?

petervdonovan commented 2 years ago

I suspect that this is unrelated to our extension and more related to other user and workspace settings, as well as possibly the whitespace that already appears in the file.

I was able to reproduce this by entering this into .vscode/settings.json:

{
    "editor.detectIndentation": false,
    "editor.insertSpaces": false
}

However, if I do not have those settings, then "Reindent Lines" uses four spaces, not tabs.

Feel free to re-open if I am likely to be mistaken.

edwardalee commented 2 years ago

Wait, why do we want to replace spaces with tabs? We should use spaces, not tabs. Tabs render differently for different people, making code hard to read.

petervdonovan commented 2 years ago

Yes. The point of my closing the issue is that I believe the Lingua Franca VS Code extension is not responsible for preventing the editor from using tabs -- it is not because I think it is acceptable to use tabs. I don't think anyone here would advocate for the use of tabs.