@marko/language-server 1.1.11 → 1.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1064,6 +1064,9 @@ function AttrName({
1064
1064
  documentation.value += `[More Info](${autocomplete.descriptionMoreURL})`;
1065
1065
  }
1066
1066
  }
1067
+ if (!attr.required) {
1068
+ label += "?";
1069
+ }
1067
1070
  completions.push({
1068
1071
  label,
1069
1072
  documentation: documentation.value ? documentation : void 0,
@@ -2362,15 +2365,9 @@ var ScriptService = {
2362
2365
  tsProject.host
2363
2366
  );
2364
2367
  const generated = extracted.toString();
2365
- const content = (() => {
2366
- try {
2367
- return prettier2.format(generated, {
2368
- parser: lang === ScriptLang.ts ? "typescript" : "babel"
2369
- });
2370
- } catch {
2371
- return generated;
2372
- }
2373
- })();
2368
+ const content = await prettier2.format(generated, {
2369
+ parser: lang === ScriptLang.ts ? "typescript" : "babel"
2370
+ }).catch(() => generated);
2374
2371
  return {
2375
2372
  language: lang === ScriptLang.ts ? "typescript" : "javascript",
2376
2373
  content