Skip to content

VSCode plugin

phlax edited this page Mar 30, 2021 · 4 revisions

VSCode plugin for Envoy

aim

Produce a VSCode plugin that provides

  • validation of Envoy configuration files
  • autocomplete for configuration fields
  • hover over fields to provide further information

method

questions

  • should we provide jsonschema for config types other than Bootstrap ?
    • this is necessary if using one of the DS methods to push config
  • im also wondering about versions and strictness etc

challenges

  • correctly generate jsonschema for all extensions and known extension types
    • these are matched through annotations in the api
    • mostly the groundwork for this is complete, but some of the extensions/types may not be positioned correctly atm
  • currently yaml-language-server doesnt handle "@type" properly
    • user has to input the "@type" correctly from the outset or autocomplete/hover stops working
    • my guess is that we will have to resolve this ourselves and have it included upstream
  • conditional schema is a little bit buggy
  • formatting rst descriptions
    • comments in the proto files are converted to descriptions that are shown when user hovers
    • as raw text this makes the descriptions unhelpful and full of raw rst
    • if we can convert the descriptions to markdown yaml-language-server does have a custom jsonschema field for markdownDescription but this is slightly buggy (see https://github.com/redhat-developer/vscode-yaml/issues/417)
    • converting rst -> md is imperfect
      • eg markdown lists expect a blank line before the list (which eg pandoc doesnt seem to resolve)
    • in order to parse links correctly we will need to first generate the docs and then we can use the generated objects.inv file to map the rst ref links to absolute urls
    • some of the descriptions may be less helpful in a vscode plugin context than they are in the docs
    • if we keep the descriptions very simple then we can avoid using a converter (eg pandoc) but there isnt an easy way to programatically keep these "simple"
Clone this wiki locally