var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/client/index.ts
var client_exports = {};
__export(client_exports, {
  activate: () => activate
});
module.exports = __toCommonJS(client_exports);
var path = __toESM(require("path"));
var import_coc = require("coc.nvim");
async function activate(context) {
  const config = import_coc.workspace.getConfiguration("htmlhint");
  const isEnable = config.get("enable", true);
  if (!isEnable) {
    return;
  }
  const serverModulePath = path.join(__dirname, "..", "server", "server.js");
  const debugOptions = { execArgv: ["--nolazy", "--inspect=6010"], cwd: process.cwd() };
  const serverOptions = {
    run: { module: serverModulePath, transport: import_coc.TransportKind.ipc },
    debug: { module: serverModulePath, transport: import_coc.TransportKind.ipc, options: debugOptions }
  };
  const extensionDocumentSelector = config.get("documentSelector") || [
    { scheme: "file", language: "html" },
    { scheme: "untitled", language: "html" }
  ];
  const clientOptions = {
    documentSelector: extensionDocumentSelector,
    diagnosticCollectionName: "htmlhint",
    synchronize: {
      configurationSection: "htmlhint",
      fileEvents: import_coc.workspace.createFileSystemWatcher("**/.htmlhintrc")
    }
  };
  const forceDebug = false;
  const client = new import_coc.LanguageClient("HTML-hint", serverOptions, clientOptions, forceDebug);
  context.subscriptions.push(new import_coc.SettingMonitor(client, "htmlhint.enable").start());
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  activate
});
