summaryrefslogtreecommitdiff
path: root/start/lspconfig-0.1.8/lua/lspconfig/server_configurations/smithy_ls.lua
blob: ef6f010d52d306d2ed7ecd2facd1dd95d017f310 (plain)
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
local util = require 'lspconfig.util'

-- pass 0 as the first argument to use STDIN/STDOUT for communication
local cmd = { 'smithy-language-server', '0' }

local root_files = {
  'smithy-build.json',
  'build.gradle',
  'build.gradle.kts',
  '.git',
}

return {
  default_config = {
    cmd = cmd,
    filetypes = { 'smithy' },
    single_file_support = true,
    root_dir = util.root_pattern(unpack(root_files)),
  },
  docs = {
    description = [[
https://github.com/awslabs/smithy-language-server

`Smithy Language Server`, A Language Server Protocol implementation for the Smithy IDL
]],
    default_config = {
      root_dir = [[root_pattern("smithy-build.json", "build.gradle", "build.gradle.kts", ".git")]],
    },
  },
}