Files
lua-config-vim/current_config/lua/alpha/lsp/servers/jsonls.lua
2023-12-13 00:27:19 +03:00

15 lines
352 B
Lua

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