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

Snippet Default Language by folder #3009

Open
stall0ne1337 opened this issue May 15, 2019 · 3 comments

Comments

Projects
None yet
4 participants
@stall0ne1337
Copy link

commented May 15, 2019

Current behavior

Currently it is only possible to set a Snippet Default Language globally in the settings.

Expected/Suggested behavior

It would be nice to have the option to set a different default language on folder level so that different folders for different languages don't force me to manually change the language on every snippet if it doesn't match the global default language.

I made a UI mockup to visualize how it could look for the User:

UI Mockup

Steps to reproduce

Currently

  1. Select Preferences
  2. Select the Interface tab
  3. In the category Editor select the Snippet Default Language in the dropdown

Suggested Addition

  1. Select Preferences
  2. Select the Storage tab
  3. Click Edit on a folder in your Storage Locations
  4. In addition to the label for the name switching to a textbox to change the name there should also be a dropdown that enables the user to select a default language for that folder.

Environment

Desktop

@MiloTodt

This comment has been minimized.

Copy link
Contributor

commented May 16, 2019

Idea for alternative implementation:

If the name of the location is a language on that list, how about setting that as the default snippet language for that folder?

I'd have to imagine if you're calling a folder something like C++, Javascript, etc it's a somewhat fair assumption that it will contain code in that language.

@arcturus140

This comment has been minimized.

Copy link
Contributor

commented May 16, 2019

I like the idea. languages could be sorted by frequency per folder. Also a way to disable language options, like in a config file for example. There are so many you aren't gonna need them all.

Otherwise I'd need a monitor twice as high to pick my language without scrolling.

@stall0ne1337

This comment has been minimized.

Copy link
Author

commented May 16, 2019

If the name of the location is a language on that list, how about setting that as the default snippet language for that folder?

Mh.. It would be better than nothing but would still not work so well in a few scenarios.. For example, I have a folder named WPF, but the language (markup) setting for that would be XML (or XAML). As you describe it this wouldnt really work in these cases unless you could map it somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.