Skip to content

Commit

Permalink
support macro functions highlighting and type highlighting in struct …
Browse files Browse the repository at this point in the history
…decl and update to 0.0.6
  • Loading branch information
hapeeeeee committed Jun 7, 2024
1 parent 7e5b8fa commit 05e2dcf
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 59 deletions.
Binary file added ChangeLog/0.0.6/ChangeLog.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions ChangeLog/0.0.6/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Lastest Update
#### 1. Supported more syntax highlighting
<li>macro functions</li>
<li>types and generics in structures declaration</li>
91 changes: 56 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,65 @@
# cairo-plugin

![Build](https://github.com/movebit/cairo-plugin/workflows/Build/badge.svg)
[![Version](https://img.shields.io/jetbrains/plugin/v/PLUGIN_ID.svg)](https://plugins.jetbrains.com/plugin/PLUGIN_ID)
[![Downloads](https://img.shields.io/jetbrains/plugin/d/PLUGIN_ID.svg)](https://plugins.jetbrains.com/plugin/PLUGIN_ID)

## Template ToDo list
- [x] Create a new [IntelliJ Platform Plugin Template][template] project.
- [ ] Get familiar with the [template documentation][template].
- [ ] Adjust the [pluginGroup](./gradle.properties), [plugin ID](./src/main/resources/META-INF/plugin.xml) and [sources package](./src/main/kotlin).
- [ ] Adjust the plugin description in `README` (see [Tips][docs:plugin-description])
- [ ] Review the [Legal Agreements](https://plugins.jetbrains.com/docs/marketplace/legal-agreements.html?from=IJPluginTemplate).
- [ ] [Publish a plugin manually](https://plugins.jetbrains.com/docs/intellij/publishing-plugin.html?from=IJPluginTemplate) for the first time.
- [ ] Set the `PLUGIN_ID` in the above README badges.
- [ ] Set the [Plugin Signing](https://plugins.jetbrains.com/docs/intellij/plugin-signing.html?from=IJPluginTemplate) related [secrets](https://github.com/JetBrains/intellij-platform-plugin-template#environment-variables).
- [ ] Set the [Deployment Token](https://plugins.jetbrains.com/docs/marketplace/plugin-upload.html?from=IJPluginTemplate).
- [ ] Click the <kbd>Watch</kbd> button on the top of the [IntelliJ Platform Plugin Template][template] to be notified about releases containing new features and fixes.

<!-- Plugin description -->
This Fancy IntelliJ Platform Plugin is going to be your implementation of the brilliant ideas that you have.

This specific section is a source for the [plugin.xml](/src/main/resources/META-INF/plugin.xml) file which will be extracted by the [Gradle](/build.gradle.kts) during the build process.

To keep everything working, do not remove `<!-- ... -->` sections.
<!-- Plugin description end -->
## Introduction
This project supports the Cairo language in IDEA Ultimate Edition through a language server.

## features
These features are available for free with IntelliJ IDEA Ultimate Edition:
<li>highlighting</li>
<li>completion</li>
<li>formatting</li>
<li>hover</li>
<li>goto definition</li>


## Installation

- Using the IDE built-in plugin system:

<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "cairo-plugin"</kbd> >
<kbd>Install</kbd>

- Manually:
Before using this plugin, Ensure that the executable ''scarb-cairo-language-server"(mac/linux) or 'scarb-cairo-language-server.exe'(windows) exists in the operating system. Typically, it should be in the same directory as the executable 'scarb.exe' or 'scarb'.

You can also find the corresponding version of Scarb and the operating system on this. Download the compressed package, unzip it, and locate 'scarb-cairo-language-server' after extraction.

Mac/Linux

1 Change the permissions of the executable 'scarb-cairo-language-server' to 777.

2 Install this plugin

3 Enter "Cairo Analyzer Settings" by selecting "Intellij IDEA -> preferences -> Tools -> Cairo Analyzer Setting".

4 Enter the local address of the language server and corelib, such as "/Users/UserName/SomePath/cairo-language-server" and "/Users/UserName/SomePath/corelib"

5 Allow the execution of cairo-language-server in System Preferences and grant permissions in IntelliJ IDEA on macOS

6 Restart IDEA.

Note:Using absolute paths, not relative paths or symbols like '~'.

Windows

1 Install this plugin

2 Enter "Cairo Analyzer Settings" by selecting "File -> Settings -> Tools -> Cairo Analyzer Setting".

3 Enter the local address of the language server and corelib, such as "C:\Users\UserName\SomePath\cairo-language-server.exe" and "C:\Users\UserName\SomePath\corelib"

4 Restart IDEA.

Download the [latest release](https://github.com/movebit/cairo-plugin/releases/latest) and install it manually using
<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd>
Note:Using absolute paths, not relative paths or symbols like '~'.

## Lastest Update
#### 1. Supported more syntax highlighting
<li>macro functions</li>
<li>types and generics in structures declaration</li>

---
Plugin based on the [IntelliJ Platform Plugin Template][template].
## ToDo List
#### 1. Supported more syntax highlighting `next version`
<li>Constant highlighting</li>
<li>use statement highlighting</li>
<li>Single-quote string highlighting</li>
<li>Traits highlighting</li>

[template]: https://github.com/JetBrains/intellij-platform-plugin-template
[docs:plugin-description]: https://plugins.jetbrains.com/docs/intellij/plugin-user-experience.html#plugin-description-and-presentation
#### 2. StructView
#### 3. Brace Matching
#### 4. Folding Code
#### 5. Feature Switch in Setting
#### 6. Inlay Hints
38 changes: 14 additions & 24 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,16 @@
<idea-plugin>
<id>Cairo_Analyze</id>
<name>Cairo Analyzer</name>
<vendor url="https://www.scalebit.xyz/" email="623151737@qq.com">BitsLab.ScaleBit</vendor>
<version>0.0.3</version>
<vendor url="https://www.scalebit.xyz/" email="jason@scalebit.com">BitsLab.ScaleBit</vendor>
<version>0.0.6</version>
<idea-version since-build="233.11799.30"/>

<depends>com.intellij.modules.ultimate</depends>
<depends>com.intellij.modules.platform</depends>
<depends>com.intellij.modules.lang</depends>
<description><![CDATA[
<p style="font-size: 16px;">Introduction</p>
<p>Support for the Cairo language.</p>
<hr>
<p style="font-size: 16px;">Usage</p>
<p>0 Change the permissions of the executable 'cairo-language-server' to 777. </p>
<p>1 Install this plugin</p>
<p>2 Enter "Cairo Analyzer Settings". </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;2.1 On Windows OS, select "File -> Settings -> Tools -> Cairo Analyzer Setting". </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;2.2 On macOS, select "Intellij IDEA -> preferences -> Tools -> Cairo Analyzer Setting". </p>
<p>3 enter the local address of the language server and corelib, such as "C:\Users\UserName\SomePath\cairo-language-server.exe" and "C:\Users\UserName\SomePath\corelib" </p>
<p>4 Allow the execution of cairo-language-server in System Preferences and grant permissions in IntelliJ IDEA on macOS</p>
<p>5 Restart IDEA.</p>
<hr>
<p style="font-size: 16px;">Features</p>
These features are available for free with IntelliJ IDEA Ultimate Edition:
<p>Support for the Cairo language.
These features are available for free with IntelliJ IDEA Ultimate Edition:</p>
<ul>
<li>highlighting</li>
<li>completion</li>
Expand All @@ -35,15 +20,20 @@
<li>goto definition</li>
</ul>
For more information, visit the
<a href="https://github.com/movebit/cairo-plugin">project site</a>.\
<hr>
<p style="font-size: 16px;> TroubleShooting </p>
<p>1. Install this plugin</p>
<a href="https://github.com/scalebit/cairo-analyzer">project site</a>.
]]>

</description>

<change-notes><![CDATA[
<h1>New Features</h1>
<h3> Supported more syntax highlighting </h2>
<ul>
<li>macro functions</li>
<li>types and generics in structures declaration</li>
</ul>
]]>
</change-notes>

<!-- <resource-bundle>messages.MyBundle 111111111</resource-bundle>-->
<!-- LSP-->
Expand Down

0 comments on commit 05e2dcf

Please sign in to comment.