Skip to content

Commit 13b6d27

Browse files
committed
Update BUILDING.md and grammar module structure
1 parent 5031ea5 commit 13b6d27

File tree

11 files changed

+19
-184
lines changed

11 files changed

+19
-184
lines changed

BUILDING.md

Lines changed: 8 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,17 @@ The language server executable is now located under `server/build/install/server
1616

1717
Note that there are external dependent libraries, so if you want to put the server somewhere else, you have to move the entire `install`-directory.
1818

19-
## VSCode extension
20-
21-
### Development/Running
22-
First run `npm run watch` from the `editors/vscode` directory in a background shell. The extension will then incrementally build in the background.
23-
24-
Every time you want to run the extension with the language server:
25-
* Prepare the extension using `./gradlew :editors:vscode:prepare` (this automatically builds and copies the language server's binaries into the extension folder)
26-
* Open the debug tab in VSCode
27-
* Run the `Extension` launch configuration
28-
29-
### Debugging
30-
Your can attach the running language server on `localhost:8000`. Note that this can be done using the `Attach Kotlin Language Server` launch configuration in VSCode (requires the [Java Debug Extension](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-debug)).
31-
3219
### Packaging
33-
Run `./gradlew :editors:vscode:packageExtension` from the repository's top-level-directory. The extension will then be located under the name `kotlin-[version].vsix` in `editors/vscode`.
34-
35-
## Atom plugin
20+
To create a ZIP-archive of the language server, run:
3621

37-
### Development/Running
38-
To build and link the Atom plugin into your local packages folder, run:
22+
>`./gradlew :server:distZip`
3923
40-
>`./gradlew :editors:atom:apmLink`
24+
## Grammars
4125

42-
That's it! To use the extension, just reload your Atom window.
26+
### Packaging
27+
To create a ZIP-archive of the grammars, run:
4328

44-
> Note that you might have to manually run `apm rebuild` and `apm link` in `editors/atom` if `apm` could not be found on your `PATH` or you are using Windows.
29+
>`./gradlew :grammars:distZip`
4530
4631
## Gradle Tasks
4732
This paragraph assumes that you are familiar with Gradle's [task system](https://docs.gradle.org/current/userguide/build_lifecycle.html). In short: Every task describes an atomic piece of work and may depend on other tasks. Task dependencies will automatically be executed. The following subsections describe the available tasks for each module of this project.
@@ -59,22 +44,8 @@ This paragraph assumes that you are familiar with Gradle's [task system](https:/
5944
| Package for Release | `./gradlew :server:distZip` | Creates a release zip in `server/build/distributions`. If any dependencies have changed since the last release, a new license report should be generated and placed in `src/main/dist` before creating the distribution. |
6045
| Generate License Report | `./gradlew :server:licenseReport` | Generates a license report from the dependencies in `server/build/reports/licenses` |
6146

62-
### Editors (:editors)
63-
64-
#### VSCode (:editors:vscode)
65-
66-
| Task | Command | Description |
67-
| ---- | ------- | ----------- |
68-
| Prepare | `./gradlew :editors:vscode:prepare` | Copies the packaged language server, the grammar files and other resources to the extension's directory. Can be useful to run separately if the extension's code is already built using `npm run watch`. |
69-
| Compile | `./gradlew :editors:vscode:compile` | Compiles the TypeScript code of the extension. |
70-
| Test | `./gradlew :editors:vscode:test` | Runs the unit tests of the extension. Currently not supported from within VSCode. |
71-
| Package | `./gradlew :editors:vscode:packageExtension` | Creates a `.vsix` package of the extension for use within VSCode. |
72-
73-
#### Atom (:editors:atom)
47+
### Grammars (:grammars)
7448

7549
| Task | Command | Description |
7650
| ---- | ------- | ----------- |
77-
| Prepare | `./gradlew :editors:atom:prepare` | Copies the packaged language server into the extension's directory. |
78-
| Install | `./gradlew :editors:atom:install` | Installs the npm dependencies of the extension. |
79-
| APM Rebuild | `./gradlew :editors:atom:apmRebuild` | Rebuilds the extension's native modules using Atom's Node version. |
80-
| APM Link | `./gradlew :editors:atom:apmLink` | Links the extension into your local Atom package directory. |
51+
| Package for Release | `./gradlew :grammars:distZip` | Creates a zip of the grammars in `grammars/build/distributions` |

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ A [language server](https://microsoft.github.io/language-server-protocol/) that
88

99
![Icon](Icon128.png)
1010

11-
Any editor conforming to LSP is supported, including [VSCode](https://code.visualstudio.com) and [Atom](https://atom.io) for which client extensions provided by this repository.
11+
Any editor conforming to LSP is supported, including [VSCode](https://github.com/fwcd/vscode-kotlin-ide) and [Atom](https://github.com/fwcd/atom-ide-kotlin).
1212

1313
## Getting Started
1414
* See [BUILDING.md](BUILDING.md) for build instructions

grammars/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Grammars
2-
Grammar files that are used by the editor extensions.
2+
Contains TextMate language grammars for Kotlin used by various editor extensions.

grammars/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
task distZip(type: Zip) {
2+
from(projectDir) {
3+
include '*.json'
4+
}
5+
archiveBaseName = 'grammars'
6+
archiveVersion = projectVersion
7+
destinationDirectory = file("$buildDir/distributions")
8+
}
File renamed without changes.

grammars/textmate/README.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

grammars/tree-sitter/README.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

grammars/tree-sitter/tree-sitter-kotlin.cson

Lines changed: 0 additions & 139 deletions
This file was deleted.

0 commit comments

Comments
 (0)