Repository navigation
Releases
m2-ls 2.11.0
- 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
-
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 unlesslines.breaksasks 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
formattingsettings are grouped intoindent,lines,layout,
spacingandcomments, each key one fixed rule, with the built-in
presetsprofile = "core"and"modern". Every flat key of 2.9
still loads as its replacement, with a deprecation warning;
compactFactorOperatorsis reported as removed. Formatting no longer
follows the editor'stabSizeandinsertSpaces. -
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 themnew M from (f)followed by\ Lon 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,ooooandoNare typed asCore.m2rotates them: muted
inputs count, each;-ended statement is its own numbered input, anull
value binds nooNand only shiftsoooandoooo, 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 theexportcreates, such as an option name. E22 and S31 no
longer flag them there. -
S31 counts an earlier
export {"Name"}as introducingName. -
Add the
booleansemantic token type fortrue,falseand other
Booleanvalues (variableunderstandardOnly), so booleans keep their
colour inside TEST blocks. -
Highlighting a function's exits, from its
->or areturn, also lights
up the values its body ends with: each branch of a finalif, each
outcome of a finaltry. -
ideal,monomialIdeal,matrix,module,ring,monoid,net,
vectorandcomplexare typed as making the type they are named after, whatever
their argument:ideal R_*is anIdeal, so(ideal R_*)^3is one and
R/(ideal R_*)^3aQuotientRing. Before, an argument of unknown type
left themThing. -
S19, S20 and S21 no longer offer
T X := ffornew T from X := f,
which installs a different method. -
Remove S14 (
forwarding-lambda): replacingc -> f cwithflooksf
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 asideal(LieAlgebra)orPermutation ^ ZZ, no longer
widens results in a file that does not load the package.
m2-ls 2.9.0
- Add inline refactors: Inline "f.m2" replaces a top-level
loadwith
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
- References and rename include documentation code:
Usagelines, and the
Examplecode 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
- Add code lenses for the runtime commands: ▶ Run file on every file and
▶ Run tests on thenewPackageline of packages registering TESTs,
shown only when an M2 executable is found. The commands now findM2on
PATHthe 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, E25package-rebinding, E26
library-global-value, T07call-arity-mismatch, and S32
error-catching-rewrite(behinddiagnostics.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 := …andT ^~ := …, 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
stringorcomment, and everything inside documentation, embedded code
included, carriesdocumentation. String keys are properties: the key an
entry writes,{"name" => v}, carriesdeclaration;h#"name"reads it.
String option names are recorded, sof(x, "Eps" => 2)is an option of
method(Options => {"Eps" => 1}). - Formatting gains
formatting.indentand operator and bracket spacing
settings;logging.levelcontrols 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
- 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, S28composed-lambda, S29
prefer-for-loop, and S30redundant-for-start. Remove repeated codomain
annotations, replace unary forwarding lambdas with composition, and omit
from 0through quick fixes; countedwhileloops 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 explicitundocumentedexemption. - 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
docstoken for documentation prose and addlibraryConst
andlibraryConfigParammodifiers. 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
- Show computed values as inline values: exact
ZZ/QQarithmetic,
comparisons and logic,numgens/dim/charof polynomial rings over
ZZ,QQ,ZZ/pandGF 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 followuse Rrebinding the names
ofR's variables in source order. - Add E23
matrix-shape-mismatchand E24division-by-zeroerrors, the S22
predicate-typical-valuewarning, and S23predicate-function-closure,
S24inline-null-binding, S25prefer-augmented-assignmentand S26
constant-conditionhints; 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, asZZ + QQ := …. - Accept
returninside loop bodies,ifandtryat 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,structureand
spacekind modifiers and thedocumentTagmodifier. Codomain annotations
aredecorators and interpreter tables arestructs. Rename theaccess
andmathmodifiers tomemberAccessandtex, splitlinkintourl,
file,directoryandwikilink, and addinjectedCodeand
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,
TO2link text and example option names more
precisely, and report unresolved documentation references as D05 errors in
any file.
m2-ls 2.6.1
- Refuse to index a repository root holding more than 100,000 entries,
logging the refusal instead of scanning it.m2-linttreated the nearest
ancestor with a.gitas the repository, so a.gitin 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
- 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-valueerrors 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.tomland workspace-rootM2LS.toml, with explicit
editor settings taking precedence. Reload watched configuration files and
support the Windows user profile without requiringHOME. Standalone tools
discover the nearest project configuration and accept--configoverrides. - Add independent S19
self-initializing-constructor, S20header-constructor,
and S21wrapper-constructorhints and code actions fornew 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 runtimecurrentPackagebinding 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
- Add simplification hints and code actions for early-return null guards,
mapped function compositions, strict comparisons of Boolean values with
trueorfalse, 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 formersimplifiable-expressionselector for other simplifications. - Add E21
float-key, S08naming-convention, S09bound-option-key, and
S10constructor-typical-value. Exempt function parameters from naming
checks so type arguments such asTremain 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.