@effect/language-service 0.27.0 → 0.27.2

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
@@ -24,6 +24,7 @@ This package implements a TypeScript language service plugin that allows additio
24
24
  - In VSCode you can do this by pressing "F1" and typing "TypeScript: Select TypeScript version". Then select "Use workspace version". If that option does not appear, TypeScript is not installed locally in your node_modules.
25
25
  - In JetBrains you may have to disable the Vue language service, and choose the workspace version of TypeScript in the settings from the dropdown.
26
26
  - In NVim with nvim-vtsls you should refer to [how to enable TypeScript plugins in vtsls](https://github.com/yioneko/vtsls?tab=readme-ov-file#typescript-plugin-not-activated)
27
+ - In Emacs, additional steps are required to enable LSPs, [step by step instructions can be found here](https://gosha.net/2025/effect-ls-emacs/)
27
28
 
28
29
  And you're done! You'll now be able to use a set of refactors and diagnostics that target Effect!
29
30
 
@@ -32,7 +33,7 @@ And you're done! You'll now be able to use a set of refactors and diagnostics th
32
33
  ### Quickinfo
33
34
 
34
35
  - Show the extended type of the current Effect
35
- - Hovering `yield\*` of `Effect.gen` will show the Effect type parameters
36
+ - Hovering `yield*` of `Effect.gen` will show the Effect type parameters
36
37
  - Hovering a variable assignment of a type Layer, will show info on how each service got involved
37
38
  - Hovering a layer, will attempt to produce a graph
38
39
 
@@ -56,6 +57,7 @@ And you're done! You'll now be able to use a set of refactors and diagnostics th
56
57
  - Autocomplete `Effect.fn` with the span name given by the exported member
57
58
  - Completions for DurationInput string millis/seconds/etc...
58
59
  - Allow to configure packages to be imported with namespace style `import * as Effect from "effect"`
60
+ - Suggest brand when using `Schema.brand`
59
61
  - Effect comment directives
60
62
 
61
63
  ### Refactors
package/cli.js CHANGED
@@ -30284,7 +30284,11 @@ var createDiagnosticExecutor = fn("LSP.createCommentDirectivesProcessor")(
30284
30284
  const diagnostics2 = [];
30285
30285
  const codeFixes = [];
30286
30286
  const ruleNameLowered = rule.name.toLowerCase();
30287
+ const defaultLevel = pluginOptions.diagnosticSeverity[ruleNameLowered] || rule.severity;
30287
30288
  if (skippedRules.indexOf(ruleNameLowered) > -1) return { diagnostics: diagnostics2, codeFixes };
30289
+ if (defaultLevel === "off" && (lineOverrides[ruleNameLowered] || sectionOverrides[ruleNameLowered] || []).length === 0) {
30290
+ return { diagnostics: diagnostics2, codeFixes };
30291
+ }
30288
30292
  const fixByDisableNextLine = (_) => ({
30289
30293
  fixName: rule.name + "_skipNextLine",
30290
30294
  description: "Disable " + rule.name + " for this line",
@@ -30325,7 +30329,7 @@ var createDiagnosticExecutor = fn("LSP.createCommentDirectivesProcessor")(
30325
30329
  });
30326
30330
  });
30327
30331
  for (const emitted of applicableDiagnostics.slice(0)) {
30328
- let newLevel = pluginOptions.diagnosticSeverity[ruleNameLowered] || rule.severity;
30332
+ let newLevel = defaultLevel;
30329
30333
  const lineOverride = (lineOverrides[ruleNameLowered] || []).find(
30330
30334
  (_) => _.pos < emitted.node.getStart(sourceFile) && _.end >= emitted.node.getEnd()
30331
30335
  );