aboutsummaryrefslogtreecommitdiffstats
path: root/lsp/smithy_ls.lua
blob: 6a7c396bc35572d66bb6c42e7d302615d33a5bd7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---@brief
---
--- https://github.com/awslabs/smithy-language-server
---
--- "Smithy Language Server", a Language server for the Smithy IDL.
---
--- Based off the official maven artifacts setup
--- https://github.com/smithy-lang/smithy-language-server?tab=readme-ov-file#maven-artifacts
---
--- Maven package: https://central.sonatype.com/artifact/software.amazon.smithy/smithy-language-server
--- Adjusting jvm opts: https://get-coursier.io/docs/cli-launch#java-options
---
--- Installation:
--- 1. Install coursier, or any tool that can install maven packages.
---    ```
---    brew install coursier
---    ```
--- 2. The LS is auto-installed and launched by:
---    ```
---    cs launch --contrib smithy-language-server:0.8.0
---    ```

---@type vim.lsp.Config
return {
  cmd = {
    'cs',
    'launch',
    '--contrib',
    'smithy-language-server:0.8.0',
  },
  filetypes = { 'smithy' },
  root_markers = { 'smithy-build.json', 'build.gradle', 'build.gradle.kts', '.git' },
  message_level = vim.lsp.protocol.MessageType.Log,
  init_options = {
    statusBarProvider = 'show-message',
    isHttpEnabled = true,
    compilerOptions = {
      snippetAutoIndent = false,
    },
  },
}