gotlin/tools/vscode-gotlin/README.md
Pavel Flegr 8f4f858d86 init
2026-03-05 14:55:09 +01:00

58 lines
972 B
Markdown

# vscode-gotlin
Minimal VS Code extension for `.gt` files.
It does two things:
- registers `.gt` as the `gotlin` language
- launches `gotlin-lsp` over stdio
It also includes:
- syntax highlighting
- bracket/comment configuration
- basic Gotlin snippets
- optional `gopls` bridge for hover/definition on Go-imported symbols
## Setup
From this folder:
```bash
npm install
npm run build
```
Then in VS Code:
1. Open this folder as an extension project.
2. Press `F5` to launch an Extension Development Host.
3. Open your Gotlin workspace in that host.
## Server path
By default the extension looks for:
```text
<workspace>/bin/gotlin-lsp
```
If your binary lives somewhere else, set:
```json
"gotlin.serverPath": "/absolute/path/to/gotlin-lsp"
```
If `gopls` is not on your PATH, also set:
```json
"gotlin.goplsPath": "/absolute/path/to/gopls"
```
## Build the language server
From the repo root:
```bash
go build -o ./bin/gotlin-lsp ./cmd/gotlin-lsp
```