Skip to content
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: add onSave actions #3

Merged
merged 4 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 2

[*.kt]
indent_size = 4
4 changes: 2 additions & 2 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: Integrate

on:
push:
branches: ["main"]
branches: [ "main" ]
pull_request:
workflow_dispatch:

jobs:
build:
name: Build
uses: ./.github/workflows/_build.yaml
uses: ./.github/workflows/_build.yaml
12 changes: 6 additions & 6 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
type: boolean
default: true
required: false
description: 'Publish a nightly build'
description: 'Publish a nightly build'

jobs:
build:
Expand All @@ -16,10 +16,10 @@ jobs:
with:
nightly: ${{ inputs.nightly }}
artifact: true

publish-jetbrains:
name: Publish to JetBrains Marketplace
needs: [build]
needs: [ build ]
runs-on: ubuntu-latest
environment: intellij-plugin
steps:
Expand All @@ -32,7 +32,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: Biome-${{ needs.build.outputs.version }}.zip

- name: Restore gradle.properties
uses: actions/cache/restore@v3
with:
Expand All @@ -49,7 +49,7 @@ jobs:

publish-github-release:
name: Publish to GitHub Releases
needs: [build]
needs: [ build ]
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down Expand Up @@ -87,4 +87,4 @@ jobs:
prerelease: ${{ needs.build.outputs.nightly == 'true' }}
draft: true
files: biome.zip
tag_name: ${{ needs.build.outputs.nightly == 'true' && github.ref || format('v{0}', needs.build.outputs.version) }}
tag_name: ${{ needs.build.outputs.nightly == 'true' && github.ref || format('v{0}', needs.build.outputs.version) }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
.idea
.qodana
build
.DS_Store
node_modules
20 changes: 10 additions & 10 deletions .run/Run IDE for UI Tests.run.xml
Original file line number Diff line number Diff line change
@@ -1,25 +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" />
<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="executionName"/>
<option name="externalProjectPath" value="$PROJECT_DIR$"/>
<option name="externalSystemIdString" value="GRADLE"/>
<option name="scriptParameters" value=""/>
<option name="taskDescriptions">
<list />
<list/>
</option>
<option name="taskNames">
<list>
<option value="runIdeForUiTests" />
<option value="runIdeForUiTests"/>
</list>
</option>
<option name="vmOptions" />
<option name="vmOptions"/>
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<method v="2" />
<method v="2"/>
</configuration>
</component>
</component>
20 changes: 10 additions & 10 deletions .run/Run Plugin.run.xml
Original file line number Diff line number Diff line change
@@ -1,24 +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" />
<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="executionName"/>
<option name="externalProjectPath" value="$PROJECT_DIR$"/>
<option name="externalSystemIdString" value="GRADLE"/>
<option name="scriptParameters" value=""/>
<option name="taskDescriptions">
<list />
<list/>
</option>
<option name="taskNames">
<list>
<option value="runIde" />
<option value="runIde"/>
</list>
</option>
<option name="vmOptions" value="" />
<option name="vmOptions" value=""/>
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
<method v="2"/>
</configuration>
</component>
</component>
18 changes: 9 additions & 9 deletions .run/Run Tests.run.xml
Original file line number Diff line number Diff line change
@@ -1,24 +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" />
<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="executionName"/>
<option name="externalProjectPath" value="$PROJECT_DIR$"/>
<option name="externalSystemIdString" value="GRADLE"/>
<option name="scriptParameters" value=""/>
<option name="taskDescriptions">
<list />
<list/>
</option>
<option name="taskNames">
<list>
<option value="check" />
<option value="check"/>
</list>
</option>
<option name="vmOptions" value="" />
<option name="vmOptions" value=""/>
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
<method v="2"/>
</configuration>
</component>
21 changes: 11 additions & 10 deletions .run/Run Verifications.run.xml
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
<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" />
<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="executionName"/>
<option name="externalProjectPath" value="$PROJECT_DIR$"/>
<option name="externalSystemIdString" value="GRADLE"/>
<option name="scriptParameters" value=""/>
<option name="taskDescriptions">
<list />
<list/>
</option>
<option name="taskNames">
<list>
<option value="runPluginVerifier" />
<option value="runPluginVerifier"/>
</list>
</option>
<option name="vmOptions" value="" />
<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="" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="clean" externalProjectPath="$PROJECT_DIR$" vmOptions=""
scriptParameters=""/>
</method>
</configuration>
</component>
</component>
29 changes: 19 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
[Biome](https://biomejs.dev/) is a powerful tool designed to enhance your development experience. This plugin integrates
seamlessly with many [JetBrains IDE's](#Supported IDEs) to provide some capabilities:

[Biome](https://biomejs.dev/) is a powerful tool designed to enhance your development experience. This plugin integrates seamlessly with many [JetBrains IDE's](#Supported IDEs) to provide some capabilities:

- See lints while you type
- Apply code fixes (from mouse-over, <kbd title="Option">⌥</kbd>+<kbd title="Enter">⏎</kbd> or <kbd title="Alt">Alt</kbd>+<kbd title="Enter">Enter</kbd>)
- Reformat your code with <kbd>⌥⇧</kbd>+<kbd title="Cmd">⌘</kbd>+<kbd title="L">L</kbd> or <kbd title="Ctrl">Ctrl</kbd>+<kbd title="Alt">Alt</kbd>+<kbd title="L">L</kbd> (You can also format your [code on save](https://www.jetbrains.com/help/webstorm/reformat-and-rearrange-code.html#reformat-on-save))
- See lints while you type
- Apply code fixes (from mouse-over,<kbd title="Option">⌥</kbd>+<kbd title="Enter">⏎</kbd>or<kbd title="Alt">
Alt</kbd>+<kbd title="Enter">Enter</kbd>)
- Reformat your code with<kbd>⌥⇧</kbd>+<kbd title="Cmd">⌘</kbd>+<kbd title="L">L</kbd>or<kbd title="Ctrl">
Ctrl</kbd>+<kbd title="Alt">Alt</kbd>+<kbd title="L">L</kbd> (You can also format
your [code on save](https://www.jetbrains.com/help/webstorm/reformat-and-rearrange-code.html#reformat-on-save))

However, please note the following limitations:

- Automatically applying code fixes on save

## Installation

To install the Biome IntelliJ Plugin, Head over to [official plugin page](https://plugins.jetbrains.com/plugin/22761-biome) or follow these steps:
To install the Biome IntelliJ Plugin, Head over
to [official plugin page](https://plugins.jetbrains.com/plugin/22761-biome) or follow these steps:

### From JetBrains IDEs

Expand All @@ -30,9 +34,11 @@ To install the Biome IntelliJ Plugin, Head over to [official plugin page](https:

## Biome Resolution

The Plugin tries to use Biome from your project’s local dependencies (`node_modules/.bin/biome`). We recommend adding Biome as a project dependency to ensure that NPM scripts and the extension use the same Biome version.
The Plugin tries to use Biome from your project’s local dependencies (`node_modules/.bin/biome`). We recommend adding
Biome as a project dependency to ensure that NPM scripts and the extension use the same Biome version.

You can also explicitly specify the `Biome` binary the extension should use by configuring the `Biome CLI Path` in `Settings`->`Language & Frameworks`->`Biome Settings`.
You can also explicitly specify the`Biome`binary the extension should use by configuring the`Biome CLI Path`
in `Settings`->`Language & Frameworks`->`Biome Settings`.

## Plugin settings

Expand All @@ -44,12 +50,15 @@ This setting overrides the Biome binary used by the plugin.

This plugin is currently supported in the following IDEs:

- IntelliJ IDEA Ultimate >2023.2.2
- IntelliJ IDEA Ultimate >2023.2.2
- WebStorm >2023.2.2
- AppCode >2023.2.2
- PhpStorm >2023.2.2
- RubyMine >2023.2.2

## Contributing

We welcome contributions to the Biome IntelliJ Plugin. If you encounter any issues or have suggestions for improvements, please open an issue on our [GitHub repository](https://github.com/biomejs/biome/issues/new/choose). We also have a [Discord community](https://discord.gg/BypW39g6Yc) where you can discuss the plugin, ask questions, and connect with other Biome's developers.
We welcome contributions to the Biome IntelliJ Plugin. If you encounter any issues or have suggestions for improvements,
please open an issue on our [GitHub repository](https://github.com/biomejs/biome/issues/new/choose). We also have
a [Discord community](https://discord.gg/BypW39g6Yc) where you can discuss the plugin, ask questions, and connect with
other Biome's developers.
Loading