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

Allow file name to language associations via settings #3612

Closed
rakkarage opened this issue Mar 2, 2016 · 8 comments
Closed

Allow file name to language associations via settings #3612

rakkarage opened this issue Mar 2, 2016 · 8 comments
Assignees
Labels
feature-request Request for new features or functionality verified Verification succeeded
Milestone

Comments

@rakkarage
Copy link

i have yaml in .controller, .asset etc files

%YAML 1.1
%TAG !u! tag:unity3d.com,2011:

when i open the file it does not detect it is yaml and sets it to plain text mode?
i can choose yaml from the language mode selector (to get nice coloring) but then i get an error on that first yaml 1.1 line

Expected a JSON object, array or literal
untitled

  1. should it auto detect? or is there a way to associate files with languages? (no, see link below)
  2. how to fix error?

thanks

https://code.visualstudio.com/docs/languages/overview
Q: Can I map additional file extensions to a language?
A: Currently this is not supported but it's on the way.

@aeschli
Copy link
Contributor

aeschli commented Mar 2, 2016

@rakkarage I can't reproduce the error you get on the first line. Do you have any extensions installed that might have an impact on Yaml?

@rakkarage
Copy link
Author

ya nevermind the error i cannot reproduce it either but i think it came because i changed the file type a couple times before i ended up on yaml. because each time i open the project i have to reselect yaml type for each file thanks

@aeschli aeschli changed the title yaml .controller & .asset file allow file association for yaml .controller & .asset file Mar 4, 2016
@aeschli aeschli assigned bpasero and unassigned aeschli Mar 4, 2016
@bpasero bpasero changed the title allow file association for yaml .controller & .asset file Allow file name to language associations via settings Mar 4, 2016
@bpasero bpasero added the feature-request Request for new features or functionality label Mar 7, 2016
@bpasero bpasero added this to the March 2016 milestone Mar 7, 2016
@bpasero bpasero closed this as completed Mar 7, 2016
@bpasero
Copy link
Member

bpasero commented Mar 8, 2016

@egamma pushed a change to have an action in the mode picker that hints a user to the fact that this is configurable now, feedback welcome:

image

@egamma
Copy link
Member

egamma commented Mar 10, 2016

@bpasero the quick box looks good.

The top most quick box entries are difficult to discover since the currently defined association is revealed. How about not revealing the current mode when the user has changed the association. In this way the top most entries are always visible?

What is a bit disturbing are the info messages that appear when you have a workspace settings, but this is not the common case
image

I suggest to make Configure in Settings... more verbose, e.g., Open Settings to configure default for ".html" or Configure default for ".html"

@bpasero
Copy link
Member

bpasero commented Mar 11, 2016

@egamma good ideas, here is the new look depending on what you do:

Untitled file
image

File with extension
image

File without extension
image

Should we stop showing the info message for workspace settings at all?

@aeschli
Copy link
Contributor

aeschli commented Mar 11, 2016

My wording suggestions:
Configure in Settings... -> Configure file associations...
Configure defaults for '.md' -> Configure file association for '.md'...

My understanding is that this will always open the settings, therefore the ellipses (...).
IMO it's also important to mention 'file associations' because that's the name of the setting and the concept the user should remember.

@egamma
Copy link
Member

egamma commented Mar 11, 2016

Should we stop showing the info message for workspace settings at all?

I'd keep it, it is useful since it tells me the setting.

👍 on @aeschli 's wording suggestions

@bpasero
Copy link
Member

bpasero commented Mar 11, 2016

Ok pushed. Thanks!

@bpasero bpasero added the verified Verification succeeded label Apr 29, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants