linear-ls 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -0
- package/dist/server.js +0 -1
- package/package.json +1 -1
- package/dist/test.js +0 -45
package/README.md
CHANGED
|
@@ -8,6 +8,29 @@ Linear Language Server
|
|
|
8
8
|
npm i -g linear-ls
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
### neovim
|
|
12
|
+
|
|
13
|
+
If you use `lspconfig`, add the following:
|
|
14
|
+
|
|
15
|
+
```lua
|
|
16
|
+
if not lspconfigconfigs.lls then
|
|
17
|
+
lspconfigconfigs.lls = {
|
|
18
|
+
default_config = {
|
|
19
|
+
cmd = { "linear-ls", "--stdio" },
|
|
20
|
+
filetypes = { "typescript" },
|
|
21
|
+
root_dir = function(fname)
|
|
22
|
+
return lspconfig.util.find_git_ancestor(fname)
|
|
23
|
+
end,
|
|
24
|
+
},
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
lspconfig.lls.setup({
|
|
28
|
+
capabilities = capabilities,
|
|
29
|
+
})
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
And have your Linear token sourced as `LINEAR_API_KEY`.
|
|
33
|
+
|
|
11
34
|
## Features
|
|
12
35
|
|
|
13
36
|
### Hover on Issues
|
package/dist/server.js
CHANGED
|
@@ -8,7 +8,6 @@ const documents = new node_1.TextDocuments(vscode_languageserver_textdocument_1.
|
|
|
8
8
|
const teamKeys = new Set();
|
|
9
9
|
const issues = new Map();
|
|
10
10
|
const issuePositions = new Map();
|
|
11
|
-
// [MOB-201](https://linear.app/eucalyptus/issue/MOB-201/devices-screen-not-paired-state)
|
|
12
11
|
connection.onInitialize(async () => {
|
|
13
12
|
await (0, linear_1.getTeamKeys)().then((keys) => {
|
|
14
13
|
keys.map((k) => {
|
package/package.json
CHANGED
package/dist/test.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const core_1 = require("@urql/core");
|
|
7
|
-
const node_fetch_1 = __importDefault(require("node-fetch"));
|
|
8
|
-
const client = (0, core_1.createClient)({
|
|
9
|
-
url: "https://api.linear.app/graphql",
|
|
10
|
-
exchanges: core_1.defaultExchanges,
|
|
11
|
-
fetch: node_fetch_1.default,
|
|
12
|
-
fetchOptions: {
|
|
13
|
-
headers: {
|
|
14
|
-
authorization: process.env.LINEAR_API_KEY,
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
|
-
async function findIssues(teamKeys, issueTitle) {
|
|
19
|
-
const resp = await client
|
|
20
|
-
.query((0, core_1.gql) `
|
|
21
|
-
query FindIssues($teamFilter: TeamFilter!, $issueFilter: IssueFilter!) {
|
|
22
|
-
teams(filter: $teamFilter) {
|
|
23
|
-
nodes {
|
|
24
|
-
id
|
|
25
|
-
issues(filter: $issueFilter) {
|
|
26
|
-
nodes {
|
|
27
|
-
id
|
|
28
|
-
identifier
|
|
29
|
-
title
|
|
30
|
-
description
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
`, {
|
|
37
|
-
teamFilter: {
|
|
38
|
-
or: teamKeys.map((tk) => [{ key: { containsIgnoreCase: tk } }]),
|
|
39
|
-
},
|
|
40
|
-
issueFilter: issueTitle,
|
|
41
|
-
})
|
|
42
|
-
.toPromise();
|
|
43
|
-
console.log(JSON.stringify(resp, null, 2));
|
|
44
|
-
}
|
|
45
|
-
findIssues(["MOB"], "RUM");
|