For active known issues and planned work, see BACKLOG.md.
- Improved the VSCode setup walkthrough with concrete RouterOS REST setup, limited-user guidance, settings, connection testing, and VSCode Web notes
- Added practical VSCode Web CORS proxy guidance with Caddy and nginx examples
- Clarified README release-note vs active-development links
- Cleaned up stale documentation and agent instructions so release contexts, lint tooling, NeoVim support, and test layout point at the current source of truth
- RouterOS semantic token color overrides now apply automatically at extension startup
- Added settings to control startup behavior:
routeroslsp.semanticColors.autoApply(default:true)routeroslsp.semanticColors.enableOverrideRules(default:true)
- Semantic token mapping now uses token modifiers for RouterOS states (inactive, obsolete, undefined, ambiguous, legacy, error) to improve default theme fallback behavior
- GitHub Copilot is now automatically enabled for RouterOS files — no manual
github.copilot.enablesetting needed - GitHub Copilot CLI is now supported as an LSP client — use
.github/lsp.jsonor~/.copilot/lsp-config.jsonwithinitializationOptions.routeroslspto pass RouterOS credentials; see README for config example - RouterOS LSP now applies settings from
initializationOptionson startup, enabling credential configuration for any LSP client that doesn't supportworkspace/configuration(Copilot CLI, Helix, etc.) - Added
routeroslsp.server.router.validateScriptandrouteroslsp.server.router.executeScriptcommands for clients that need explicit RouterOS script validation or execution with per-call credentials - Moved tests and tooling scripts out of runtime source folders so
server/src/andclient/src/contain only code shipped with the LSP
- Fixed standalone/npm stdio startup so NeoVim, Copilot CLI, and other stdio LSP clients no longer receive non-LSP log text before the
initializeresponse - Fixed semantic token document selector globs for file-based
.rsc,.tikbook, and.md.rscdocuments - Added semantic handling for RouterOS highlight tokens like
arg-scope,arg-dot, andpathso semantic token generation no longer drops them - Semantic token generation now skips unknown token types safely instead of emitting invalid indexes
- Improved NeoVim support (
nvim-routeros-lsp-init.luarewritten):- Semantic tokens now refresh while typing (debounced 400 ms)
- Lazy.nvim deferred loading works correctly — LSP attaches to already-open
.rscbuffers - Lua module path changed to
~/.config/nvim/lua/routeroslsp.lua
- npm package now includes shebang — fixes execution under package managers that symlink bins directly
- Reduced VSIX package size — excluded dev/AI/build files that were leaking into the extension package
- CI now supports both stable release and pre-release publishing via workflow dispatch
- VS Code pre-release convention adopted: odd minor versions (0.7.x) are pre-releases
- Web extension properly terminates its Worker on deactivate — no more orphaned processes
- Watchdog cleans up all event listeners on dispose — fixes subscription leaks
- Fixed watchdog crash when RouterOS connection returns undefined identity
- Fixed HTTP error logging crash on circular error objects (e.g. Axios errors)
- Fixed watchdog timer incompatibility with Web Worker context
- Refactored
controller.ts— LSP handlers converted from curried arrow functions to private class methods; dead code removed (inlay hint stubs, unused getters, stale TODOs) - Refactored
routeros.ts— normalized error handling intoRouterOSClientErrorinterface; consolidated to single HTTP client instance - Code cleanup: typo fixes, strict equality, type annotations, lint config corrections across server and client
Promoted v0.5.4 from a pre-release.
- Significant updates to README.md
- Updated package dependencies to latest, like Axios, based on audit
- Use
bunin GitHub Action for install
- Settings now use "application" scope (i.e. user)
- VS Code for Web support verified in 0.5.3 (previously failed 0.5.2). CORS proxy still required to use VSCode Web
- Improvement in watchdog/notifications (still "raw"/unfriendly error messages)
- Clear client credential support for TikBook
- Added new setting to allow self-signed certificates. On VS Code, also requires
http.proxySupportbe set tofallback. - Added "New RouterOS Script" as option in VS Code's "New File..." menu
- Set default for
.rscto be spaces for indentation with tabstop of 4 - New LSP commands to get the connection URL (without password) and "using client credentials" status for display/use by clients
- Redact passwords introduced by exception from HTTP client library (axios-http) GH issue #3
- Logging cleanup, minor re-arrangement of commands handlers
- Update several dependencies to resolve
npm auditissues - Refactor settings on LSP server, use LSP client as primary connection tester
- Minor code cleanup on LSP client (extension)
- Wait for start() on client before subscribing
- Add small delay (1s) to initial RouterOS connection test to allow "warmup" after started event. Avoids error notification when extension is reloaded (i.e. upgrade)
- Housekeeping: typos,
clocto build
- Relaxed VS Code minimum version requirements accidentally increased in LSP v0.5.1 that required the very latest stable version. Versions as old as 1.78 (April 2023) should work fine (and was used previously). However, only version 1.101 (May 2025) has been tested and thus recommended to use the latest version of VS Code.
- Change
engineforvscodeto use^1.78.2instead of^1.101inpackage.json - Small fix in log message with an
undefinedinstead ofusername
- Watchdog refinements to cleanup UI
- removed "withProgress" style notification, too confusing
- add clear buttons on error state, including "Retry"
- VS Code for Web, one theory on "hang" in 0.5.1 is watchdog use of
window.withProgress, as behind the scene it both new in LSP spec and mixed used of Promise andawait. Removing the notification with progress bar also cleans up UI.
- New "Watchdog" module to test LSP connection. A notification will appear with results, including an error code when run in all cases. Watchdog currently only runs:
- on first loading of RouterOS LSP (i.e. when opening an
.rscfile open after VS Code was started) - via new "Test RouterOS Connection" anytime using VS Code Command Pallette (F1 or ⌘+Shift+P)
- when VS Code configuration ("Settings") change for LSP change
- on first loading of RouterOS LSP (i.e. when opening an
- Add command support (
workspace/executeCommand) to LSP, including new commands:- Test Connection to RouterOS - verifies LSP has working connection to RouterOS
- Refresh Semantic Tokens - forces re-calculation of color for open docs in editor
- [VS Code] Show Logs (Output) - shows VS Code "Output" window, with "RouterOS LSP" selected
- [VS Code] Show Settings - shows RouterOS LSP settings, including RouterOS credentials
- [VS Code] Apply Semantic Colors Overrides to Settings - if applied, allows manual tweaking of colors in "Settings (JSON)"
- [Internal] Use Client Credentials - used by TikBook to "override" LSP settings and use it's credentials
- [VSCode] commands above are run by LSP Server, but added to the "Command Palette" by this extension LSP client part, to provide quick access to the configuration and troubleshooting tools
- Added
[as a triggering character for completion - Support for TikBook notebook format types as documents, and various other tweak to align language detection
- Use MikroTik logo for
.rsc(or other files withlanguageIdofrouteros), instead of RouterOS LSP icon - VSCode for Web should work but cannot be E2E tested without publication of build, so at this point unknown if something broke in recent refactoring.
- Significant refactoring, including more modularization and standardized eslint+stylistic code formatting applied.
- Cleanup of LSP document handling, including better caching logic, including more focused cache invalidation
- Improved logging: better consistency, content with more curated data, normalized levels used, etc
- Update VS Code engine to 1.101, along with minor updates to various node dependencies
- REST API client support running request with interceptors (to allow capturing raw exception, which is used by Test Connection command)
- Improved settings management internally, allow using updated settings without restart
0.4.x was skipped, reserving even number major or minor semver for VS Code builds without
--pre-release
- Add initial "Document Symbol" support - currently
:localand:global. This is shown in the "outline" view in Explorer's expandable section near bottom. - "Completion" now uses text help from
/console/inspect(if RouterOS provides one) and icons based on type of completion. - Problems now includes warning - since often only the first error is found by
/console/inspect - VSCode Only Code folding now using VSCode's default folding mechanism which seems to better capture various blocks - but no changes to LSP to provide "code folding".
user-settings.jsonis now where the default configuration (and non-VSCode editors) is stored, previouslydefault-configuration.json.
- Significant refactor into separate files/classes. More work to do to better separate REST from LSP client requests to avoid extra calls. Some "queue" is likely needed to avoid "race conditions" (in the sense editors current text got older LSP data since more recent requests took longer)
- In VSCode client language extension, remove "folding" subsection from
language-configuration.jsonfrom borrowed devMike.mikrotik-routeros-script extension — the force VSCode to use it's defaults which produces better results for allowing collapsing code blocks ("folding"). webpacknow uses "browser" inmainFields- perhaps that fix previous problems- removed extraneous node imports used by
webpack
Update VSCode for Web was tested and worked in 0.3.14, with CORS Proxy, after publication.
- More tweaks for vscode.dev/github.dev
webpacknow uses "browser" inmainFields- perhaps that fix previous problems- removed extraneous node imports used by
webpack
- VSCode for Web did not work, see fixes. CORS errors – from VSCode, not RouterOS – and crashes when starting
server.web.jsfrom extension.
- web only: Extension used wrong id and name after refactor, fixed by uses
package.jsonto pullconfig.shortid(sincenamewas not right in context) - web only: Path used
./in pathserver.js, Not sure this full fix, but matches sample code.
- VSCode for Web should work with LSP E2E test
- Refactored common code between "node"/desktop and "web" into
client.ts(extension) andshared.ts(server) – theextension[-web].tsare now minimal stubs (since only startup is really different between node and web, at least from code POV) - Debug fully setup: configuration support both web and node, plus
bun run's to supportvscode-test(which is hosted extension mode) andnpx serve(which can be used to load local code into vscode.dev/github.dev using "Install extension from Location" using https://localhost:7474) - Add
default-configuration.jsonto externalize the default settings if LSP client does not support configuration (may just load frompackage.jsoninstead in future) - polyfills for Axios added to
webpackweb build which would be handled automatically in modern tools, but VSCode Web requires older packaging mechanism for LSP server.
Internal test only - same changes from 0.3.10
- Should work same as previous – for desktop
- More work is required to enable VSCode for Web - currently first build to see if the LSP test that the LSP does not crash using sample code.
- Fix
vscode-languageclientNPM library to use 9.x not 8.x which [hopefully] is why previous attempts in web did not work - Revamp build system more exactly model MS's samples for a "web LSP extension", including using
webpackto build for VSCode for Web (bunstill used for node/"exe")How LSPs function is VSCode for web it complex. First, the IPC is JavaScript message to a JS
Worker(). Second, VSCode Web wants CommonJS - while the world has moved on to ESM modules. Understanding that took a minute, with clue in the MS sample for a "web LSP" – they usewebpackto transpile theserver.tsinto a old-school variable – something that is not supported by any modern JS/TS tooling and not documented anywhere than the sample usingwebpage. - Other file cleanup to support web/node builds.
- Further changes to support VSCode for Web, at least LSP loads in
code serve-web(with a CORS proxy)
- Changed all imports to use ESM ("esnext") - still uses CommonJS for desktop for build, but web is "pure" ESM
- Broke startup code in
-webversions since need slightly different import's
Internal test only - same changes from 0.3.10
- removed "RouterOS Theme" since it prompt when installed, and theme was not useful
- added logging to client to debug in vscode for web
- remove them "contributes" for theme, theme file still used to "store" semantic token colors that extension code then applies outside theme
- Support loading in VSCode for Web for testing
RouterOS does not support CORS so browser support only work with a CORS proxy between web and RouterOS that correctly responds to browser's CORS preflight and provides correct CORS headers.
- Add new build
--target=browsertobunserver and client, andbrowserinpackage.jsonso VSCode for Web uses code compiled for browser - Add
useCredentials: trueto Axios HTTP client calls so the CORS information is provided to any CORS proxy.
- Use icon in VSCode tabs for RouterOS files
- Remove
package-lock.jsonfiles to avoid warning in debug, and not used now that everything is packaged bybun. - Re-test publication from GitHub Action to Open-VSX
- but... should eventually be controllable via
workflow_dispatch
- but... should eventually be controllable via
- Add diagnostic trace setting for protocol message debugging (default is off)
- Apply "semantic token" colors for RouterOS code at startup, based on include RouterOS theme. This allows using any theme to get proper colors.
- Radical reduction of file size of extension 200+M to 200+K (see below)
- Use
bunto package extension's TypeScript, previous builds include node_modules which are more than necessary - may use bun in future for constancy - Cache
/console/inspecthighlights if document has not changed. Helps for hover but more work to optimize calls to REST API. - Code formatting cleanup
Publication test only - same changes from 0.3.6
- Publish on VSCode Marketplace
- Metadata cleanup
- Moved changelog and known issues to
CHANGES.mdand refactoredREADME.md - NeoVim "improvements"
- release download includes nvim-routeros-lsp-init.lua
- proper color support, including on Alpine
- init script cleanup
- "Hotlock" support to autocomplete on
/,,:, and=... [NeoVim only]
- Add
sample.rscto have some "stock script" when developing - Add "hotlock" as configuration setting
- REST failure is now shown as error message, not "informational"
- Updated NeoVim example
init.luaconfiguration to use semantic tokens and other cleanup - Logging cleanup to avoid JSON where possible
- Improvements to performance (see fixes)
- Use implementation to handle "textDocument/semanticTokens/full" to reduce syntax coloring delay and avoid .refresh() everywhere
- Reduced some extraneous REST requests to improve responsiveness, more work to do
- Rename "RouterOS LSP Server" to just "RouterOS LSP" for consistency
- Using "Text" as kind in completions
- Default colors now mostly follow MikroTik CLI colors for syntax
- Semantic tokens use MikroTik "highlights" names to allow one-to-one color matching between RouterOS syntax and editor. Previously mapped to "standard" semantic tokens, which was lossy.
- Add "color theme" to map MikroTik highlights to specific colors for VSCode - which is customizable by the user.
- Show "informational" message on REST API failure (and log too) - although still fatal to LSP operation
- Logging improved to better trace calls. Previously random and too verbose. Perhaps slower (TBD) – since overall more log entires – just less fluff per log.
- Always refresh semantic tokens when a document changes. Previously, was done indirectly and at wrong time.
Ignoring previous 0.1.x versions & skipping 0.2.x since even minor ver is reserved for published builds
- Completion for selection should including request=syntax descriptions
- Potential Fix - use
/console/inspect request=syntaxto get more metadata about
- Potential Fix - use
- File Open and Save Operations
- since we have REST connection loading/saving scripts to "Files", /system/script, etc. is possible
- downside: LSP need "fuller" permissions
- support using "back-to-home-files" since permissions can be control for that
- since we have REST connection loading/saving scripts to "Files", /system/script, etc. is possible
- Run on router (via REST or SSH configurable)
- "Code Folding" - detect scopes since the control local variable visibility, better error detection (since individual scopes can be checked independent of larger script) and potential "shortcut" to optimization calls to /console/inspect
- Note require LSP knowing syntax which has been avoided to date since rules are complex/undocumented
- Support "Signatures" (i.e. like "/ip/route add dst-address=1.1.1.1" within larger text, and perhaps show completions for base part "/ip/route add" etc)
- Support Rename...
- on global variables (easier since they should be, well, global names)
- on local variables (harder since need scoping info, and while one level, not all {} are scopes)
- Only
*.rscfiles will trigger LSP by default. Additional "language detection" is possible to cover cases where file is not a.rscbut contain tell-tail clues that it is RouterOS script or config. For example, the#with software-id etc. in:exportfiles is possible to detect but not implemented today. - Links to documentation in various LSP responses
- Context actions on a selection
- New script from selection (opens new code window with selection)
- show offset and position
- show short highlights (c = cmd, d = dir, G = global, L = local, a = attr, ! = error, ? = obj-inactive)
These go beyond an LSP - which does not use any VSCode-isms but can live in extension part of this code.
- Some "emulation" of hotlock in VSCode
- Commands
- RouterOS LSP: Settings
- RouterOS LSP: Apply RouterOS Colors
- Goto: RouterOS Scripting Documentation
- Control publication via GitHub Action dispatch, currently just publishing if build is successful
- Icon
pngshould be "built" usingsvg- currently manual process