Skip to content

Commit

Permalink
Merge branch 'interns/languageserver' of github.com:vespa-engine/vesp…
Browse files Browse the repository at this point in the history
…a into interns/languageserver
  • Loading branch information
Mangern committed Aug 9, 2024
2 parents e740dcc + fcf94b2 commit 565d491
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions integration/schema-language-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,27 @@ The CongoCC Maven plugin generates Java classes from the parsers and places them
Before each parsing, they will call SchemaIndex to clear symbols belonging to the relevant document, and during the traversal process they will re-register symbols.
- [/tree](./language-server/src/main/java/ai/vespa/schemals/tree/): Code containing utils for working with the CST, such as finding nodes at a
given position and checking different properties. Also contains the SchemaNode class, which represents a node in the CST.
## Development & Testing

The language server needs a client to start it. Therefore running and testing the language server happens through an editor with an extension or a plugin. The language server is primary developed for VSCode, but it can run on other editors as well. This guide is for running the extension in a development environment. In the `clients` folder are the different extensions and plugins for the supported editors.

### Build the langauge server
- Make sure Vespa java classes are built. Run `mvn install` in the root of this repository to build Vespa
- If there have been changes outside the `clients` folder, these needs to be rebuilt.
- Use the command `mvn -pl :schema-language-server install` from the root of this repository to build the language server

### Visual Studio Code (VSCode)
- Open the folder `./clients/vscode` in a new VSCode window.
- Make sure `npm` is downloaded and run `npm install` to install the necessary dependencies.
- Go to `Run and Debug` tab on the left of the window.
- Click on `Run Extension`, alternatively hit `F5` to run and test the extension.
- A new window will appear with the extension running.

### IntelliJ
- Open the folder `./clients/intellij` in an IntelliJ window.
- Wait for the build to finish, then run the gradle task `Tasks/intellij platform/runIde`.
- The Gradle tasks can be found by clicking on the Gradle icon on the right hand side of the editor.
- A new window will appear with the plugin running.

## Basic Principles
The server is launched as an executable by the client that wants to use it. It will then run as a separate process, and they will communicate using standard input/output.
Expand Down

0 comments on commit 565d491

Please sign in to comment.