# kythe-languageserver

> A language server for Kythe

Latest version **0.1.1** (published 2017-07-27) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install kythe-languageserver
pnpm add kythe-languageserver
yarn add kythe-languageserver
bun add kythe-languageserver
```

Provides the command `kythe-languageserver`.

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: insecure dependencies; abandoned.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2017-07-27 |
| First published | 2017-07-20 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=8.0.0 |
| Dependencies | 7 |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2148 |
| Maintainers | google-admin, kythe |

## Links

- npm: https://www.npmjs.com/package/kythe-languageserver
- Repository: https://github.com/google/kythe
- Homepage: https://github.com/google/kythe#readme
- Issues: https://github.com/google/kythe/issues
- npm.io page: https://npm.io/package/kythe-languageserver

## Dependencies (7)

- [ajv](https://npm.io/package/ajv.md) ^5.2.2
- [request](https://npm.io/package/request.md) ^2.81.0
- [protobufjs](https://npm.io/package/protobufjs.md) github:Alexendoo/protobuf.js#optional-field-types
- [path-to-regexp](https://npm.io/package/path-to-regexp.md) ^1.7.0
- [diff-match-patch](https://npm.io/package/diff-match-patch.md) ^1.0.0
- [vscode-languageserver](https://npm.io/package/vscode-languageserver.md) ^3.3.0
- [request-promise-native](https://npm.io/package/request-promise-native.md) ^1.0.4

## Recent versions

- 0.1.1 (latest) — 2017-07-27
- 0.1.0 — 2017-07-24
- 0.0.1 — 2017-07-20

## README

## Building

Be sure to run `npm install` from the `languageserver` directory in order to
fetch dependencies.

We also need to compile the appropriate protos so be sure to run:

```bash
npm run proto
```

This is only required on first setup and when the protos change.

To build the server, run:

```bash
npm run compile
```

or

```bash
npm run watch
```

## Testing

In order to test the server, run:

```bash
npm run test
```

If you wish to run a watch build on tests, run:

```bash
npm run watch_test
```

## Running
The server communicates over the
(Language Server Protocol](https://github.com/Microsoft/language-server-protocol)
(specifically [v2](https://github.com/Microsoft/language-server-protocol/blob/master/versions/protocol-2-x.md)).

The server, by default, makes requests to localhost:8080 which should be running an HTTP interface for the Kythe xref service.

A `.kythe-settings.json` file is required in the root of your project. See Configuration for more details.


#### STDIO communication
```
node dist/src/bin/kythe-languageserver.js --stdio
```

#### Socket communication
```
node dist/src/bin/kythe-languageserver.js --pipe=/tmp/socket.sock
```

#### Node IPC
```
node dist/src/bin/kythe-languageserver.js --ipc
```

## Configuration
The server looks for a `kythe-settings.json` file in the root of the workspace. See this example config file containing all possible options:

```
{
    "mappings": [{
        "local": ":file*",
        "vname": {
            "path": "kythe.io/:file*",
            "corpus": "kythe"
        }
    }],

    "xrefs": {
        "host": "localhost",
        "port": 8080
    }
}
```

## Editor specific instructions
#### Neovim
If you're using [LanguageClient-neovim](https://github.com/autozimu/LanguageClient-neovim), it sets its workspace root as the directory containing the first file opened with the proper extension. The most expeditious workaround is to just open a file at the top level first then open anything else. There is an open issue about this: <https://github.com/autozimu/LanguageClient-neovim/issues/70>

---
_Source: https://npm.io/package/kythe-languageserver · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
