aboutsummaryrefslogtreecommitdiffstats
path: root/lua/pi/lsp/servers/html.lua
blob: 17413ee9f5bbbecab86cd0cfbf3d8a7f954399ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
local lsp_attach = require "pi.lsp.attach"
local lsp_flags = require "pi.lsp.flags"

return function(ops)
  local capabilities = require("blink.cmp").get_lsp_capabilities(vim.lsp.protocol.make_client_capabilities())
  local config = {
    on_attach = lsp_attach,
    filetypes = { "html" },
    flags = lsp_flags,
    capabilities = capabilities,
  }
  if vim.fn.executable "html-languageserver" == 1 then
    config.cmd = { "html-languageserver", "--stdio" }
  end

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