aboutsummaryrefslogtreecommitdiffstats
path: root/lua/pi/lsp/servers/jsonls.lua
blob: 3fa16e17128305eb134c77fd18b9790a2cd0b1ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
local lsp_attach = require "pi.lsp.attach"
local lsp_flags = require "pi.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