Skip to content

Allow file name to language associations via settings #3612

Closed

Description

@rakkarage

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.

Activity

  1. aeschli commented on Mar 2, 2016

    @aeschli
    Contributor

    Rakka Rage (@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?

  2. rakkarage commented on Mar 3, 2016

    @rakkarage
    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

  3. changed the title [-]yaml .controller & .asset file[/-] [+]allow file association for yaml .controller & .asset file[/+] on Mar 4, 2016
  4. changed the title [-]allow file association for yaml .controller & .asset file[/-] [+]Allow file name to language associations via settings[/+] on Mar 4, 2016
  5. added
    feature-request
    on Mar 7, 2016
  6. bpasero commented on Mar 8, 2016

    @bpasero
    Contributor

    Erich Gamma (@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

  7. egamma commented on Mar 10, 2016

    @egamma
    Member

    Benjamin Pasero (@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"

  8. bpasero commented on Mar 11, 2016

    @bpasero
    Contributor

    Erich Gamma (@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?

  9. aeschli commented on Mar 11, 2016

    @aeschli
    Contributor

    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.

  10. egamma commented on Mar 11, 2016

    @egamma
    Member

    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 Martin Aeschlimann (@aeschli) 's wording suggestions

  11. bpasero commented on Mar 11, 2016

    @bpasero
    Contributor

    Ok pushed. Thanks!

  12. locked and limited conversation to collaborators on Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions