@effect/language-service 0.32.0 → 0.33.1

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/README.md CHANGED
@@ -90,13 +90,16 @@ Few options can be provided alongside the initialization of the Language Service
90
90
  "plugins": [
91
91
  {
92
92
  "name": "@effect/language-service",
93
+ "refactors": true, // controls Effect refactors (default: true)
93
94
  "diagnostics": true, // controls Effect diagnostics (default: true)
94
95
  "diagnosticSeverity": { // allows to change per-rule default severity of the diagnostic in the whole project
95
96
  "floatingEffect": "warning" // example for a rule, allowed values are off,error,warning,message,suggestion
96
97
  },
97
- "quickinfo": true, // controls quickinfo over Effect (default: true)
98
+ "quickinfo": true, // controls Effect quickinfo (default: true)
99
+ "quickinfoEffectParameters": "whenTruncated", // (default: "whenTruncated") controls when to display effect type parameters always,never,whenTruncated
98
100
  "completions": true, // controls Effect completions (default: true)
99
101
  "goto": true, // controls Effect goto references (default: true)
102
+ "inlays": true, // controls Effect provided inlayHints (default: true)
100
103
  "allowedDuplicatedPackages": [], // list of package names that have effect in peer dependencies and are allowed to be duplicated (default: [])
101
104
  "barrelImportPackages": [], // package names that should be preferred as imported from the top level barrel file (default: [])
102
105
  "namespaceImportPackages": [], // package names that should be preferred as imported with namespace imports e.g. ["effect", "@effect/*"] (default: [])
package/cli.js CHANGED
@@ -28777,17 +28777,34 @@ function parseDiagnosticSeverity(config2) {
28777
28777
  )
28778
28778
  );
28779
28779
  }
28780
+ var defaults = {
28781
+ refactors: true,
28782
+ diagnostics: true,
28783
+ diagnosticSeverity: {},
28784
+ quickinfo: true,
28785
+ quickinfoEffectParameters: "whentruncated",
28786
+ completions: true,
28787
+ goto: true,
28788
+ inlays: true,
28789
+ allowedDuplicatedPackages: [],
28790
+ namespaceImportPackages: [],
28791
+ barrelImportPackages: [],
28792
+ topLevelNamedReexports: "ignore"
28793
+ };
28780
28794
  function parse4(config2) {
28781
28795
  return {
28782
- diagnostics: isObject(config2) && hasProperty(config2, "diagnostics") && isBoolean(config2.diagnostics) ? config2.diagnostics : true,
28783
- diagnosticSeverity: isObject(config2) && hasProperty(config2, "diagnosticSeverity") && isRecord(config2.diagnosticSeverity) ? parseDiagnosticSeverity(config2.diagnosticSeverity) : {},
28784
- quickinfo: isObject(config2) && hasProperty(config2, "quickinfo") && isBoolean(config2.quickinfo) ? config2.quickinfo : true,
28785
- completions: isObject(config2) && hasProperty(config2, "completions") && isBoolean(config2.completions) ? config2.completions : true,
28786
- goto: isObject(config2) && hasProperty(config2, "goto") && isBoolean(config2.goto) ? config2.goto : true,
28787
- allowedDuplicatedPackages: isObject(config2) && hasProperty(config2, "allowedDuplicatedPackages") && isArray(config2.allowedDuplicatedPackages) && config2.allowedDuplicatedPackages.every(isString) ? config2.allowedDuplicatedPackages.map((_) => _.toLowerCase()) : [],
28788
- namespaceImportPackages: isObject(config2) && hasProperty(config2, "namespaceImportPackages") && isArray(config2.namespaceImportPackages) && config2.namespaceImportPackages.every(isString) ? config2.namespaceImportPackages.map((_) => _.toLowerCase()) : [],
28789
- barrelImportPackages: isObject(config2) && hasProperty(config2, "barrelImportPackages") && isArray(config2.barrelImportPackages) && config2.barrelImportPackages.every(isString) ? config2.barrelImportPackages.map((_) => _.toLowerCase()) : [],
28790
- topLevelNamedReexports: isObject(config2) && hasProperty(config2, "topLevelNamedReexports") && isString(config2.topLevelNamedReexports) && (config2.topLevelNamedReexports.toLowerCase() === "ignore" || config2.topLevelNamedReexports.toLowerCase() === "follow") ? config2.topLevelNamedReexports.toLowerCase() : "ignore"
28796
+ refactors: isObject(config2) && hasProperty(config2, "refactors") && isBoolean(config2.refactors) ? config2.refactors : defaults.refactors,
28797
+ diagnostics: isObject(config2) && hasProperty(config2, "diagnostics") && isBoolean(config2.diagnostics) ? config2.diagnostics : defaults.diagnostics,
28798
+ diagnosticSeverity: isObject(config2) && hasProperty(config2, "diagnosticSeverity") && isRecord(config2.diagnosticSeverity) ? parseDiagnosticSeverity(config2.diagnosticSeverity) : defaults.diagnosticSeverity,
28799
+ quickinfo: isObject(config2) && hasProperty(config2, "quickinfo") && isBoolean(config2.quickinfo) ? config2.quickinfo : defaults.quickinfo,
28800
+ quickinfoEffectParameters: isObject(config2) && hasProperty(config2, "quickinfoEffectParameters") && isString(config2.quickinfoEffectParameters) && ["always", "never", "whentruncated"].includes(config2.quickinfoEffectParameters.toLowerCase()) ? config2.quickinfoEffectParameters.toLowerCase() : defaults.quickinfoEffectParameters,
28801
+ completions: isObject(config2) && hasProperty(config2, "completions") && isBoolean(config2.completions) ? config2.completions : defaults.completions,
28802
+ goto: isObject(config2) && hasProperty(config2, "goto") && isBoolean(config2.goto) ? config2.goto : defaults.goto,
28803
+ inlays: isObject(config2) && hasProperty(config2, "inlays") && isBoolean(config2.inlays) ? config2.inlays : defaults.inlays,
28804
+ allowedDuplicatedPackages: isObject(config2) && hasProperty(config2, "allowedDuplicatedPackages") && isArray(config2.allowedDuplicatedPackages) && config2.allowedDuplicatedPackages.every(isString) ? config2.allowedDuplicatedPackages.map((_) => _.toLowerCase()) : defaults.allowedDuplicatedPackages,
28805
+ namespaceImportPackages: isObject(config2) && hasProperty(config2, "namespaceImportPackages") && isArray(config2.namespaceImportPackages) && config2.namespaceImportPackages.every(isString) ? config2.namespaceImportPackages.map((_) => _.toLowerCase()) : defaults.namespaceImportPackages,
28806
+ barrelImportPackages: isObject(config2) && hasProperty(config2, "barrelImportPackages") && isArray(config2.barrelImportPackages) && config2.barrelImportPackages.every(isString) ? config2.barrelImportPackages.map((_) => _.toLowerCase()) : defaults.barrelImportPackages,
28807
+ topLevelNamedReexports: isObject(config2) && hasProperty(config2, "topLevelNamedReexports") && isString(config2.topLevelNamedReexports) && ["ignore", "follow"].includes(config2.topLevelNamedReexports.toLowerCase()) ? config2.topLevelNamedReexports.toLowerCase() : defaults.topLevelNamedReexports
28791
28808
  };
28792
28809
  }
28793
28810