Contribute language association from extensions in VSCodeHow can I write a vsc snippets extension for a language that is not listed on visual studio codeDisable wordBasedSuggestions from an ExtensionHow do you format code in Visual Studio Code (VSCode)Multiline editing in VSCodeHow to switch word wrap on and off in VSCode?don't know where to get data from vsCode autocomplete listShow HTML5 <video> on previewHtml command in vscode extensionVSCode Extension REST calls not workingImplementing a Preview channel of a vscode extensionIs vscode-python extension for VSCode is a Language Service or just an extension only?Does VSCode API allow an extension to provide custom logic for merging results returned by multiple extensions for the same language?How to use built-in Javascript extension to automatically find symbols in a JS file when developing a custom extension?

How to denote matrix elements succinctly?

Which big number is bigger?

Can I criticise the more senior developers around me for not writing clean code?

How can Republicans who favour free markets, consistently express anger when they don't like the outcome of that choice?

How can I print the prosodic symbols in LaTeX?

"Hidden" theta-term in Hamiltonian formulation of Yang-Mills theory

Overlay of two functions leaves gaps

How can I practically buy stocks?

Checks user level and limit the data before saving it to mongoDB

Extension of 2-adic valuation to the real numbers

As an international instructor, should I openly talk about my accent?

Function pointer with named arguments?

How do I reattach a shelf to the wall when it ripped out of the wall?

Who was the lone kid in the line of people at the lake at the end of Avengers: Endgame?

Can SQL Server create collisions in system generated constraint names?

Is there any official lore on the Far Realm?

Mistake in years of experience in resume?

bldc motor, esc and battery draw, nominal vs peak

A ​Note ​on ​N!

Was there a shared-world project before "Thieves World"?

Check if a string is entirely made of the same substring

What is the smallest unit of eos?

Two field separators (colon and space) in awk

What makes accurate emulation of old systems a difficult task?



Contribute language association from extensions in VSCode


How can I write a vsc snippets extension for a language that is not listed on visual studio codeDisable wordBasedSuggestions from an ExtensionHow do you format code in Visual Studio Code (VSCode)Multiline editing in VSCodeHow to switch word wrap on and off in VSCode?don't know where to get data from vsCode autocomplete listShow HTML5 <video> on previewHtml command in vscode extensionVSCode Extension REST calls not workingImplementing a Preview channel of a vscode extensionIs vscode-python extension for VSCode is a Language Service or just an extension only?Does VSCode API allow an extension to provide custom logic for merging results returned by multiple extensions for the same language?How to use built-in Javascript extension to automatically find symbols in a JS file when developing a custom extension?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















How can I contribute a language association from an extension in VSCode?



In settings.json it would've looked like this:



"files.associations": 
"*.something": "markdown"



I know that it's possible to use vscode.languages.setTextDocumentLanguage. But that seems excessive to do every time the activeEditor changes, and it's one more event listener.



Using the API to write into user settings doesn't seem right either.










share|improve this question






























    1















    How can I contribute a language association from an extension in VSCode?



    In settings.json it would've looked like this:



    "files.associations": 
    "*.something": "markdown"



    I know that it's possible to use vscode.languages.setTextDocumentLanguage. But that seems excessive to do every time the activeEditor changes, and it's one more event listener.



    Using the API to write into user settings doesn't seem right either.










    share|improve this question


























      1












      1








      1








      How can I contribute a language association from an extension in VSCode?



      In settings.json it would've looked like this:



      "files.associations": 
      "*.something": "markdown"



      I know that it's possible to use vscode.languages.setTextDocumentLanguage. But that seems excessive to do every time the activeEditor changes, and it's one more event listener.



      Using the API to write into user settings doesn't seem right either.










      share|improve this question
















      How can I contribute a language association from an extension in VSCode?



      In settings.json it would've looked like this:



      "files.associations": 
      "*.something": "markdown"



      I know that it's possible to use vscode.languages.setTextDocumentLanguage. But that seems excessive to do every time the activeEditor changes, and it's one more event listener.



      Using the API to write into user settings doesn't seem right either.







      visual-studio-code vscode-extensions






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 14 at 16:14









      Gama11

      13.2k52652




      13.2k52652










      asked Mar 9 at 8:57









      AlexAlex

      13.9k44764




      13.9k44764






















          2 Answers
          2






          active

          oldest

          votes


















          1














          Yes, extensions can contribute settings via configurationDefaults. However, I don't think this works for the files.associations setting.



          What you can do instead is contribute a new file extension for the markdown language:



          "contributes": 
          "languages": [

          "id": "markdown",
          "extensions": [
          "something"
          ]

          ]



          This won't replace the previous registration of the markdown language, instead it will be merged with it.






          share|improve this answer






























            0














            Make the following change to your package.json, I figured it out by studying an existing extension.



            You must add . before something



            Also see :
            How can I write a vsc snippets extension for a language that is not listed on visual studio code



            "contributes": 
            "languages": [

            "id": "markdown",
            "extensions": [
            ".something"
            ],

            ]






            share|improve this answer























              Your Answer






              StackExchange.ifUsing("editor", function ()
              StackExchange.using("externalEditor", function ()
              StackExchange.using("snippets", function ()
              StackExchange.snippets.init();
              );
              );
              , "code-snippets");

              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "1"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













              draft saved

              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55075628%2fcontribute-language-association-from-extensions-in-vscode%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              1














              Yes, extensions can contribute settings via configurationDefaults. However, I don't think this works for the files.associations setting.



              What you can do instead is contribute a new file extension for the markdown language:



              "contributes": 
              "languages": [

              "id": "markdown",
              "extensions": [
              "something"
              ]

              ]



              This won't replace the previous registration of the markdown language, instead it will be merged with it.






              share|improve this answer



























                1














                Yes, extensions can contribute settings via configurationDefaults. However, I don't think this works for the files.associations setting.



                What you can do instead is contribute a new file extension for the markdown language:



                "contributes": 
                "languages": [

                "id": "markdown",
                "extensions": [
                "something"
                ]

                ]



                This won't replace the previous registration of the markdown language, instead it will be merged with it.






                share|improve this answer

























                  1












                  1








                  1







                  Yes, extensions can contribute settings via configurationDefaults. However, I don't think this works for the files.associations setting.



                  What you can do instead is contribute a new file extension for the markdown language:



                  "contributes": 
                  "languages": [

                  "id": "markdown",
                  "extensions": [
                  "something"
                  ]

                  ]



                  This won't replace the previous registration of the markdown language, instead it will be merged with it.






                  share|improve this answer













                  Yes, extensions can contribute settings via configurationDefaults. However, I don't think this works for the files.associations setting.



                  What you can do instead is contribute a new file extension for the markdown language:



                  "contributes": 
                  "languages": [

                  "id": "markdown",
                  "extensions": [
                  "something"
                  ]

                  ]



                  This won't replace the previous registration of the markdown language, instead it will be merged with it.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 9 at 9:45









                  Gama11Gama11

                  13.2k52652




                  13.2k52652























                      0














                      Make the following change to your package.json, I figured it out by studying an existing extension.



                      You must add . before something



                      Also see :
                      How can I write a vsc snippets extension for a language that is not listed on visual studio code



                      "contributes": 
                      "languages": [

                      "id": "markdown",
                      "extensions": [
                      ".something"
                      ],

                      ]






                      share|improve this answer



























                        0














                        Make the following change to your package.json, I figured it out by studying an existing extension.



                        You must add . before something



                        Also see :
                        How can I write a vsc snippets extension for a language that is not listed on visual studio code



                        "contributes": 
                        "languages": [

                        "id": "markdown",
                        "extensions": [
                        ".something"
                        ],

                        ]






                        share|improve this answer

























                          0












                          0








                          0







                          Make the following change to your package.json, I figured it out by studying an existing extension.



                          You must add . before something



                          Also see :
                          How can I write a vsc snippets extension for a language that is not listed on visual studio code



                          "contributes": 
                          "languages": [

                          "id": "markdown",
                          "extensions": [
                          ".something"
                          ],

                          ]






                          share|improve this answer













                          Make the following change to your package.json, I figured it out by studying an existing extension.



                          You must add . before something



                          Also see :
                          How can I write a vsc snippets extension for a language that is not listed on visual studio code



                          "contributes": 
                          "languages": [

                          "id": "markdown",
                          "extensions": [
                          ".something"
                          ],

                          ]







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Apr 14 at 16:30









                          Xiaoou WangXiaoou Wang

                          12




                          12



























                              draft saved

                              draft discarded
















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55075628%2fcontribute-language-association-from-extensions-in-vscode%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              AWS Lex not identifying response if by a variable The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceEnforcing custom enumeration in AWS LEX for slot valuesHow to give response based on user response in Amazon Lex?Intercepting AWS Lambda Response to a AWS Lex QueryLex chat bot error: Reached second execution of fulfillment lambda on the same utteranceamazon lex showing invalid responseLambda response send back to Lex slot?Response card in Amazon lexAmazon Lex - Lambda response return HTML to botHow can I solve 424 (Failed Dependency) (python) obtained from Amazon lex?

                              Алба-Юлія

                              Захаров Федір Захарович