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