{"id":13995989,"url":"https://github.com/ephread/ink-language-server","last_synced_at":"2025-07-22T22:33:21.816Z","repository":{"id":57274073,"uuid":"137838470","full_name":"ephread/ink-language-server","owner":"ephread","description":"A language server for inkle's Ink.","archived":true,"fork":false,"pushed_at":"2020-04-16T17:21:52.000Z","size":542,"stargazers_count":9,"open_issues_count":3,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-14T16:41:12.069Z","etag":null,"topics":["ink","inkle","inklecate","inky","language-server","language-server-protocol","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ephread.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-19T04:06:40.000Z","updated_at":"2024-09-09T21:25:29.000Z","dependencies_parsed_at":"2022-09-17T10:12:53.384Z","dependency_job_id":null,"html_url":"https://github.com/ephread/ink-language-server","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/ephread/ink-language-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ephread%2Fink-language-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ephread%2Fink-language-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ephread%2Fink-language-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ephread%2Fink-language-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ephread","download_url":"https://codeload.github.com/ephread/ink-language-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ephread%2Fink-language-server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266586053,"owners_count":23952170,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ink","inkle","inklecate","inky","language-server","language-server-protocol","typescript"],"created_at":"2024-08-09T14:03:43.188Z","updated_at":"2025-07-22T22:33:21.488Z","avatar_url":"https://github.com/ephread.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# ![Ink Language Server](https://i.imgur.com/pQwWZ9X.png)\n\n[![Build Status](https://travis-ci.org/ephread/ink-language-server.svg?branch=master)](https://travis-ci.org/ephread/ink-language-server)\n[![codebeat badge](https://codebeat.co/badges/e7ea4d8e-732c-4320-8815-1f150f44507e)](https://codebeat.co/projects/github-com-ephread-ink-language-server-master)\n[![codecov](https://codecov.io/gh/ephread/ink-language-server/branch/master/graph/badge.svg)](https://codecov.io/gh/ephread/ink-language-server)\n[![npm version](https://img.shields.io/npm/v/ink-language-server.svg)](https://www.npmjs.com/package/ink-language-server)\n[![License](https://img.shields.io/npm/l/ink-language-server.svg)](https://github.com/ephread/ink-language-server/blob/master/LICENSE.md)\n[![Dependencies](https://david-dm.org/ephread/ink-language-server/status.svg)](https://david-dm.org/ephread/ink-language-server)\n\nA language server for inkle's Ink, that adheres to the [Language Server Protocol (LSP)]. The project is in early stages.\n\n[Language Server Protocol (LSP)]: https://microsoft.github.io/language-server-protocol/specification\n\n## Table of contents\n\n  * [Getting Started](#getting-started)\n  \t* [Installation](#installation)\n  \t* [Running](#running)\n  \t* [Configuration](#configuration)\n  * [Inklecate](#inklecate)\n  \t* [macOS](#installation)\n  \t* [Linux and other platforms](#linux-and-other-platforms)\n  * [License](#license)\n\n## Getting started\n\nThe server is written in TypeScript. It is mostly intended to be run via [`ink-vscode`], but could be run with any client supporting LSP. You typically don't need to start the server yourself.\n\n[`ink-vscode`]: https://github.com/sequitur/ink-vscode\n\n### Installation\nInstall the package with [npm] or [yarn].\n\n```shell\n$ npm install ink-language-server\n```\n\n```shell\n$ yarn add ink-language-server\n```\n\n[npm]: https://www.npmjs.com/\n[yarn]: https://yarnpkg.com/lang/en/\n\n### Running\nIf you want to run the server as-is, the entry point is located in `lib/server.js`.\n\n```shell\n$ node lib/server.js [--node-ipc|--stdio|--socket={number}]\n```\n\n### Writing a client\n\n#### Configuration Settings\nThe server supports three configuration settings.\n\n- `ink.mainStoryPath` is path to the main ink file, used by Inklecate to build the story. This setting falls back to `./main.ink`.\n- `ink.inklecateExecutablePath` path to the inklecate, you would like to use if you don't want to use the bundled one. If inklecate is accessible in `$PATH`, you can just provide `inklecate`.\n- `ink.runThroughMono` by default, this setting is `false`. You can force the server to use Mono by setting it to `true`. You can also specify an absolute path to your custom `mono` executable.\n\n#### Compilation\nAfter every successful compilation, the server will post a notification named `inkWorkspace/didCompileStory`, with the following parameters:\n\n```typescript\nexport interface SaveCompiledStoryParams {\n    /** Uri of the current workspace (in which the compilation happened). */\n    workspaceUri: string;\n\n    /** Uri of the compiled story, a JSON file. */\n    storyUri: string;\n}\n```\n\nThe type is exposed by the package, so you can simply import it in your code:\n\n```typescript\nimport { DidCompileStoryParams } from 'ink-language-server';\n```\n\nThe server also expose the `compileStory` command, which can be use to trigger a full compilation. It\ntakes a single parameter: a URI, which will most likely be the current file in the editor.\n\nInternally, this URI will be used to infer which workspace/story the server should compile.\n\n#### Preview\n\nThe server can take advantage of inklecate's play mode to provide an interactive preview. The client\ncan start a preview by calling the `play-story` command; during the story run, numerous\nnotifications will be sent:\n\n- `inkRuntime/text` – the client should display the content as text;\n- `inkRuntime/tag` – the client should display the content as tags;\n- `inkRuntime/choice` – the client should display the content as a choice option;\n- `inkRuntime/prompt` – the client should ask the user to select previoulsy displayed options;\n- `inkRuntime/endOfStory` – the client should indicate that the story ended;\n- `inkRuntime/error` – the client should prominetly display the runtime error.\n\nThe notifications sent with parameters are indicated below:\n\n```typescript\nexport interface RuntimeTextParams {\n  text: string;\n}\n\nexport interface RuntimeTagParams {\n  tags: string[];\n}\n\nexport interface RuntimeChoicesParams {\n  choice: RuntimeChoice;\n}\n\nexport interface RuntimeErrorParams {\n  error: string;\n}\n```\nTheses types are exposed by the package as well.\n\nAfter receiving `inkRuntime/prompt` and gathering input from the user, the client can send the\nselected choice back to the server by calling the `select-option`, with the index of the selected\noption as parameter. The story will then continue to unfold until `inkRuntime/endOfStory` is sent.\n\n## Inklecate\n\nThe server is bundled with the latest version of Inklecate, built to run natively on Windows. If you plan to use the language server on another platform, there are a few things to know.\n\n### macOS\n\nIf the server detects that it's being intalled on macOS, it will try to download an additional native macOS binary. This optional download may fail for a wide range of reasons. If doesn't complete, you will be left with three options:\n\n1. Download the binary archive yourself, extract it somewhere on your system and configure your language client to send its absolute path as the value of `ink.inklecateExecutablePath`.\n2. Download the binary archive yourself and extract its content to `\u003clanguage-server-path\u003e/vendor/`.\n3. Install a [Mono runtime], the server will then use the Windows binaries and run them through\n   mono.\n\n### Linux and other platforms\n\nThere are no prebuilt binaries for these platforms, so you will have to install the [Mono runtime] in order to run the server.\n\n[Mono runtime]: http://www.mono-project.com/\n\n## License\n\nInk Language Server is released under the MIT license. See LICENSE for details.\n\nThe Ink logo used in the header is the full property of [inkle Ltd](https://www.inklestudios.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fephread%2Fink-language-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fephread%2Fink-language-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fephread%2Fink-language-server/lists"}