Skip to content

georgewfraser/hellolang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The simplest possible IntelliJ custom language plugin. Implements the Hello language, whose purpose is to exercise the features of the IntelliJ API in the simplest possible context.

Hello language

The Hello language consists of:

Strings

"Hello world!"

Symbols

x

Let expressions

let x = "Hello world!" in x

Plugin features

  • Syntax highlighting
  • Annotations
  • Symbol references
  • In-place renaming
  • Code formatting
  • Test fixtures

TODO plugin features

  • Reference Java symbols from Hello
  • Reference Hello symbols from Java (requires additional syntax, PsiReferenceContributor?)
  • Run configuration that invokes Hello interpreter
  • Compilation of Hello files using ASM

Building

Running 'Build -> Prepare Plugin Module 'hello' for deployment' will produce hello.jar in the base directory.

'hello.jar' can be installed with 'File -> Settings', 'Plugins', 'Install plugin from disk'.

Once you've installed the plugin, the 'test.hello' file should show up with a fancy icon with the word 'Hi' in green text.

Layout

.idea/

Intellij project files

META-INF/

Contains plugin.xml, the plugin configuration file.

resources/

Icons.

src/

Java sources.

test.hello

Once you've built and installed the plugin, this file should show up in the project tree with a special icon with the word 'Hi' in green text.

About

The simplest possible IntelliJ custom language plugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages