-
-
Notifications
You must be signed in to change notification settings - Fork 475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(editors/intellij): IntelliJ Platform LSP #185
Merged
ematipico
merged 19 commits into
biomejs:main
from
victor-teles:feature/intellij-lsp-plugin
Sep 20, 2023
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
af52f6b
feat(editors/intellij): :wip: initial implementation
b9a4551
feat(intellij): add server restart action
548005f
refactor(intellij-lsp): removed some unused codes
5930814
refactor(intellij-lsp): isSupportedFileType now checks for file.exten…
6360a80
ci: added initial intellij workflow
victor-teles 8a1f456
docs(intellij): :pencil: getting started docs
victor-teles 9b34bcf
fix(intellij): script format
victor-teles 2b38a63
ci(release_lsp): updated vscode texts
victor-teles fa90806
feat(intellij): added json, d.ts and jsonc support
victor-teles 1b1b1eb
refactor(intellij): removed unnecessary --config-path param
victor-teles c4aa96b
docs(intellij): update CONTRIBUTING guide
victor-teles 6614999
refactor(intellij): remove some unused plugins
victor-teles 28f3cb3
refactor(intellij): update pluginName & pluginRepositoryUrl
victor-teles 82a8247
ui(intelij): :lipstick: fixed the icon location and added label to co…
victor-teles 1677a5e
chore: apply format
nissy-dev fb51e48
fix(intellij): :bug: fix toolbar icon
victor-teles ff48ede
refactor(intellij): change plugin name
victor-teles c22c12c
review(intellij): :ok_hand: Added plugin.xml description
victor-teles f569cd1
chore: add minor modification
nissy-dev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ on: | |
- main | ||
paths: | ||
- editors/vscode/package.json | ||
- editors/intellij/gradle.properties | ||
|
||
jobs: | ||
check: | ||
|
@@ -16,12 +17,14 @@ jobs: | |
outputs: | ||
# LSP Extension Version | ||
version: ${{ env.version }} | ||
intellij_version: ${{ env.intellij_version }} | ||
|
||
# Version of the Biome binary | ||
biome_version: ${{ env.biome_version }} | ||
prerelease: ${{ env.prerelease }} | ||
nightly: ${{ env.nightly }} | ||
version_changed: ${{ steps.version.outputs.changed }} | ||
intellij_version_changed: ${{ steps.intellij_version.outputs.changed }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
|
@@ -30,14 +33,22 @@ jobs: | |
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | ||
run: echo "nightly=true" >> $GITHUB_ENV | ||
|
||
- name: Check version changes | ||
- name: Check VSCode version changes | ||
uses: EndBug/version-check@v2 | ||
if: env.nightly != 'true' | ||
id: version | ||
with: | ||
diff-search: true | ||
file-name: editors/vscode/package.json | ||
|
||
- name: Check intellij plugin version changes | ||
uses: victor-teles/gradle-properties-diff-checker@v1 | ||
if: env.nightly != 'true' | ||
id: intellij_version | ||
with: | ||
file-name: editors/intellij/gradle.properties | ||
property: pluginVersion | ||
|
||
- name: Check Biome version changes | ||
uses: EndBug/version-check@v2 | ||
if: env.nightly != 'true' | ||
|
@@ -50,6 +61,7 @@ jobs: | |
run: | | ||
echo "version=${{ steps.version.outputs.version }}" >> $GITHUB_ENV | ||
echo "biome_version=${{ steps.biome_version.outputs.version }}" >> $GITHUB_ENV | ||
echo "intellij_version=${{ steps.intellij_version.outputs.version }}" >> $GITHUB_ENV | ||
|
||
- name: Check prerelease status | ||
id: prerelease | ||
|
@@ -58,10 +70,15 @@ jobs: | |
echo "prerelease=true" >> $GITHUB_ENV | ||
node ./editors/vscode/scripts/update-nightly-version.mjs >> $GITHUB_ENV | ||
echo "biome_version=$(node packages/@biomejs/biome/scripts/update-nightly-version.mjs)" >> $GITHUB_ENV | ||
echo "intellij_version=$(node ./editors/intellij/scripts/update-nightly-version.mjs)" >> $GITHUB_ENV | ||
|
||
- name: Check version status | ||
- name: Check VSCode version status | ||
if: steps.version.outputs.changed == 'true' | ||
run: 'echo "Version change found! New version: ${{ steps.version.outputs.version }} (${{ steps.version.outputs.version_type }})"' | ||
run: 'echo "VSCode Version change found! New version: ${{ steps.version.outputs.version }} (${{ steps.version.outputs.version_type }})"' | ||
|
||
- name: Check intellij version status | ||
if: steps.intellij_version.outputs.changed == 'true' | ||
run: 'echo "Intellij Version change found! New version: ${{ steps.intellij_version.outputs.version }}' | ||
|
||
- name: Biome Check version status | ||
if: steps.biome_version.outputs.changed == 'true' | ||
|
@@ -90,7 +107,7 @@ jobs: | |
target: aarch64-apple-darwin | ||
code-target: darwin-arm64 | ||
|
||
name: Package ${{ matrix.code-target }} | ||
name: Package VSCode ${{ matrix.code-target }} | ||
runs-on: ${{ matrix.os }} | ||
|
||
needs: check | ||
|
@@ -148,7 +165,7 @@ jobs: | |
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
|
@@ -187,7 +204,7 @@ jobs: | |
if-no-files-found: error | ||
|
||
publish: | ||
name: Publish | ||
name: Publish VSCode | ||
runs-on: ubuntu-latest | ||
needs: build | ||
environment: marketplace | ||
|
@@ -212,7 +229,7 @@ jobs: | |
with: | ||
version: latest | ||
run_install: true | ||
|
||
- name: Install VCSE | ||
run: pnpm add -g @vscode/vsce | ||
|
||
|
@@ -255,3 +272,101 @@ jobs: | |
biome_lsp-*.vsix | ||
fail_on_unmatched_files: true | ||
generate_release_notes: true | ||
|
||
build-intellij: | ||
name: Build Intellij LSP | ||
runs-on: ubuntu-latest | ||
needs: check | ||
env: | ||
version: ${{ needs.check.outputs.intellij_version }} | ||
|
||
if: needs.check.outputs.intellij_version_changed == 'true' || needs.check.outputs.nightly == 'true' | ||
outputs: | ||
version: ${{ env.version }} | ||
prerelease: ${{ env.prerelease }} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: zulu | ||
java-version: 17 | ||
|
||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
gradle-home-cache-cleanup: true | ||
|
||
- name: Update plugin version | ||
if: needs.check.outputs.prerelease == 'true' | ||
working-directory: editors/intellij | ||
run: | | ||
node ./scripts/update-nightly-version.mjs >> $GITHUB_ENV | ||
|
||
- name: Build plugin | ||
working-directory: editors/intellij | ||
run: ./gradlew buildPlugin | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: intellij_package | ||
path: ./editors/intellij/build/distributions/intellij-biome-*.zip | ||
if-no-files-found: error | ||
|
||
publish-intellij: | ||
name: Publish Intellij LSP | ||
runs-on: ubuntu-latest | ||
needs: build-intellij | ||
environment: intellij-plugin | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Download extension artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: intellij_package | ||
path: ./editors/intellij/build/distributions | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: zulu | ||
java-version: 17 | ||
|
||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
gradle-home-cache-cleanup: true | ||
|
||
- name: Publish Plugin | ||
env: | ||
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }} | ||
CERTIFICATE_CHAIN: ${{ secrets.CERTIFICATE_CHAIN }} | ||
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | ||
PRIVATE_KEY_PASSWORD: ${{ secrets.PRIVATE_KEY_PASSWORD }} | ||
run: ./gradlew publishPlugin | ||
working-directory: editors/intellij | ||
|
||
- name: Extract changelog | ||
run: | | ||
bash scripts/print-changelog.sh ${{ needs.build.outputs.version }} >| ${{ github.workspace }}/RELEASE_NOTES | ||
- name: Create GitHub release and tag | ||
uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
name: Intellij Plugin v${{ needs.build.outputs.version }} | ||
tag_name: lsp-intellij/v${{ needs.build.outputs.version }} | ||
draft: false | ||
prerelease: ${{ needs.build.outputs.prerelease == 'true' }} | ||
body_path: ${{ github.workspace }}/RELEASE_NOTES | ||
files: | | ||
./editors/intellij/build/distributions/intellij-biome-*.zip | ||
fail_on_unmatched_files: true | ||
generate_release_notes: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.gradle | ||
.idea | ||
.qodana | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Run IDE for UI Tests" type="GradleRunConfiguration" factoryName="Gradle"> | ||
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" /> | ||
<ExternalSystemSettings> | ||
<option name="executionName" /> | ||
<option name="externalProjectPath" value="$PROJECT_DIR$" /> | ||
<option name="externalSystemIdString" value="GRADLE" /> | ||
<option name="scriptParameters" value="" /> | ||
<option name="taskDescriptions"> | ||
<list /> | ||
</option> | ||
<option name="taskNames"> | ||
<list> | ||
<option value="runIdeForUiTests" /> | ||
</list> | ||
</option> | ||
<option name="vmOptions" /> | ||
</ExternalSystemSettings> | ||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess> | ||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess> | ||
<DebugAllEnabled>false</DebugAllEnabled> | ||
<RunAsTest>false</RunAsTest> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Run Plugin" type="GradleRunConfiguration" factoryName="Gradle"> | ||
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" /> | ||
<ExternalSystemSettings> | ||
<option name="executionName" /> | ||
<option name="externalProjectPath" value="$PROJECT_DIR$" /> | ||
<option name="externalSystemIdString" value="GRADLE" /> | ||
<option name="scriptParameters" value="" /> | ||
<option name="taskDescriptions"> | ||
<list /> | ||
</option> | ||
<option name="taskNames"> | ||
<list> | ||
<option value="runIde" /> | ||
</list> | ||
</option> | ||
<option name="vmOptions" value="" /> | ||
</ExternalSystemSettings> | ||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess> | ||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess> | ||
<DebugAllEnabled>false</DebugAllEnabled> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Run Qodana" type="GradleRunConfiguration" factoryName="Gradle"> | ||
<ExternalSystemSettings> | ||
<option name="env"> | ||
<map> | ||
<entry key="QODANA_SHOW_REPORT" value="true" /> | ||
</map> | ||
</option> | ||
<option name="executionName" /> | ||
<option name="externalProjectPath" value="$PROJECT_DIR$" /> | ||
<option name="externalSystemIdString" value="GRADLE" /> | ||
<option name="scriptParameters" value="" /> | ||
<option name="taskDescriptions"> | ||
<list /> | ||
</option> | ||
<option name="taskNames"> | ||
<list> | ||
<option value="cleanInspections" /> | ||
<option value="runInspections" /> | ||
</list> | ||
</option> | ||
<option name="vmOptions" /> | ||
</ExternalSystemSettings> | ||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess> | ||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess> | ||
<DebugAllEnabled>false</DebugAllEnabled> | ||
<RunAsTest>false</RunAsTest> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Run Tests" type="GradleRunConfiguration" factoryName="Gradle"> | ||
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" /> | ||
<ExternalSystemSettings> | ||
<option name="executionName" /> | ||
<option name="externalProjectPath" value="$PROJECT_DIR$" /> | ||
<option name="externalSystemIdString" value="GRADLE" /> | ||
<option name="scriptParameters" value="" /> | ||
<option name="taskDescriptions"> | ||
<list /> | ||
</option> | ||
<option name="taskNames"> | ||
<list> | ||
<option value="check" /> | ||
</list> | ||
</option> | ||
<option name="vmOptions" value="" /> | ||
</ExternalSystemSettings> | ||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess> | ||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess> | ||
<DebugAllEnabled>false</DebugAllEnabled> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Run Verifications" type="GradleRunConfiguration" factoryName="Gradle"> | ||
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" /> | ||
<ExternalSystemSettings> | ||
<option name="executionName" /> | ||
<option name="externalProjectPath" value="$PROJECT_DIR$" /> | ||
<option name="externalSystemIdString" value="GRADLE" /> | ||
<option name="scriptParameters" value="" /> | ||
<option name="taskDescriptions"> | ||
<list /> | ||
</option> | ||
<option name="taskNames"> | ||
<list> | ||
<option value="runPluginVerifier" /> | ||
</list> | ||
</option> | ||
<option name="vmOptions" value="" /> | ||
</ExternalSystemSettings> | ||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess> | ||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess> | ||
<DebugAllEnabled>false</DebugAllEnabled> | ||
<method v="2"> | ||
<option name="Gradle.BeforeRunTask" enabled="true" tasks="clean" externalProjectPath="$PROJECT_DIR$" vmOptions="" scriptParameters="" /> | ||
</method> | ||
</configuration> | ||
</component> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does that mean that CLion, WebStorm, etc. wouldn't work for local development?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove this requirement,
The Intellij IDEA for testing purpose is automatically downloaded when you run ./gradlew runIde (i don't know if it's possible to use other IDE's)
For more details about IDE Development Instance