Added
-
Flush-left block recovery: a block typed without indentation (e.g.
interface X
followed byspanning-tree bpdufilterat column 0) is now detected by the linter and fixed
by the formatter — each un-indented child gets a warning and is indented to the file's own
indent width (falling back to IOS-native 1 space). A line is only treated as a child when
the command is documented for that block's mode in the loaded command data; unknown or
global commands end the block and are left alone, so back-to-back blocks without!
separators are never mis-indented. Covers a broadened opener set:interface,router,
line,class-map,policy-map,vrf definition,vlan <n>,
flow record/exporter/monitor,service-template,template,route-map,
ip/ipv6 access-list,aaa group server,key chain,radius/tacacs server,
device-tracking policy,crypto map. -
Auto-indent on Enter (experimental, off by default) after any of the block openers
above, with 1-space indentation contributed as the[cisco]editor default
(editor.insertSpaces/editor.tabSize). Enable with the
cisco-ios-lsp.experimental.autoIndentsetting; takes effect immediately when toggled. -
Completions: the new block openers are recognised as contexts too (e.g. commands documented
for VRF or VLAN configuration mode are offered insidevrf definition/vlanblocks); a
recognised block whose bucket holds no commands falls back to the top-level list. -
Go to definition / find references / rename (F12 / Shift+F12 / F2) for named objects:
class-maps, policy-maps, named + numbered ACLs, route-maps, prefix-lists, and VRFs, linking
each definition to the places it is applied (service-policy,access-group,
access-class,match ...,vrf forwarding,address-family ... vrf, ...). -
Cross-reference diagnostics: referencing an object that is never defined in the file
warns; defining one that is never referenced shows a hint. -
Folding ranges for every indented config block, spanning
!separators. -
Format on save for the indentation fixes, now driven by VS Code's own
editor.formatOnSave(contributed as a[cisco]language default). -
Completions now work after a leading
no, and accepting a multiword command replaces the
full typed prefix (no moreip ip addressafter typingip addr). -
Unit tests (
npm test, node:test) covering the indentation scanner/formatter round-trip,
block detection, diagnostic positions, data loading, xref index, and document symbols; run
in CI and on packaging. -
Three new command-reference packs:
cat9500-17.18(1,312 commands, IOS XE 17.18.x),
cat9500-26.x(1,227 commands, IOS XE 26.x.x), andcat2960x-15.2.6(435 commands,
Catalyst 2960-X, classic IOS 15.2(6)E) — extracted from Cisco Command Reference PDFs via
npm run extract-commands.
Changed
- Faster startup and typing: client and server are bundled with esbuild into single
dist/files, the command data ships as one merged JSON parsed lazily right after the LSP
handshake, per-block completion lists are precomputed once, and the document's split lines
are cached per version instead of re-split on every keystroke/hover. - The outline is now served by the language server (
textDocument/documentSymbol); symbols
span their whole block, so breadcrumbs and sticky scroll track the enclosing block.
Existingcisco-ios-lsp.outline.*settings keep working; same-category blocks now merge
into one outline group, and class-map labels drop thematch-any/match-allprefix. - Diagnostics precision: every out-of-range VLAN / malformed IPv4 on a line is flagged at its
own position (previously only the first, sometimes at the wrong column); a corrupt command
data file is skipped with a logged error instead of crashing the server. server.jssplit into testableserver/lib/modules; ESLint upgraded to v10 flat config._testing/(real production config backups used as diagnostic ground truth) is no longer
git-versioned — gitignored and untracked, including its existing history.
Removed
- The
cisco-ios-lsp.format.onSavesetting — use the standard per-language
editor.formatOnSave(enabled forciscofiles by default) instead.
Fixed
- Banner bodies and certificate payloads are now treated as free text: everything
between a banner's delimiters (banner login ^C ... ^C,banner motd #...#, including
one-liners) and the hex dump betweencertificate ...andquitin a
crypto pki certificate chainblock is skipped by all line scanners — no more
"Unknown command" / indentation warnings on ASCII-art banner lines, the formatter never
re-indents that content, it can't create false cross-references, and it no longer
produces folding ranges. - Reconciled against a production Catalyst 9500 SD-Access config (
_testing/test.cisco):LISP0[.n]andBluetooth0/4are recognised interface types.- ~140 curated command entries for families the Cat9500 Command Reference PDF doesn't
cover:call-home,control-plane,netconf-yang, model-driventelemetry
subscriptions/receivers/transforms,transceiver type,crypto pki
trustpoints/certificate chains, RADIUS CoA (aaa server radius dynamic-author),
vrf definition/rd,router lisp(locator-sets, eid-tables, sites, services),
IS-IS router and interface commands, con/aux line commands, and assorted globals
(clock,ntp,snmp-server,ip ssh/http/pim/msdp, ...). - New block buckets (openers + mode classification + auto-indent + completions):
call-home,control-plane,crypto pki trustpoint,crypto pki certificate chain, the threetelemetrymodes,transceiver type, and RADIUS dynamic-author. - Cross-reference fixes: a LISP
prefix-list NAMEblock opener counts as the
prefix-list's definition, and inntp access-group peer ACLthe keywordpeeris no
longer mistaken for the ACL name (the ACL itself is now the reference).
scripts/extract-commands.js: the TOC running-header noise filter only matched the IOS-XE
Command Reference, Cisco IOS XEwording. Classic-IOS "Consolidated Platform Command
Reference" manuals (e.g. the new 2960-X pack) repeatCommand Reference, Cisco IOS Releaseinstead, so those header lines leaked through and corrupted 13 TOC entries by
gluing onto the next command name. BroadenedNOISE_REto match the shared prefix.
Full Changelog: v0.5.0...v0.5.1