Skip to content

Option to disable automatic theme switching in VSCode #50

Closed

Description

@Benjamin-Lee

I use One Dark and find that bioSyntax is perfectly usable when I manually change it back with a FASTA file open. I do find the theme changing to be slightly jarring. Is it possible to create an option to disable automatic theme switching in VSCode?

One Dark:
image

bioSyntax:
image

Activity

  1. liyao001 commented on Sep 14, 2019

    @liyao001
    Contributor

    bioSyntax for VSCode works as a combination of both theme and script. For most file types, bioSyntax uses the defined theme rules to render files. In implementation, bioSyntax's theme is actually an extension of the default theme (dark VS), and I'm not sure whether VSCode accept partially defined themes, which we only define themes on interested content. For other files (like fasta file), we use script to assign theme for each character, so it's possible for the plugin to only affect certain characters without change the entire appearance. I'll look into this issue to see whether we can make it happen.

  2. trutane commented on Nov 16, 2019

    @trutane

    I ran into this issue when attempting to switch my color theme for editing code and other non-bio files. My fix was to disable the bioSyntax extension to prevent its automatic theme switching which would revert the active theme in my workspace back to whatever was in my settings.json.

    See my comments on the VSCode reddit:
    https://www.reddit.com/r/vscode/comments/dftwew/workbenchcolortheme_rewrites_itself/

    What do you think about the idea of having a "bioSyntax" colorTheme setting?

  3. Ebedthan commented on Nov 19, 2019

    @Ebedthan
    Contributor

    Yes, of course, I think it's a good idea. Let me dig into your proposition and see if we can fix it as soon as possible.

  4. gmseabra commented on Mar 7, 2020

    @gmseabra

    I'm having the same problem. I'd rather use the Default Dark theme for python files, but if bioSyntax in enabled it keeps changing the theme back to it whenever I switch tabs or save. Apparently, the problem is that it keeps rewriting the json file, and overwrites any change we make.

    Would it be possible to associate bioSyntax only to certain file extensions?

  5. ababaian commented on Mar 7, 2020

    @ababaian
    Member

    @liyao001 is the guy with the plan, I haven't worked on the VSCode implementation.

  6. liyao001 commented on Mar 7, 2020

    @liyao001
    Contributor

    VSCode doesn't provide support for minimum themes, which means as a new plugin/theme, if you want to change the appearance of the editor, you have to provide definition for everything. So for bioSyntax for VSCode used the default dark theme as it's base, and I'm considering to release a new version of bioSyntax for VSC using the build-in light theme.

    Different color themes for different languages is discussed many times on VSC's official repo. In brief, there is no official support/api for doing that, even though you can do this in sublime text and Atom. I noticed that there is a plugin on VS' market named Theme by language, maybe you can try to use this plugin to assign different colors for different languages.

  7. gmseabra commented on Mar 9, 2020

    @gmseabra

    I may be wrong, but I think the issue here is different. It's not about the definitions in bioSyntax, it it is the fact that, once the bioSyntax plugin s enabled, we cannot choose change to other theme. It just keeps changing the theme to bioSyntax whenever we change tabs or save the file.

    So, the question is not about the theme itself, but why does it prevent us to change the theme without having to completely disable the extension?

  8. smk508 commented on May 30, 2020

    @smk508

    Hey guys, is there any progress on this? I like having a syntax highlighter for biological file formats, but I don't like that it forces everything to use the same color theme and doesn't let me switch back.

    In particular I noticed that sometimes, it doesn't let me change the theme back for me at all. The theme can get stuck on bioSyntax, and if I go into settings and try to change it, it changes and then changes back as soon as I tab to any other file.

  9. ShrirajHegde commented on Nov 22, 2020

    @ShrirajHegde

    Hey guys, is there any progress on this? I like having a syntax highlighter for biological file formats, but I don't like that it forces everything to use the same color theme and doesn't let me switch back.

    In particular I noticed that sometimes, it doesn't let me change the theme back for me at all. The theme can get stuck on bioSyntax, and if I go into settings and try to change it, it changes and then changes back as soon as I tab to any other file.

    Yes same, Even if I change the theme, once I open a format compatible with the extension this extension changes the theme to biosyntax permanently

  10. leeleavitt commented on Apr 1, 2021

    @leeleavitt

    this is making me lose my hair... What can be done?

  11. here0009 commented on Jul 13, 2021

    @here0009

    I got the same issue, is this issue fixed. I set "workbench.colorTheme": theme_name in the workbench setting.json file to use other theme.

  12. Ebedthan commented on Jul 29, 2021

    @Ebedthan
    Contributor

    PR #59 solves this issue. Once @liyao001 releases the updated version of the vscode plugin we should be done :)

  13. linked a pull request that will close this issueImprove VSCode color theme support #59on Jul 29, 2021
  14. liyao001 commented on Jul 29, 2021

    @liyao001
    Contributor

    Glad to see a solution to this problem, thank you MillironX! I will work on rebuilding the plugin and uploading it to VS later today.

    Update: Changes synchronized to VS Marketplace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions