BoxLang 🚀 A New JVM Dynamic Language Learn More...
This is a BoxLang module that implements Microsoft's Language Server Protocol. You most likely will not want to install this module directly. This modules is used by IDE's that also implement the LSP in order to provide a rich editing experience.
Check out the official BoxLang VSCode extension for more information and an example of this project being used.
BoxLang is a professional open-source project and it is completely funded by the community and Ortus Solutions, Corp. Ortus Patreons get many benefits like a cfcasts account, a FORGEBOX Pro account and so much more. If you are interested in becoming a sponsor, please visit our patronage page: https://patreon.com/ortussolutions
Add a .boxlang-lsp.json file at the workspace root to
control lint diagnostics:
Key capabilities:
include
/ exclude glob arrays.{
// Optional: restrict analysis scope (workspace‑relative globs)
"include": [ "src/**" ],
"exclude": [ "src/generated/**", "**/vendor/**" ],
// Rule customization
"diagnostics": {
"unscopedVariable": {
"enabled": true,
"severity": "warning"
},
"unusedVariable": {
"enabled": true,
"severity": "hint"
}
}
}
* (segment wildcard),
** (recursive), ? (single char).include empty or omitted => all files implicitly included.include (if provided)
AND must not match any exclude.Examples:
// Analyze only application code, skip tests and generated sources
{
"include": [ "app/**" ],
"exclude": [ "app/generated/**", "app/**/test-fixtures/**" ],
"diagnostics": { "unusedVariable": { "severity": "information" } }
}
// Disable a rule entirely while experimenting
{
"diagnostics": { "unscopedVariable": { "enabled": false } }
}
// Tighten severity
{
"diagnostics": { "unusedVariable": { "severity": "error" } }
}
| Field | Type | Default | Notes |
|---|---|---|---|
| enabled | boolean | true | Turns rule on/off |
| severity | string | rule default | One of error
warning
information
hint
|
| params | object | {} | Reserved for future per‑rule options |
unscopedVariable – Flags variable references lacking an
explicit scope.unusedVariable – Flags declared but unused local variables.More rules are planned; configuration format is forward‑compatible.
.boxlang-lsp.json using both LSP
file events (if supported) and a fallback filesystem watcher.| Symptom | Possible Cause | Action |
|---|---|---|
| Config edits ignored | File not at workspace root | Move .boxlang-lsp.json to root folder
recognized by client |
| Rules not disabling | Rule id typo | Check the rule name (see list above) |
| Paths not filtered | Globs mismatched OS separators | Always use forward slashes /
|
{ "diagnostics": { "unscopedVariable": { "severity": "warning" } } }
{
"include": [ "src/**", "scripts/**" ],
"exclude": [ "src/generated/**", "scripts/archive/**" ],
"diagnostics": {
"unscopedVariable": { "enabled": true, "severity": "warning" },
"unusedVariable": { "enabled": true, "severity": "hint" }
}
}
Future roadmap items: rule parameterization (params),
suppressions via inline comments, per‑folder overrides.
"I am the way, and the truth, and the life; no one comes to the Father, but by me (JESUS)" Jn 14:1-12
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
$
box install bx-lsp