Skip to content
This repository was archived by the owner on Feb 22, 2020. It is now read-only.

Commit 20531d5

Browse files
committed
feat: initial commit
0 parents  commit 20531d5

16 files changed

+6674
-0
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[*]
2+
insert_final_newline = true
3+
end_of_line = lf
4+
charset = utf-8
5+
trim_trailing_whitespace = true
6+
indent_style = space
7+
indent_size = 4
8+
9+
[*.{json,js,yml}]
10+
indent_size = 2
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dist/
2+
node_modules/
3+
coverage/

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package.json
2+
package-lock.json
3+
dist/

.travis.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
language: node_js
2+
node_js: '10'
3+
cache: yarn
4+
env:
5+
global:
6+
- FORCE_COLOR=1
7+
install:
8+
- yarn
9+
jobs:
10+
include:
11+
- stage: test
12+
script:
13+
- yarn run prettier
14+
- yarn run tslint
15+
- yarn run build
16+
- yarn test
17+
- nyc report --reporter json
18+
- 'bash <(curl -s https://codecov.io/bash)'
19+
- stage: release
20+
script:
21+
- yarn run build
22+
- yarn run semantic-release
23+
stages:
24+
- test
25+
- name: release
26+
if: branch = master AND type = push AND fork = false
27+
branches:
28+
only:
29+
- master
30+
- /^renovate\//

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"typescript.tsdk": "node_modules/typescript/lib"
3+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 Sourcegraph
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# @sourcegraph/lsp-client
2+
3+
[![npm](https://img.shields.io/npm/v/@sourcegraph/lsp-client.svg)](https://www.npmjs.com/package/@sourcegraph/lsp-client)
4+
[![downloads](https://img.shields.io/npm/dt/@sourcegraph/lsp-client.svg)](https://www.npmjs.com/package/@sourcegraph/lsp-client)
5+
[![build](https://travis-ci.org/sourcegraph/lsp-client.svg?branch=master)](https://travis-ci.org/sourcegraph/lsp-client)
6+
[![codecov](https://codecov.io/gh/sourcegraph/lsp-client/branch/master/graph/badge.svg?token=Wwxuf9Th3k)](https://codecov.io/gh/sourcegraph/lsp-client)
7+
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
8+
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
9+
10+
Library that connects Sourcegraph extensions to language servers
11+
12+
## Install
13+
14+
```
15+
npm install @sourcegraph/lsp-client
16+
# or
17+
yarn add @sourcegraph/lsp-client
18+
```
19+
20+
## Build
21+
22+
```
23+
yarn
24+
yarn build
25+
```
26+
27+
## Test
28+
29+
```
30+
yarn test
31+
```
32+
33+
## Release
34+
35+
Releases are done automatically in CI when commits are merged into master by analyzing [Conventional Commit Messages](https://conventionalcommits.org/).
36+
After running `yarn`, commit messages will be linted automatically when committing though a git hook.
37+
The git hook can be circumvented for fixup commits with [git's `fixup!` autosquash feature](https://fle.github.io/git-tip-keep-your-branch-clean-with-fixup-and-autosquash.html), or by passing `--no-verify` to `git commit`.
38+
You may have to rebase a branch before merging to ensure it has a proper commit history, or squash merge with a manually edited commit message that conforms to the convention.

package.json

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"name": "@sourcegraph/lsp-client",
3+
"version": "0.0.0-DEVELOPMENT",
4+
"description": "Library that connects Sourcegraph extensions to language servers",
5+
"license": "MIT",
6+
"repository": {
7+
"type": "git",
8+
"url": "https://github.com/sourcegraph/lsp-client.git"
9+
},
10+
"files": [
11+
"dist"
12+
],
13+
"main": "dist/index.js",
14+
"types": "dist/index.d.ts",
15+
"scripts": {
16+
"test": "mocha --require ts-node/register \"src/**/*.test.ts\"",
17+
"semantic-release": "semantic-release",
18+
"prettier": "prettier '**/{*.{js?(on),ts?(x),scss},.*.js?(on)}' --write --list-different",
19+
"tslint": "tslint -c tslint.json -p tsconfig.json './src/*.ts?(x)' './*.ts?(x)'",
20+
"build": "tsc -p .",
21+
"watch": "tsc -p . -w"
22+
},
23+
"commitlint": {
24+
"extends": [
25+
"@commitlint/config-conventional"
26+
]
27+
},
28+
"nyc": {
29+
"include": [
30+
"src/**/*.ts?(x)"
31+
],
32+
"exclude": [
33+
"**/*.test.ts?(x)"
34+
],
35+
"extension": [
36+
".tsx",
37+
".ts"
38+
]
39+
},
40+
"devDependencies": {
41+
"@commitlint/cli": "^7.2.1",
42+
"@commitlint/config-conventional": "^7.1.2",
43+
"@sourcegraph/prettierrc": "^2.2.0",
44+
"@sourcegraph/tsconfig": "^3.0.0",
45+
"@sourcegraph/tslint-config": "^12.2.0",
46+
"@types/lodash": "^4.14.119",
47+
"@types/uuid": "^3.4.4",
48+
"husky": "^1.3.1",
49+
"mocha": "^5.2.0",
50+
"nyc": "^13.1.0",
51+
"prettier": "^1.15.3",
52+
"semantic-release": "^15.13.1",
53+
"tslint": "^5.12.0",
54+
"typescript": "^3.2.2"
55+
},
56+
"dependencies": {
57+
"@sourcegraph/vscode-ws-jsonrpc": "^0.0.3-fork",
58+
"lodash": "^4.17.11",
59+
"rxjs": "^6.3.3",
60+
"sourcegraph": "^20.0.0",
61+
"type-zoo": "^3.2.1",
62+
"uuid": "^3.3.2",
63+
"vscode-languageserver-protocol": "^3.14.1",
64+
"vscode-languageserver-types": "^3.14.0"
65+
},
66+
"husky": {
67+
"hooks": {
68+
"commit-msg": "commitlint -e $HUSKY_GIT_PARAMS"
69+
}
70+
}
71+
}

prettier.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('@sourcegraph/prettierrc')

0 commit comments

Comments
 (0)