Skip to content

allape/IDEA-Caddyfile-plugin

Repository files navigation

Caddyfile language support

Supported file types: Caddyfile, Privoxy

Plugin Marketplace

https://plugins.jetbrains.com/plugin/24642-caddyfile

Features

  • Auto-completion for directives, sub-directives, matchers, snippets, placeholders
  • Find Usage and Go To Declaration for matchers, snippets
  • Add documentation dialog for directives, matchers, snippets
  • Multi-files support
  • Find Usage and Go To Declaration for custom variables with vars directive

Screenshots

documentation.png matcher-reference.png password-ops.png

Known Issues

  • Global options block after any no-body directive will be interpolated as a directive block instead of a global block
    • # global block
      {
          debug        
      }
      
      try_files
      
      # should be a global block, but here in PSI tree it is a directive block of `try_files` above
      {
          debug
      }
  • Lack of testing, only tested with simple Caddyfiles
  • ICON file may violate legal issue

Dev

  • Install Grammar-Kit plugin
  • Install Plugin DevKit plugin
  • Open Caddyfile.simple.bnf, right-click on the editor and select "Generate Parser Code"
  • Open Caddyfile.simple.flex, right-click on the editor and select "Run JFlex Generator"
    • At first time generation, you will be prompted to install JFlex plugin
  • Run Gradle task intellij/runIde to run
    • Or run intellij/buildPlugin to build this plugin, and installable zip file will be located at build/distributions