-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
allow customization of file type in statusbar #3164
Comments
cc @Etienne-K |
I see a number of different approaches. Here's two of them which I believe offer the most advantages: Simple but flexible configurationThe idea would be to be able to configure how the file type is displayed using two configuration options: [editor.statusline.file-type]
name = "short" # long/short/none
icon = true This is probably the highest level of language-independent configurability. It remains to be verified if The downside of this approach is that for each file type, we'd have to define a "short" name. Nonetheless, whether or not we use short names, and whether the devicons property is defined locally or globally, I prefer this solution because it provides quite some customizability without requiring "too much configuration effort" from the user. User-defined mappingsHere, we'd let the user define how each file type would be represented: [editor.statusline.file-type]
"name.rust" = "rs" # Could also use a devicon here
"name.typescript" = "ts" This would be the easiest to implement and fastest to achieve, but we're basically shifting work to the user. It remains to be seen if this would be an approach we really want. |
Honestly, I'm in strong favor of the second option (User-defined mappings). It allows customization beyond just "devicons" - if I wanted just My feeling is that if users are going out of their way to change the defaults they should be offered the widest possible latitude for customization. |
@Etienne-K - how opposed to the second option are you? I'd like to perhaps start a PR on this soon, but want to make sure we have reasonable consensus before I do so. |
Opposed? Not at all! :) Simply because this change would introduce new functionality (more specifically: configurability) which isn't there yet, and that, at the cost of... nothing I can think of. In other words, the way I see it, we're choosing between: "luxury but complicated to implement" and "great and easy to implement" So while I can't speak for everyone, I do think such a PR would definitely be welcome! Even if it generates additional discussion. |
See also #2869 for discussion of bringing in icons by configuration |
So - thinking about this some more, I don't think this mapping should be limited to the statusline (that is, it shouldn't be under |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Describe your feature request
Now that #2434 has been merged and we have this great new capability, I'd like to revisit the discussion started in this comment. Specifically, I'd like to get feedback on my idea to allow customization of file type to user-settable strings. "typescript" takes 9 characters in the statusbar, but with the properly installed glyphs can be reduced to a single "TS" icon. This gives more room for other statusbar plugins that will be coming in future updates.
As commented, this shouldn't be a heavy lift in terms of code - it looks to be a fairly straightforward PR - but it's probably worth some discussion to see whether this is a feature that others (besides myself) would use.
The text was updated successfully, but these errors were encountered: