aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/server_configurations/wgsl_analyzer.lua
blob: d5c73135849f25dac1641f47bac859d98ea6e6f1 (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
local util = require 'lspconfig.util'

local bin_name = 'wgsl_analyzer'
local cmd = { bin_name }

if vim.fn.has 'win32' == 1 then
  cmd = { 'cmd.exe', '/C', bin_name }
end

return {
  default_config = {
    cmd = cmd,
    filetypes = { 'wgsl' },
    root_dir = util.root_pattern('.git'),
    settings = {}
  },
  docs = {
    description = [[
https://github.com/wgsl-analyzer/wgsl-analyzer

`wgsl_analyzer` can be installed via `cargo`:
```sh
cargo install --git https://github.com/wgsl-analyzer/wgsl-analyzer wgsl_analyzer
```
]],
    default_config = {
      root_dir = [[root_pattern(".git"]],
    }
  }
}