Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
a847bf8
feat(intellij): Initial IntelliJ plugin structure and LSP setup
bratorange May 6, 2025
83543b0
chore(intellij): Add .gitignore for IntelliJ plugin
bratorange May 6, 2025
90561b1
chore(intellij): Remove build and sandbox dirs from git index
bratorange May 6, 2025
8fb3e15
fix(intellij): Address build verification warnings and LSP dependency
bratorange May 6, 2025
6d7e1a5
refactor the build files
bratorange May 6, 2025
b8cf7e8
update gitignore
bratorange May 6, 2025
fa1dd6e
[got linting working]
bratorange May 6, 2025
9c817b0
feat(intellij): Update PLUGIN_DEV_NOTES and add TinymistInitializatio…
bratorange May 6, 2025
9182797
feat(intellij): Add comprehensive development notes and preview funct…
bratorange May 7, 2025
768aac2
feat(intellij): Enhance Typst preview functionality and add platform-…
bratorange May 8, 2025
7fdc696
feat(intellij): Refactor Typst preview integration and remove unused …
bratorange May 9, 2025
6ef1e63
feat(intellij): Improve TypstPreviewFileEditor with JCEF integration …
bratorange May 9, 2025
4750198
debug: attempt to debug a performance issue wtih the frontend
bratorange May 9, 2025
6b18fc6
refactor: Update development notes and project roadmap for Typst Inte…
bratorange May 9, 2025
c370d74
docs: Update development notes with comprehensive instructions and pr…
bratorange May 9, 2025
0833cb2
removed accidentally tracked example repo
bratorange May 9, 2025
578552d
Cleanup: Remove dead code, restore minimal preview provider, and ensu…
bratorange May 11, 2025
bca440b
add mockdata structure view and fix languageclient file missing
bratorange May 12, 2025
65838b6
feat(intellij): Enhance Typst preview and add Find Usages provider
bratorange May 13, 2025
a22fbb1
refactor(intellij): reset TypstPreviewFileEditor
bratorange May 14, 2025
7b774fc
chore(intellij): remove lexer, parser, syntax highlighter, and struc…
bratorange May 16, 2025
85611c3
chore(intellij): update lsp4ij dependency and remove custom implement…
bratorange May 16, 2025
db61141
chore(intellij): update development notes
bratorange May 17, 2025
94fbcca
implement server change feature
bratorange May 18, 2025
5e34daf
fix cleanup issue in the preview
bratorange May 18, 2025
d54802c
refactor(TypstPreview): restrict editor to Typst files and enhance se…
bratorange May 19, 2025
615e5ff
Add tests for Typst LSP functionality
bratorange May 28, 2025
b4b9f52
added icons
bratorange Jun 9, 2025
003edac
Refactor editor to track and manage preview registrations.
bratorange Jun 15, 2025
bae07f5
Refactor test logic and simplify assertion handling.
bratorange Jun 15, 2025
246b22b
Refactor and remove unused code and development fallbacks.
bratorange Jun 16, 2025
94aef53
Reduce max server connection attempts from 60 to 5
bratorange Jun 17, 2025
a3fa1b3
removed accidentally added references to other repos from the repo
bratorange Jul 17, 2025
175f4d1
update dependency lsp4ij to 0.15
bratorange Aug 26, 2025
fd46138
Delete editors/intellij/trace.json
bratorange Aug 27, 2025
c38f4bd
refactor: adopt descriptive comment style
bratorange Aug 27, 2025
4343eec
refactor: adopt descriptive comment style
bratorange Aug 27, 2025
6c3cdea
fix: remove wrong @Test annotations
bratorange Aug 27, 2025
6fde3a3
fix TypstCompletionTest.kt
bratorange Aug 27, 2025
83322e7
add .idea for the intelij plugin folder
bratorange Aug 28, 2025
aa60b50
update development info
bratorange Aug 28, 2025
8a28a86
feature: tinymist binary installer
bratorange Aug 28, 2025
ad3c4a3
refactor: centralize Tinymist version management and adapt server cus…
bratorange Aug 29, 2025
c472a11
refactor: replace ProcessStreamConnectionProvider with OSProcessStrea…
bratorange Aug 29, 2025
2736aff
refactor: add custom diagnostic feature
bratorange Aug 29, 2025
662f064
refactor: dont use findExecutableOnPath anymore
bratorange Aug 29, 2025
c8f26e8
remove unnecessary implementation of LanguageServerImpl
bratorange Aug 29, 2025
e93e218
chore: remove unused grammar definitions
bratorange Aug 29, 2025
823ef6f
fixed multiple versions of gradle being referenced?
bratorange Aug 31, 2025
2d61191
reference a nightly build of lsp4ij
bratorange Aug 31, 2025
78cc24d
restored textDocument/foldingRange ability
bratorange Aug 31, 2025
78d991e
update dev-notes.md to reflect current state
bratorange Aug 31, 2025
d9db1eb
update dev-notes.md to reflect current state
bratorange Aug 31, 2025
9654d37
Merge remote-tracking branch 'origin/main'
bratorange Aug 31, 2025
8cbe9a5
update dev prerequisites
bratorange Aug 31, 2025
fca3f02
readd preview init options
bratorange Sep 9, 2025
b8fe177
add top level build file
bratorange Sep 9, 2025
70e6a80
implement preview port collision prevention
bratorange Sep 10, 2025
aeb9d95
dev: add Gradle wrapper and configuration files
Myriad-Dreamin Sep 10, 2025
e178db9
dev: update IntelliJ Gradle configuration to use Community edition
Myriad-Dreamin Sep 10, 2025
cb04205
docs: edit development guides
Myriad-Dreamin Sep 10, 2025
e007ba4
docs: fix link to Myriad-Dreamin's VS Code settings in development guide
Myriad-Dreamin Sep 10, 2025
b6f289b
update build instruction to use community edition
bratorange Sep 13, 2025
5d82a5d
remove an accidental item from plugin.xml
bratorange Sep 16, 2025
cec5e5e
add github action for building
bratorange Sep 16, 2025
12df40b
use the original template ci file
bratorange Sep 16, 2025
a7e237e
fix gradlew
bratorange Sep 16, 2025
974813d
fix wrong artifact path; update to lsp4ij 0.16.1
bratorange Sep 16, 2025
5cafded
fix wrong artifact path again
bratorange Sep 16, 2025
58b6dc8
Add plugin metadata
bratorange Sep 16, 2025
c856904
add plugin Icon
bratorange Sep 17, 2025
e3f94ee
add plugin Icon dark
bratorange Sep 17, 2025
905fcc1
add short description of the plugin
bratorange Sep 23, 2025
6fb56a9
simplify intellij build action
bratorange Oct 13, 2025
55b6ec8
update gradle and lsp4ij
bratorange Oct 13, 2025
0d5f1bd
update documentatiton; remove unneded functions for the future
bratorange Oct 13, 2025
914624e
remove the nececity to verify the plugin to produce a release candida…
bratorange Oct 13, 2025
79299ce
fix changelog export in the ci
bratorange Oct 19, 2025
7cae9e7
attempt to fix "open ./build/tmp/release_note.txt: no such file or di…
bratorange Oct 19, 2025
750598f
update intellij platform
bratorange Oct 19, 2025
483c578
dont assume any path structure for the changelog file
bratorange Oct 20, 2025
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
199 changes: 199 additions & 0 deletions .github/workflows/build-intellij-plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
# GitHub Actions Workflow is created for testing and preparing the plugin release in the following steps:
# - Validate Gradle Wrapper.
# - Run 'test' and 'verifyPlugin' tasks.
# - Run Qodana inspections.
# - Run the 'buildPlugin' task and prepare artifact for further tests.
# - Run the 'runPluginVerifier' task.
# - Create a draft release.
#
# The workflow is triggered on push and pull_request events.
#
# GitHub Actions reference: https://help.github.com/en/actions
#
## JBIJPPTPL

name: tinymist::build::intellij-plugin
on:
workflow_call:

jobs:
# Prepare the environment and build the plugin
build:
name: Build
runs-on: ubuntu-latest
steps:

# Free GitHub Actions Environment Disk Space
- name: Maximize Build Space
uses: jlumbroso/[email protected]
with:
tool-cache: false
large-packages: false

# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v4

# Set up the Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 21

# Setup Gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

# Build plugin
- name: Build plugin
run: ./gradlew :intellij:buildPlugin

# Prepare plugin archive content for creating artifact
- name: Prepare Plugin Artifact
id: artifact
shell: bash
run: |
cd ${{ github.workspace }}/editors/intellij/build/distributions
FILENAME=`ls *.zip`
unzip "$FILENAME" -d content

echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT

# Store an already-built plugin as an artifact for downloading
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.artifact.outputs.filename }}
path: ./build/distributions/content/*/*

# Run tests and upload a code coverage report
test:
name: Test
needs: [ build ]
runs-on: ubuntu-latest
steps:

# Free GitHub Actions Environment Disk Space
- name: Maximize Build Space
uses: jlumbroso/[email protected]
with:
tool-cache: false
large-packages: false

# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v4

# Set up the Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 21

# Setup Gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: true

# Run tests
- name: Run Tests
run: ./gradlew :intellij:check

# Collect Tests Result of failed tests
- name: Collect Tests Result
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: tests-result
path: ${{ github.workspace }}/build/reports/tests

# Upload the Kover report to CodeCov
- name: Upload Code Coverage Report
uses: codecov/codecov-action@v5
with:
files: ${{ github.workspace }}/build/reports/kover/report.xml
token: ${{ secrets.CODECOV_TOKEN }}

# Run plugin structure verification along with IntelliJ Plugin Verifier
verify:
name: Verify plugin
needs: [ build ]
runs-on: ubuntu-latest
steps:

# Free GitHub Actions Environment Disk Space
- name: Maximize Build Space
uses: jlumbroso/[email protected]
with:
tool-cache: false
large-packages: false

# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v4

# Set up the Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 21

# Setup Gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: true

# Run Verify Plugin task and IntelliJ Plugin Verifier tool
- name: Run Plugin Verification tasks
run: ./gradlew :intellij:verifyPlugin

# Collect Plugin Verifier Result
- name: Collect Plugin Verifier Result
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: pluginVerifier-result
path: ${{ github.workspace }}/build/reports/pluginVerifier

# Prepare a draft release for GitHub Releases page for the manual verification
# If accepted and published, the release workflow would be triggered
releaseDraft:
name: Release draft
if: github.event_name != 'pull_request'
needs: [ build ]
runs-on: ubuntu-latest
permissions:
contents: write
steps:

# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v4

# Remove old release drafts by using the curl request for the available releases with a draft flag
- name: Remove Old Release Drafts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api repos/{owner}/{repo}/releases \
--jq '.[] | select(.draft == true) | .id' \
| xargs -I '{}' gh api -X DELETE repos/{owner}/{repo}/releases/{}

# Create a new release draft which is not publicly visible and requires manual acceptance
- name: Create Release Draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION=$(./gradlew :intellij:properties --property version --quiet --console=plain | tail -n 1 | cut -f2- -d ' ')
RELEASE_NOTE="./release_note.txt"
./gradlew :intellij:getChangelog --unreleased --no-header --quiet --console=plain --output-file=$RELEASE_NOTE

gh release create $VERSION \
--draft \
--title $VERSION \
--notes-file $RELEASE_NOTE
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ jobs:
build-vscode-others:
needs: [build-vsc-assets]
uses: ./.github/workflows/build-vscode-others.yml

build-intellij:
uses: ./.github/workflows/build-intellij-plugin.yml

publish-vscode:
needs: [build-vscode, build-vscode-others] # , announce
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ editors/vscode/out/
editors/lapce/out/
/external/typst-preview
/dist
/build

*.pdf
refs/

.vscode/*.code-workspace
refs/
.gradle
1 change: 1 addition & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/prettier.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

74 changes: 4 additions & 70 deletions docs/dev-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ To contribute to tinymist, you need to install the following tools:

You don't have to configure anything to start developing tinymist. However, here we provide some tips to make your development experience better.

- [@Myriad-Dreamin's VS Code Settings](#appendix-myriad-dreamins-vs-code-settings)
- [@Myriad-Dreamin's VS Code Settings](./dev-guide/vscode-extension.md#appendix-myriad-dreamins-vs-code-settings)

## Building and Running

Expand All @@ -44,7 +44,9 @@ cargo build --release
cargo build --profile=gh-release
```

To run VS Code extension locally, open the repository in VS Code and press `F5` to start a debug session to extension. The VS Code extension also shows how we build and run the language server and the editor tools.
To run VS Code extension locally, open the repository in VS Code and press `F5` to start a debug session to extension. The VS Code extension also shows how we build and run the language server and the editor tools. See [VS Code Extension](./dev-guide/vscode-extension.md) for more details.

To run IntelliJ plugin, execute `./gradlew :intellij:runIde` in the root directory. See [IntelliJ Plugin](./dev-guide/intellij-plugin.md) for more details.

## Local Documentation

Expand Down Expand Up @@ -126,71 +128,3 @@ To run e2e tests for tinymist on Windows:
## Release on GitHub

The code owners and maintainers of the release channels can check the [Release Guide](/dev-guide/release-instruction.md) to learn how to check and release the new version of tinymist.


## APPENDIX: @Myriad-Dreamin's VS Code Settings

Applies the workspace settings template:

```
cp .vscode/tinymist.code-workspace.tmpl.json .vscode/tinymist.code-workspace.json
```

And then open the workspace in VS Code.

Rust Settings explained:

This configuration enables clippy on save:

```json
{
"rust-analyzer.check.command": "clippy",
}
```

This configuration wraps comments automatically:

```json
{
"rust-analyzer.rustfmt.extraArgs": ["--config=wrap_comments=true"],
}
```

This configuration excludes the `target` folder from the file watcher:

```json
{
"files.watcherExclude": {
"**/target": true
},
}
```

Typst Settings explained:

This configuration help use the same fonts as the CI building tinymist docs:

```json
{
"tinymist.fontPaths": [
"assets/fonts"
],
}
```

Formatter Settings explained:

This configuration runs formatters on save and using the `prettier` formatter:

```json
{
"[javascript]":{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
},
"[json]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
}
```
Loading