Git Product home page Git Product logo

Comments (4)

drnic avatar drnic commented on July 21, 2024 2

For anyone else looking to get ytt extension working: I needed to uninstall the YAML plugin above.

But to uninstall YAML I had to uninstall Kubernetes extension. To uninstall Kubernetes extension I had to uninstall Helm extension.

from vscode-ytt.

ig0rsky avatar ig0rsky commented on July 21, 2024

Simple fix for this problem is to create a new language identifier for .ytt files instead of using the YAML identifier.
YAML identifier in VS Code is already overloaded, with everyone coming up with their extension for Kubernetes and Helm :D

Edit: Just found out about this: https://github.com/k14s/ytt/blob/develop/pkg/files/file.go#L15
But we can do this:

diff --git a/package.json b/package.json
index 22d2be2..483e62e 100644
--- a/package.json
+++ b/package.json
@@ -18,9 +18,14 @@
         "Programming Languages"
     ],
     "contributes": {
+        "languages": [{
+            "id": "ytt",
+            "extensions": [ ".yaml", ".yml" ],
+            "aliases": [ "YTT" ]
+        }],
         "grammars": [
             {
-                "language": "yaml",
+                "language": "ytt",
                 "scopeName": "source.yaml.ytt",
                 "path": "./syntaxes/ytt.tmLanguage.json"
             }

from vscode-ytt.

ig0rsky avatar ig0rsky commented on July 21, 2024

@cppforlife What do you think about this solution?

from vscode-ytt.

ewrenn8 avatar ewrenn8 commented on July 21, 2024

Thanks for the suggestion @ig0rsky! This change (4d3be9b) was included in our latest release, 0.0.3, which has been published to the marketplace. Users will still need to explicitly select the ytt language from the language selector if they have other YAML extensions installed, but otherwise it should work.

from vscode-ytt.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.