4 comments

  • mdaniel 18 hours ago
    I don't understand why VSCode itself doesn't already have this, since it is silly to have to install 100 extensions to add this behavior to every different possible place that a string literal with an interior language could appear

    I also suspect that unlike the JetBrains feature that does this (Language Injection), VSCode doesn't understand the code it just syntax highlights it. Meaning if we take the cited example and change it to the following, would VSCode turn it red?

      example3: | # js
        console.ogl('wat")
  • 9dev 13 hours ago
    Oh neat! Finally VS Code can do something IntelliJ has been able to do since decades. We’re so close to discovering why IDEs were a good idea in the first place!
    • xigoi 2 hours ago
      Why an IDE? Vim can do such things just fine.
      • 9dev 34 minutes ago
        Because I prefer an interface that isn't constrained to 70 year old typewriter conventions, thank you very much.
    • IshKebab 12 hours ago
      VSCode is an IDE. It's just a highly modular one, so it doesn't come with everything by default.
      • mdaniel 10 hours ago
        I believe the splitting of hairs is that plugins should build on top of core, solid, helpful primitives, and augment the core platform with esoteric things that the core audience wouldn't care about. That's not this plugin

        It also pragmatically makes for fragmentation in the experience, leading to the same outcome as the current LLM debate: "works great" "not for me"

        • IshKebab 3 hours ago
          > augment the core platform with esoteric things that the core audience wouldn't care about. That's not this plugin

          Seems like it is to me. Storing code inside yaml is pretty obviously a terrible idea and I haven't seen many systems do it (beyond Bash at least).

          • 9dev 31 minutes ago
            That is not an argument. The same implementation could be used to highlight SQL queries in arbitrary code, for example. What you want is the general ability to have regions of nested code in a file that use a different language than the rest of the file.
  • imcritic 9 hours ago
    Who (and in which valid cases) embeds some block of code in a programming language as a value to some key in a YAML file??
  • IshKebab 12 hours ago
    I pity whoever needs this.