You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Option to disable automatic theme switching in VSCode #50
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?
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.
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.
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?
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.
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?
Reacted by Sean Aubin and Thomas A. Christensen II
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.
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
Activity
liyao001 commentedon Sep 14, 2019
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.
trutane commentedon Nov 16, 2019
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?
Ebedthan commentedon Nov 19, 2019
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.
gmseabra commentedon Mar 7, 2020
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?
ababaian commentedon Mar 7, 2020
@liyao001 is the guy with the plan, I haven't worked on the VSCode implementation.
liyao001 commentedon Mar 7, 2020
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.
gmseabra commentedon Mar 9, 2020
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?
smk508 commentedon May 30, 2020
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.
ShrirajHegde commentedon Nov 22, 2020
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
leeleavitt commentedon Apr 1, 2021
this is making me lose my hair... What can be done?
here0009 commentedon Jul 13, 2021
I got the same issue, is this issue fixed. I set
"workbench.colorTheme": theme_namein the workbenchsetting.jsonfile to use other theme.Ebedthan commentedon Jul 29, 2021
PR #59 solves this issue. Once @liyao001 releases the updated version of the vscode plugin we should be done :)
liyao001 commentedon Jul 29, 2021
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.