Skip to content

Commit b6591bc

Browse files
authored
docs(smithy): how do you install this thing #3961
1 parent f5aa43e commit b6591bc

File tree

1 file changed

+34
-5
lines changed

1 file changed

+34
-5
lines changed

lsp/smithy_ls.lua

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,42 @@
22
---
33
--- https://github.com/awslabs/smithy-language-server
44
---
5-
--- `Smithy Language Server`, A Language Server Protocol implementation for the Smithy IDL
6-
7-
-- pass 0 as the first argument to use STDIN/STDOUT for communication
8-
local cmd = { 'smithy-language-server', '0' }
5+
--- "Smithy Language Server", a Language server for the Smithy IDL.
6+
---
7+
--- smithy-language-server has no docs that say how to actually install it(?), so look at:
8+
--- https://github.com/smithy-lang/smithy-vscode/blob/600cfcf0db65edce85f02e6d50f5fa2b0862bc8d/src/extension.ts#L78
9+
---
10+
--- Maven package: https://central.sonatype.com/artifact/software.amazon.smithy/smithy-language-server
11+
---
12+
--- Installation:
13+
--- 1. Install coursier, or any tool that can install maven packages.
14+
--- ```
15+
--- brew install coursier
16+
--- ```
17+
--- 2. The LS is auto-installed and launched by:
18+
--- ```
19+
--- coursier launch software.amazon.smithy:smithy-language-server:0.7.0
20+
--- ```
921

1022
return {
11-
cmd = cmd,
23+
-- pass 0 as the first argument to use STDIN/STDOUT for communication
24+
cmd = {
25+
'coursier',
26+
'launch',
27+
'software.amazon.smithy:smithy-language-server:0.7.0',
28+
'-M',
29+
'software.amazon.smithy.lsp.Main',
30+
'--',
31+
'0',
32+
},
1233
filetypes = { 'smithy' },
1334
root_markers = { 'smithy-build.json', 'build.gradle', 'build.gradle.kts', '.git' },
35+
message_level = vim.lsp.protocol.MessageType.Log,
36+
init_options = {
37+
statusBarProvider = 'show-message',
38+
isHttpEnabled = true,
39+
compilerOptions = {
40+
snippetAutoIndent = false,
41+
},
42+
},
1443
}

0 commit comments

Comments
 (0)