Skip to content

Latest commit

 

History

History
104 lines (76 loc) · 3.91 KB

DEVELOPMENT.adoc

File metadata and controls

104 lines (76 loc) · 3.91 KB

Development

Roadmap

  • ❏ fix TODOs in lexer and parser grammars

  • ❏ highlight Pkldoc

  • ✓ navigate to modules with module: uris (search on project class path)

  • ✓ navigate to modules with http(s): uris

  • ✓ complete module uris

  • ✓ complete keywords (context-sensitive)

  • ✓ complete methods and properties

  • ✓ documentation support (e.g., quick documentation popup)

  • ✓ collapse module doc comment by default (often very large)

  • ✓ go to class/symbol

  • ❏ evaluate Pkl module via run configuration

  • ❏ implement PSI stubs and stub indexing, improve Go To Class/Symbol

  • additional highlighting/checking via annotator, e.g.:

    • ❏ highlight annotations

    • ❏ check multi-line string invariants (leading/trailing newline, valid indentation)

    • ✓ check validity of modifiers, flag duplicate modifiers

  • navigate to/complete elements in

    • ✓ lexical scope

    • ✓ pkl.base

      • ✓ take pkl.base module from IntelliJ module class path

    • ✓ imported modules (take stdlib modules from the same places as pkl.base)

    • ✓ amended/extended module (may not have module. qualifier when referenced from root scope)

  • implement any other feature listed in the custom language support guide

  • ✓ rename refactoring

Setup

  • Install {uri-jdk}[JDK 11]

  • Install {uri-intellij}[IntelliJ IDEA]

    • Install Grammar-Kit plugin

    • To import the project into IntelliJ, go to File→Open and select the project’s root directory. If the project is opened but not imported, look for a popup in the lower right corner and click its "Import Gradle Project" link.

Build Commands

./gradlew build performs a full build.

./gradlew runIde starts a fresh IDE with the plugin installed.

Debugging

To debug the plugin, go to the runIde task in the Gradle window and debug it.

Release

Before a release, run Code→Inspect Code→Whole Project (at least) for pkl-hub project and check the results.

The release CI build publishes the plugin zip but doesn’t update the plugin update site. To update the plugin update site, edit updatePlugins.xml on gh-pages branch.

Resources

Dynamic Plugin Reloading

  1. Start dev instance

  2. Make a code change

  3. Run ./gw prepareSandbox

  4. Plugin reloads automatically