aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/configs/alloy_ls.lua
blob: 31e7204c55932ed7d6ec1b298e156025de3f5cd2 (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
return {
  default_config = {
    cmd = { 'alloy', 'lsp' },
    filetypes = { 'alloy' },
    root_dir = function(fname)
      return vim.fs.dirname(vim.fs.find('.git', { path = fname, upward = true })[1])
    end,
    single_file_support = true,
  },
  docs = {
    description = [[
https://github.com/AlloyTools/org.alloytools.alloy

Alloy is a formal specification language for describing structures and a tool for exploring them.

You may also need to configure the filetype for Alloy (*.als) files:

```
autocmd BufNewFile,BufRead *.als set filetype=alloy
```

or

```lua
vim.filetype.add({
  pattern = {
    ['.*/*.als'] = 'alloy',
  },
})
```

Alternatively, you may use a syntax plugin like https://github.com/runoshun/vim-alloy.
]],
  },
}