@rohal12/spindle-lsp 0.3.4 → 0.3.5

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/bin.js CHANGED
@@ -2087,6 +2087,7 @@ var init_link_parser = __esm({
2087
2087
 
2088
2088
  // src/plugins/diagnostics.ts
2089
2089
  function computeDiagnostics(uri, workspace) {
2090
+ if (!workspace.initialized) return [];
2090
2091
  try {
2091
2092
  const text = workspace.documents.getText(uri);
2092
2093
  if (text === void 0) return [];
@@ -2109,15 +2110,13 @@ function computeDiagnostics(uri, workspace) {
2109
2110
  validateVariables(uri, workspace, diagnostics);
2110
2111
  } catch {
2111
2112
  }
2112
- if (workspace.initialized) {
2113
- try {
2114
- validateLinks(text, passages, passageNames, diagnostics);
2115
- } catch {
2116
- }
2117
- try {
2118
- validateWidgetInvocations(macros, workspace, diagnostics);
2119
- } catch {
2120
- }
2113
+ try {
2114
+ validateLinks(text, passages, passageNames, diagnostics);
2115
+ } catch {
2116
+ }
2117
+ try {
2118
+ validateWidgetInvocations(macros, workspace, diagnostics);
2119
+ } catch {
2121
2120
  }
2122
2121
  return diagnostics;
2123
2122
  } catch {
@@ -2278,7 +2277,6 @@ function validateArguments(macros, workspace, passageNames, diagnostics) {
2278
2277
  }
2279
2278
  }
2280
2279
  function validateVariables(uri, workspace, diagnostics) {
2281
- if (!workspace.initialized) return;
2282
2280
  if (!workspace.variables.hasStoryVariables()) {
2283
2281
  const undeclared2 = workspace.variables.getUndeclared(uri);
2284
2282
  const text = workspace.documents.getText(uri);