Skip to content

Releases

m2-ls 2.11.0

Choose a tag to compare

@AlexanderGolys AlexanderGolys released this 22 Nov 00:41
  • T03's "Declare TypicalValue => …" quick fix inserts the option into the
    method(...) call wherever it stands in the file, not at the same offset
    counted from the top of the file.

m2-ls 2.10.0

Choose a tag to compare

@AlexanderGolys AlexanderGolys released this 22 Nov 00:41
  • The formatter lays files out as the Macaulay2 Core library is written:
    each line indented from the one above by the brackets it leaves open, a
    closer keeping its body's indentation, tabs every 8 columns; padding that
    aligns with a neighbouring line stays; line breaks
    are kept unless lines.breaks asks for wrapping or the Core layout of
    multi-line constructs. It refuses output that parses differently from its
    input, and formatting a formatted file changes nothing.

  • The formatting settings are grouped into indent, lines, layout,
    spacing and comments, each key one fixed rule, with the built-in
    presets profile = "core" and "modern". Every flat key of 2.9
    still loads as its replacement, with a deprecation warning;
    compactFactorOperators is reported as removed. Formatting no longer
    follows the editor's tabSize and insertSpaces.

  • The membership tests .? and #? are plain operators, no longer tagged
    memberAccess: they select nothing.

  • Parentheses spanning lines are never reported as redundant control
    parentheses: without them new M from (f) followed by \ L on the next
    line would end at the line break.

  • When every installation of a method returns the same type, T03 offers
    declaring it once, method(…, TypicalValue => Boolean), as its preferred
    fix, ahead of annotating each installation; Fix all in file inserts it
    once.

  • oo, ooo, oooo and oN are typed as Core.m2 rotates them: muted
    inputs count, each ;-ended statement is its own numbered input, a null
    value binds no oN and only shifts ooo and oooo, and inside a function
    body they are unknown, as they are read at the call.

  • TEST blocks and documentation examples see everything their package
    exports: globals the package file defines, those of the files it loads, and
    symbols only the export creates, such as an option name. E22 and S31 no
    longer flag them there.

  • S31 counts an earlier export {"Name"} as introducing Name.

  • Add the boolean semantic token type for true, false and other
    Boolean values (variable under standardOnly), so booleans keep their
    colour inside TEST blocks.

  • Highlighting a function's exits, from its -> or a return, also lights
    up the values its body ends with: each branch of a final if, each
    outcome of a final try.

  • ideal, monomialIdeal, matrix, module, ring, monoid, net,
    vector and complex are typed as making the type they are named after, whatever
    their argument: ideal R_* is an Ideal, so (ideal R_*)^3 is one and
    R/(ideal R_*)^3 a QuotientRing. Before, an argument of unknown type
    left them Thing.

  • S19, S20 and S21 no longer offer T X := f for new T from X := f,
    which installs a different method.

  • Remove S14 (forwarding-lambda): replacing c -> f c with f looks f
    up at once instead of at the call, which breaks a name bound later, and
    changes the class of the function.

  • Method dispatch counts only the methods whose domain types are all visible
    in the packages loaded, as an orphan rule would: a method of a package's
    own type, such as ideal(LieAlgebra) or Permutation ^ ZZ, no longer
    widens results in a file that does not load the package.

m2-ls 2.9.0

Choose a tag to compare

@AlexanderGolys AlexanderGolys released this 19 Nov 23:56
  • Add inline refactors: Inline "f.m2" replaces a top-level load with
    the file's text, rewriting its relative loads; Inline this call and
    Inline every call replace calls of a function bound once with its body,
    binding arguments that are not literals and renaming locals that would
    clash. An inline that would change what a name means is offered disabled,
    with the reason.

m2-ls 2.8.1

Choose a tag to compare

@AlexanderGolys AlexanderGolys released this 18 Nov 10:41
  • References and rename include documentation code: Usage lines, and the
    Example code and TEST blocks of a package exporting the name, also when
    the documentation lives in a separate file the package loads, such as
    Package/documentation.m2.
  • D05 counts a name the package exports as defined, even when the package's
    code never assigns it.

m2-ls 2.8.0

Choose a tag to compare

@AlexanderGolys AlexanderGolys released this 18 Nov 09:02
  • Add code lenses for the runtime commands: ▶ Run file on every file and
    ▶ Run tests on the newPackage line of packages registering TESTs,
    shown only when an M2 executable is found. The commands now find M2 on
    PATH the same way and report a missing executable plainly.
  • Go to definition on a name without Macaulay2 source, such as the compiled
    append, opens its documentation page when the catalog records one.
    Source is always preferred.
  • Add S31 unintroduced-symbol, E25 package-rebinding, E26
    library-global-value, T07 call-arity-mismatch, and S32
    error-catching-rewrite (behind diagnostics.errorCatchingRewrites).
    S10 is narrowed to source-owned constructors.
  • S08 checks type names only; option names are reported once, by S01.
  • Recognize destructuring in every bracket Macaulay2 accepts, (), [],
    {} and <|…|>, nested in any mix, across diagnostics, symbols and hints.
    Prefix and postfix operator installations, - T := … and T ^~ := …, are
    recognized as installations.
  • Installation targets are no longer analyzed as calls, removing false T05
    reports and a formatter spacing conflict. method(…) option declarations
    are read correctly by S01.
  • Signature help respects which bindings a file's imports make visible.
  • Hover on a local inside a function body shows its own statement rather
    than the whole enclosing definition.
  • Documentation is a semantic modifier rather than a token type: prose is a
    string or comment, and everything inside documentation, embedded code
    included, carries documentation. String keys are properties: the key an
    entry writes, {"name" => v}, carries declaration; h#"name" reads it.
    String option names are recorded, so f(x, "Eps" => 2) is an option of
    method(Options => {"Eps" => 1}).
  • Formatting gains formatting.indent and operator and bracket spacing
    settings; logging.level controls server logs. Setting defaults are
    compiled in from one file.
  • Suppression directives cover the whole expression below them.
  • Ship the repository as a Claude Code plugin marketplace with an m2-ls
    plugin.
  • Update m2-syn to 0.8 and the user guide for all of the above.

m2-ls 2.7.0

Choose a tag to compare

@AlexanderGolys AlexanderGolys released this 13 Nov 17:17
  • Prevent semantic-token requests from panicking on invalid byte spans or
    UTF-8 boundaries. Map retained parser sources by allocation identity so
    recycled file labels cannot mix coordinates from different snapshots.
  • Add SimpleDoc placeholder actions for functions, method installations,
    types, options, and packages, with sections matching each item's role.
  • Add S27 redundant-method-codomain, S28 composed-lambda, S29
    prefer-for-loop, and S30 redundant-for-start. Remove repeated codomain
    annotations, replace unary forwarding lambdas with composition, and omit
    from 0 through quick fixes; counted while loops receive an advisory hint.
  • Extend S04 coalescence fixes to conditional assignment chains and unused
    non-null updates, preserving branch statements, comments, and local scopes.
  • Count E19 parameter class tests throughout function bodies, including
    validation guards and compound conditions; report the third test per binding.
  • Check D07 documentation coverage for every package export, including package
    fragments and documentation loaded from other files. Require a direct key
    for the public name, or an explicit undocumented exemption.
  • Navigate to quoted documentation page titles and find their references across
    workspace files, respecting package-qualified titles. Fold SimpleDoc nodes
    and nested sections independently.
  • Use a separate docs token for documentation prose and add libraryConst
    and libraryConfigParam modifiers. Keep embedded code's own styles and emit
    string tokens when augmenting syntax highlighting. Standard-only mode maps
    prose to strings and removes the custom library modifiers.
  • Keep documentation examples analyzed for highlighting and navigation without
    publishing their lint diagnostics. Ordinary source and TEST blocks retain
    diagnostics.
  • Resolve library definitions to actual source bindings rather than catalog
    references, including definitions late in a package's load sequence.
  • Discover the catalog as the compatible M2Book release's single .jsonl
    asset, regardless of its name, and verify GitHub's recorded SHA-256 digest.
    Preserve panic diagnostics on stderr as well as in operational logs.
  • Update the user guide for the new actions, diagnostics, documentation
    navigation, folding, and semantic token classifications.

m2-ls 2.6.2

Choose a tag to compare

@AlexanderGolys AlexanderGolys released this 12 Nov 00:25
  • Show computed values as inline values: exact ZZ/QQ arithmetic,
    comparisons and logic, numgens/dim/char of polynomial rings over
    ZZ, QQ, ZZ/p and GF q, the shapes of matrices written out and the
    generator counts of ideals. Only names assigned exactly once are followed.
  • Track which ring an expression lives in through coefficient rings and
    quotients, show it inline (… in C), and follow use R rebinding the names
    of R's variables in source order.
  • Add E23 matrix-shape-mismatch and E24 division-by-zero errors, the S22
    predicate-typical-value warning, and S23 predicate-function-closure,
    S24 inline-null-binding, S25 prefer-augmented-assignment and S26
    constant-condition hints; S24 and S25 come with rewrites.
  • Report as E01 the installations the interpreter never calls because it
    evaluates the operator itself for those native operands, as ZZ + QQ := ….
  • Accept return inside loop bodies, if and try at any depth within a
    function; E08 no longer reports it as outside a function body.
  • Limit S08 to type names and declared optional arguments, and accept any
    declared typical value for S10.
  • Add the ring, module, morphism, complex, functor, structure and
    space kind modifiers and the documentTag modifier. Codomain annotations
    are decorators and interpreter tables are structs. Rename the access
    and math modifiers to memberAccess and tex, split link into url,
    file, directory and wikilink, and add injectedCode and
    injectedName. Unprotected option names are parameters.
  • Leave a package's exports unprotected inside its own source.
  • Load Core for library implementation files, which report syntax errors only
    and get no code actions or formatting. Hover describes the catalog object
    for names the library assigns itself, and go-to-definition falls back to the
    installed source location for objects no assignment defines.
  • Stop counting quoted names as references to the binding they spell in
    highlights and renames.
  • Highlight documentation keys, TO2 link text and example option names more
    precisely, and report unresolved documentation references as D05 errors in
    any file.

m2-ls 2.6.1

Choose a tag to compare

@AlexanderGolys AlexanderGolys released this 12 Nov 00:25
  • Refuse to index a repository root holding more than 100,000 entries,
    logging the refusal instead of scanning it. m2-lint treated the nearest
    ancestor with a .git as the repository, so a .git in the home
    directory made it scan everything below and hang on every input.
  • Report a framed source slice that parses into more than one cell as a
    parse error at the surplus cell, instead of aborting the process.

m2-ls 2.6.0

Choose a tag to compare

@AlexanderGolys AlexanderGolys released this 06 Nov 00:28
  • Discover repository source files and resolve package fragments through their
    unopened entry points and preceding includes. Keep file locals private and
    preserve distinct contexts when multiple packages include the same file.
  • Add E22 unresolved-value errors for unbound callable, constructor, Boolean,
    and indexed-receiver names. Standalone fragments must declare or explicitly
    import their dependencies; arbitrary callers no longer supply ambient globals.
    Intentional symbolic uses remain valid.
  • Restrict cross-file references and renames to shared visible bindings. Refresh
    source contexts after edits and file operations without restoring deleted
    definitions or publishing duplicate diagnostics.
  • Load global ~/.m2-ls/M2LS.toml and workspace-root M2LS.toml, with explicit
    editor settings taking precedence. Reload watched configuration files and
    support the Windows user profile without requiring HOME. Standalone tools
    discover the nearest project configuration and accept --config overrides.
  • Add independent S19 self-initializing-constructor, S20 header-constructor,
    and S21 wrapper-constructor hints and code actions for new T from value.
    Header and wrapper shorthand requires List or Sequence input; rewrites retain
    grouping and comments.
  • Preserve source object identities during context-only reanalysis and recognize
    the mutable runtime currentPackage binding when absent from the catalog.
  • Document import visibility, configuration precedence, unresolved-value errors,
    and constructor shorthand in the user guide.

m2-ls 2.5.1

Choose a tag to compare

@AlexanderGolys AlexanderGolys released this 05 Nov 20:12
  • Add simplification hints and code actions for early-return null guards,
    mapped function compositions, strict comparisons of Boolean values with
    true or false, forwarding callbacks, and fixed-first-argument partial
    applications. Keep rewrites available as refactors when their hints
    are suppressed, and preserve expression grouping.
  • Give each expression rewrite its own lint name and code. S05 now identifies
    unnecessary-null-branch; use the individual S11–S18 selectors instead of
    the former simplifiable-expression selector for other simplifications.
  • Add E21 float-key, S08 naming-convention, S09 bound-option-key, and
    S10 constructor-typical-value. Exempt function parameters from naming
    checks so type arguments such as T remain valid.
  • Check option names and unbound symbolic values in declarations and calls;
    keep bound default values and ordinary hash-table entries outside these
    naming checks.
  • Refine semantic highlighting for embedded documentation and class roles,
    document custom-token fallbacks, and refresh semantic tokens after loaded
    dependencies are indexed.
  • Expand the user guide with lint examples, simplification requirements, and
    the distinction between formatting and expression rewrites.