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

On every edit of a file without tabs: You MUST use spaces! error #390

Closed
eugenesvk opened this issue May 26, 2023 · 0 comments
Closed

On every edit of a file without tabs: You MUST use spaces! error #390

eugenesvk opened this issue May 26, 2023 · 0 comments
Milestone

Comments

@eugenesvk
Copy link

I get this error on every single edit in a syntax file even if the file is almost emtpy (so guaranteed to have no tabs, and the syntax settings are also translate_tabs_to_spaces), which is very annoying

Tested with the TOML package, extracted syntax_test_toml.toml and replaced the content with an empty doc

# SYNTAX TEST "Packages/sublime_toml_highlighting/TOML.sublime-syntax"

# This is a TOML document. Boom.

Even if I switch to tabs and let the plugin switch back to spaces, I get this error

Since the source is https://github.com/SublimeText/PackageDev/blob/8d4ffb33e7e0b7bbf5dd5e8b3b9721615093c3dc/plugins/syntaxtest_dev.py#LL81C1-L87C62, maybe there is some issue with the plugin element gets __del__ too frequently invoked (or something)???

    def __del__(self):
        # Settings were (most likely) changed to use tabs
        # or plugin was unloaded.
        # Complain about the former, if we have a test file.
        if self.header and not self.is_applicable(self.view.settings()):
            sublime.error_message("Syntax tests do not work properly with tabs as indentation."
                                  "\n\nYou MUST use spaces!")

And this issue is not related to #177, where files had actual tabs, but just wanted to comment on the general approach

I know it's not really your syntax test file, but if it annoys enough people, someone might actually submit a PR to fix that

This is just bad design to annoy many people on the off chance a tiny number would fix the issue, that's just not that important a goal to impose such costs, and this can also get annoyances like this one that might not be related to tabs

@FichteFoll FichteFoll added this to the 3.6.0 milestone Jan 28, 2024
This issue was closed.
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

No branches or pull requests

2 participants