Repository navigation
LSP Commands
clif exposes these commands through workspace/executeCommand. They are advertised in the server's
executeCommandProvider capability, and many are also offered as code actions or code lenses so
editors without a command palette can reach them.
Legacy names. Every command is also accepted under its former
cfmleditor.prefix (cfmleditor.reindexrunsclif.reindex). Onlyclif.*names are advertised.
Results and messages. Most commands return a value and report through
window/showMessage, because some clients (Zed) ignore command results. Long-running commands return immediately and report completion with a message.
| Command | Arguments | Returns |
|---|---|---|
clif.reindex |
— | null |
clif.restartDaemon |
— | null |
clif.format |
uri |
null (applies an edit) |
clif.showComponentPath |
dotPath, uri?
|
resolved file path (string) |
clif.copyPackage |
uri |
dot-path (string) |
clif.showResolvers |
— | text (string) |
clif.showFileIndex |
uri |
text (string) |
clif.showConnections |
— | text (string) |
clif.openActiveApplicationFile |
uri |
URI of Application.cfc/.cfm
|
clif.goToMatchingTag |
uri, line, character
|
{line, character} |
clif.findRefs |
name, uri?, export?
|
summary (string) |
clif.exportDeps |
uri, function?
|
Mermaid (string) |
clif.explainCall |
uri, line, filter?
|
explanation (string) |
clif.resolveRoute |
route |
{route, targets[], reason?} |
clif.generateCodeMap |
options? |
{path, started} |
clif.showCodeMapStats |
options? |
{nodes, edges, stats, resolvedPercent, routesPercent} |
clif.exportUnresolved |
— | {paths, started} |
clif.exportLint (alias clif.exportCFLint) |
— | {paths, started} |
clif.scanWorkspace |
out? |
null |
clif.searchDocs |
query?, kind?, limit?
|
[{name, type, description, syntax}] |
clif.docEntry |
name, kind?
|
{name, type, description, syntax, member, script, returns, markdown, params} |
Positions are LSP positions: 0-based lines, characters in UTF-16 code units. uri is a document URI
(file:///…). Paths, counts and timings in the example responses below are illustrative; the shapes and
message formats are the server's.
Invalidates resolution caches and re-indexes the workspace in the background. Use it after large changes
made outside the editor, or when features.watchedFiles is off.
{ "command": "clif.reindex", "arguments": [] }Clears all caches (parse results, function ranges, component cache, application mappings) and re-indexes. Shows "Restarting daemon: clearing all caches and re-indexing".
{ "command": "clif.restartDaemon", "arguments": [] }Formats an open document and applies the result through workspace/applyEdit (label
"Format document"). Does nothing when formatting.enabled is false.
| # | Argument | Type | Required |
|---|---|---|---|
| 0 | uri |
string | Yes |
{ "command": "clif.format", "arguments": ["file:///home/me/app/handlers/Main.cfc"] }Errors: clif.format requires a document URI argument; clif.format: <uri> is not an open document.
Resolves a component dot-path to a file, relative to a document's directory (or the first workspace root).
| # | Argument | Type | Required |
|---|---|---|---|
| 0 | dotPath |
string | Yes |
| 1 | uri |
string | No: the document whose directory relative paths resolve from |
{ "command": "clif.showComponentPath", "arguments": ["models.User", "file:///home/me/app/handlers/Main.cfc"] }"/home/me/app/models/User.cfc"Message: models.User → /home/me/app/models/User.cfc, or Cannot resolve: models.User (returns "").
Returns the dot-path of a file, for copying into code.
{ "command": "clif.copyPackage", "arguments": ["file:///home/me/app/models/User.cfc"] }"models.User"Finds the Application.cfc (or Application.cfm) governing a document and asks the client to open it
(window/showDocument, takeFocus: true).
{ "command": "clif.openActiveApplicationFile", "arguments": ["file:///home/me/app/views/main/index.cfm"] }"file:///home/me/app/Application.cfc"Message when none is found: No Application.cfc found.
Returns the position of the tag matching the one at the cursor (opening ↔ closing).
| # | Argument | Type | Required |
|---|---|---|---|
| 0 | uri |
string | Yes (must be open) |
| 1 | line |
number (0-based) | Yes |
| 2 | character |
number (UTF-16) | Yes |
{ "command": "clif.goToMatchingTag", "arguments": ["file:///home/me/app/index.cfm", 10, 4] }{ "line": 24, "character": 4 }Returns null when the cursor is not on a tag with a match.
Lists workspace folders, mappings, component resolvers and property resolvers in effect.
{ "command": "clif.showResolvers", "arguments": [] }Workspace folders: [/home/me/app]
Mappings:
models → /home/me/app/src/models
Component resolvers:
match="getService(\"$1\")" resolve="packages.$1.service" prefix="getService"
Lists what the index holds for one file: its functions and component references.
{ "command": "clif.showFileIndex", "arguments": ["file:///home/me/app/handlers/Main.cfc"] }File: file:///home/me/app/handlers/Main.cfc
Functions (2):
index (line 5)
save (line 18)
Component refs (1):
userService → models.UserService (line 3)
{ "command": "clif.showConnections", "arguments": [] }Open documents: 3
Workspace folders: 1
Index globs: 0
The server's form of clif explain: traces every call site on a line using
the session's own resolver and index. Offered as the code action "Explain call resolution on line N".
| # | Argument | Type | Required |
|---|---|---|---|
| 0 | uri |
string | Yes (need not be open) |
| 1 | line |
number, 0-based | Yes |
| 2 | filter |
string | No: keep calls whose name or receiver contains it |
{ "command": "clif.explainCall", "arguments": ["file:///home/me/app/handlers/Main.cfc", 103, "createTemplate"] }Returns the explanation text; with no calls, No call sites on <file>:<line> (1-based in the message).
Scans every CFML file for parse errors in the background and reports the result. Offered as the code action "Scan workspace for parse errors".
| # | Argument | Type | Required |
|---|---|---|---|
| 0 | out |
string, or { "out": string }
|
No: write the report to this file |
{ "command": "clif.scanWorkspace", "arguments": [{ "out": "parse-errors.md" }] }Finds references to a function across the workspace (the same search as clif refs).
Used by the "Find all references to …" / "Find all calls to …" code actions and the usage code lens.
| # | Argument | Type | Required |
|---|---|---|---|
| 0 | name |
string | Yes: the function name |
| 1 | uri |
string | No: the declaring document, to scope the search |
| 2 | export |
boolean | No: also write refs-<name>.md (summary + Mermaid) and refs-<name>.dot beside the document |
{ "command": "clif.findRefs", "arguments": ["getReport", "file:///home/me/app/services/Report.cfc", true] }Returns the summary text. With export, shows Wrote /home/me/app/services/refs-getReport.md.
Builds the dependency graph of a document (or of one function in it), as clif deps
does, writes deps-<name>.md (Mermaid) and deps-<name>.dot beside the file, and returns the Mermaid text.
| # | Argument | Type | Required |
|---|---|---|---|
| 0 | uri |
string | Yes |
| 1 | function |
string | No: limit to this function; names the output deps-<function>.md
|
{ "command": "clif.exportDeps", "arguments": ["file:///home/me/app/handlers/Orders.cfc", "checkout"] }graph LR
...
Resolves a framework route through the workspace's routes configuration, using the
same code as go-to-definition.
| # | Argument | Type | Required |
|---|---|---|---|
| 0 | route |
string | Yes |
{ "command": "clif.resolveRoute", "arguments": ["admin.users.edit"] }{
"route": "admin.users.edit",
"targets": [
{
"kind": "controller",
"uri": "file:///home/me/app/controllers/admin/users.cfc",
"path": "/home/me/app/controllers/admin/users.cfc",
"component": "controllers.admin.users",
"method": "edit",
"range": { "start": { "line": 41, "character": 4 }, "end": { "line": 41, "character": 8 } }
},
{
"kind": "view",
"uri": "file:///home/me/app/views/admin/users/edit.cfm",
"path": "/home/me/app/views/admin/users/edit.cfm"
}
]
}| Field | Description |
|---|---|
targets[].kind |
controller or view
|
targets[].uri, path
|
The file |
targets[].component, method
|
For controllers |
targets[].range |
The method's declaration, so the client can reveal it |
targets[].via |
The alias that produced this target, when one did |
reason |
Present with empty targets: no routes convention is configured for this workspace or not shaped like a route
|
Builds a code map from the running server's index and writes it in the background. Every field of the options object is optional; the command works with no arguments.
| Option | Type | Default | Description |
|---|---|---|---|
level |
string | function |
function, call, file, package
|
format |
string | html |
html, json, dot, mermaid, text
|
out |
string |
.clif/codemap.<ext> beside the config |
Output path; relative paths resolve against the workspace root. Never written outside the workspace |
under |
string | — | Scope to a path prefix (keeping boundary nodes) |
from |
string[] | — | Keep only what these node ids reach |
live |
boolean | false |
Keep only what an entry point reaches |
detached |
boolean | false |
Keep only what no entry point reaches |
open |
boolean | false |
Ask the client to open the report when written |
The codemap config block supplies entry and utility globs.
{
"command": "clif.generateCodeMap",
"arguments": [{ "level": "call", "format": "html", "out": "reports/map.html", "under": "packages/tass", "live": true, "open": true }]
}{ "path": "/home/me/app/reports/map.html", "started": true }Messages: Building code map…, then Code map: 61234 nodes, 104876 edges in 6.2s → /home/me/app/reports/map.html.
Builds the same map without writing it and reports how much of the workspace resolves. Accepts the same options object.
{ "command": "clif.showCodeMapStats", "arguments": [] }{
"nodes": 61234,
"edges": 104876,
"stats": { "...": "..." },
"resolvedPercent": 71.4,
"routesPercent": 88.0
}Message: 61234 nodes, 104876 edges · 71.4% of 107683 calls resolved · 88.0% of 912 routes · 418 detached.
Scans every workspace folder and writes the unresolved calls report to
each knownIssues file with "generate": "unresolved" (default .clif-unresolved.txt beside
.clif.json), then republishes the entries. Code action: "Export unresolved calls report for the
workspace".
{ "command": "clif.exportUnresolved", "arguments": [] }{ "paths": ["/home/me/app/.clif-unresolved.txt"], "started": true }Message on completion: The unresolved report: /home/me/app/.clif-unresolved.txt (214) in 3.1s.
The same for CFLint ("generate": "lint", default .clif-cflint.txt), covering the folders open in the
editor. clif.exportCFLint is an alias. Code action: "Export lint report for the workspace".
| Error | Cause |
|---|---|
a lint export is already running |
One export of a kind at a time |
The lint report was not written: … |
The report's directory holds more than the open folders, or a target lies outside the workspace |
Searches the embedded CFML tag and function documentation, so an editor can offer a docs browser without shipping its own copy.
| # | Argument | Type | Default | Description |
|---|---|---|---|---|
| 0 | query |
string | "" |
Text to find; empty lists everything by name |
| 1 | kind |
string | all |
tag, function or all
|
| 2 | limit |
number | 50 |
Maximum entries |
Ranking: exact name, then name prefix, then name substring, then description substring; ties by name.
{ "command": "clif.searchDocs", "arguments": ["arraym", "function", 5] }[
{ "name": "arrayMap", "type": "function", "description": "Iterates over every entry of the array and calls the closure function to work on the element of the array.", "syntax": "arrayMap(array, callback)" }
]The full documentation of one tag or function, as hover shows it.
| # | Argument | Type | Description |
|---|---|---|---|
| 0 | name |
string | Required |
| 1 | kind |
string |
tag, function or all (default: tag first, then function) |
{ "command": "clif.docEntry", "arguments": ["cfquery", "tag"] }| Field | Description |
|---|---|
name, type, description, syntax
|
As in searchDocs (description is the first line) |
member |
Member-function form, e.g. someArray.map(callback)
|
script |
CFScript form of a tag |
returns |
Return type |
markdown |
The complete hover documentation |
params |
Parameters / attributes |
Returns null when there is no such entry.
| Offered as | Runs |
|---|---|
| "Explain call resolution on line N" | clif.explainCall |
| "Find all references to name" / "Find all calls to name" | clif.findRefs |
| "Export references to name to a file" |
clif.findRefs with export: true
|
| "Export dependency graph for name" | clif.exportDeps |
| "Scan workspace for parse errors" | clif.scanWorkspace |
| "Export unresolved calls report for the workspace" | clif.exportUnresolved |
| "Export lint report for the workspace" | clif.exportLint |
| Usage-count code lens above a function | clif.findRefs |