Skip to content

Commit

Permalink
Refactor pluin name, contributing page
Browse files Browse the repository at this point in the history
  • Loading branch information
tgrospic committed Jul 12, 2017
1 parent 60412c3 commit 5b7dcc7
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 18 deletions.
16 changes: 16 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Contributing

Any suggestions, bugs, testing, pull-requests, issues are very welcome.

## Development

More info on [README#install](./README.md#install) page section.

## TODO

- write Formatter
- write Completion Contributor
- write Reference Contributor
- plugin actions
- connect with the compiler (get semantic info)
- ...
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# [RHOlang][rho-github] IntelliJ IDEA language plugin
# [Rholang][rho-github] IntelliJ IDEA language plugin

![beta][beta-badge]

This is the early stage of editor support for [RHOlang][rho-github]. :smile:
This is the early stage of editor support for [Rholang][rho-github]. :smile:

RHOlang is official language for [RChain][rchain-coop] distributed virtual machine. Is is currently in active development and syntax can slightly change. Current version of plugin follows this version of [RHO grammar][rho-bnf] and available examples.
Rholang is official language for [RChain][rchain-coop] distributed virtual machine. Is is currently in active development and syntax can slightly change. Current version of plugin follows this version of [Rho grammar][rho-bnf] and available examples.

I tried to make parser more forgiving so it can highlight wider range of correct programs. With more context information it could be much more precise. For now this will not recognize `*my_chan.ref[index]!(my_val)` although I'm not sure whether this is a valid syntax.

I found interesting that many grammar rules have a strong gravity towards `Proc`ess :cyclone: but that should not be strange for π-calculus, _λ-expression_ is not the main _actor_ here. Which reminds me that RHOlang can be interesting to Erlang/Elixir programmers who knows how hard is to coordinate the names of processes. With _reflective higher-order_ super powers that comes with the compiler and type checker it will be pleasure to write smart contracts.
I found interesting that many grammar rules have a strong gravity towards `Proc`ess :cyclone: but that should not be strange for π-calculus, _λ-expression_ is not the main _actor_ here. Which reminds me that Rholang can be interesting to Erlang/Elixir programmers who knows how hard is to coordinate the names of processes. With _reflective higher-order_ super powers that comes with the compiler and type checker it will be pleasure to write smart contracts.

> The π-calculus is elegantly simple, it has very few terms and so is a very small language, yet is very expressive. Functional programs can be encoded into the π-calculus, and the encoding emphasises the dialogue nature of computation, drawing connections with game semantics. [Wikipedia][pi-wiki]
Expand All @@ -24,7 +24,7 @@ From IntelliJ IDEA [plugins repository][rho-idea] searchable inside the editor.

Or download **rholang-idea.jar** from the latest [release][releases] and install through [File > Settings > Plugins][idea-install-from-disk] menu.

## Contribute
## [Contributing](./CONTRIBUTING.md)

Any suggestions, bugs, testing, pull-requests, issues are very welcome.

Expand All @@ -37,7 +37,7 @@ Any suggestions, bugs, testing, pull-requests, issues are very welcome.
- create new Plugin Run configuration with default setup
- run/debug in a separate editor

## TODO
### TODO

- write Formatter
- write Completion Contributor
Expand Down
15 changes: 8 additions & 7 deletions resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
<idea-plugin>
<id>coop.rchain.lang</id>
<name>RHOlang</name>
<version>0.0.1</version>
<name>Rholang</name>
<version>0.0.2</version>
<vendor email="grospic@gmail.com" url="https://rchain.coop">RChain.coop</vendor>

<description><![CDATA[
Language support for <b><a href="https://github.com/rchain/Rholang">RHOlang</a></b>.
Language support for <b><a href="https://github.com/rchain/Rholang">Rholang</a></b>.
<em>Official language for <a href="https://www.rchain.coop">RChain</a> distributed virtual machine.<br><br>
]]></description>

<change-notes><![CDATA[
<ul>
<li><b>0.0.2</b>: Update plugin name.</li>
<li><b>0.0.1</b>: Syntax highlighting and comments support. Initial version.</li>
</ul>
]]>
Expand All @@ -27,11 +28,11 @@
<extensions defaultExtensionNs="com.intellij">
<!-- Add your extensions here -->
<fileTypeFactory implementation="coop.rchain.lang.RhoFileTypeFactory"/>
<lang.parserDefinition language="RHOlang" implementationClass="coop.rchain.lang.RhoParserDefinition"/>
<lang.syntaxHighlighterFactory language="RHOlang" implementationClass="coop.rchain.lang.RhoSyntaxHighlighterFactory"/>
<lang.commenter language="RHOlang" implementationClass="coop.rchain.lang.RhoCommenter"/>
<lang.parserDefinition language="Rholang" implementationClass="coop.rchain.lang.RhoParserDefinition"/>
<lang.syntaxHighlighterFactory language="Rholang" implementationClass="coop.rchain.lang.RhoSyntaxHighlighterFactory"/>
<lang.commenter language="Rholang" implementationClass="coop.rchain.lang.RhoCommenter"/>
<colorSettingsPage implementation="coop.rchain.lang.RhoColorSettingsPage"/>
<annotator language="RHOlang" implementationClass="coop.rchain.lang.RhoHighlightingAnnotator"/>
<annotator language="Rholang" implementationClass="coop.rchain.lang.RhoHighlightingAnnotator"/>
</extensions>

<actions>
Expand Down
2 changes: 1 addition & 1 deletion src/coop/rchain/lang/RhoColorSettingsPage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ contract <CONTRACT>HelloWorld</CONTRACT>( <BIND_PARAMETER>world1</BIND_PARAMETER
"""
}

override fun getDisplayName() = "RHOlang"
override fun getDisplayName() = "Rholang"
override fun getIcon() = RhoIcons.DEFAULT
override fun getAttributeDescriptors() = ATTRS
override fun getColorDescriptors(): Array<ColorDescriptor> = ColorDescriptor.EMPTY_ARRAY
Expand Down
2 changes: 1 addition & 1 deletion src/coop/rchain/lang/RhoFileType.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class RhoFileTypeFactory : FileTypeFactory() {
class RhoFileType private constructor() : LanguageFileType(RhoLanguage.INSTANCE) {

override fun getName(): String {
return "RHOlang file"
return "Rholang file"
}

override fun getDescription(): String {
Expand Down
4 changes: 2 additions & 2 deletions src/coop/rchain/lang/RhoLanguage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package coop.rchain.lang

import com.intellij.lang.Language

class RhoLanguage private constructor() : Language("RHOlang") {
class RhoLanguage private constructor() : Language("Rholang") {
override fun isCaseSensitive() = true

override fun getDisplayName() = "RHOlang"
override fun getDisplayName() = "Rholang"

companion object {
val INSTANCE = RhoLanguage()
Expand Down
2 changes: 1 addition & 1 deletion src/coop/rchain/lang/psi/RhoFile.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class RhoFile(viewProvider: FileViewProvider) : PsiFileBase(viewProvider, RhoLan
}

override fun toString(): String {
return "RHOlang File"
return "Rholang File"
}

override fun getIcon(flags: Int): Icon? {
Expand Down

0 comments on commit 5b7dcc7

Please sign in to comment.