aboutsummaryrefslogtreecommitdiffstats
path: root/lua/alpha/lsp/servers/jsonls.lua
blob: 9c731ab154b2e33995c354ebf1e46c54461f4b1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
local lsp_attach = require "alpha.lsp.attach"
local lsp_flags = require "alpha.lsp.flags"

return function(ops)
  local config = {
    on_attach = lsp_attach,
    flags = lsp_flags,
  }
  if vim.fn.executable "json-languageserver" == 1 then
    config.cmd = { "json-languageserver", "--stdio" }
  end

  return vim.tbl_extend("force", config, ops)
end