Feature APIs¶
This page documents the public APIs for optional editor features.
Major mode feature¶
Public symbols from loom/feature/mode.
major-mode-known-p¶
Return true when a mode name is registered.
major-mode-from-name¶
Return the registered mode's canonical keyword, or nil for an unknown name.
major-mode-name¶
Return a major mode's display name.
major-mode-comment-prefix¶
Return the comment prefix used by a major mode.
major-mode-indentation-width¶
Return a major mode's indentation width.
major-mode-language-id¶
Return the language identifier associated with a major mode.
major-mode-keywords¶
Return the syntax keyword table for a major mode.
major-mode-truncate-lines-p¶
Return true when a mode displays long lines truncated rather than wrapped. Code
modes truncate; markdown, org, and text wrap. A mode that declares nothing
truncates.
buffer-truncate-lines-p¶
Return true when a buffer's long lines should be truncated. Only a buffer whose
loom:buffer-truncate-lines is :default consults its major mode.
major-mode-parent¶
Return a mode's parent mode, or nil for an unknown mode. Built-in and
extension-defined modes without an explicit parent use :fundamental.
major-mode-keybindings¶
Return a copy of a mode's local keybinding specifications. Each specification
is a (key-form . command) pair; the command is a function designator or a
fbound, non-macro symbol.
major-mode-definition¶
Return a copy of a mode's complete metadata definition, including its parent, file associations, syntax metadata, and local keybindings.
major-mode-names¶
Return the registered major-mode names.
major-mode-for-path¶
Infer and return a major mode for a pathname.
register-major-mode¶
(loom/feature/mode:register-major-mode
mode &key name aliases (parent :fundamental) extensions filenames
comment-prefix (indentation-width 2) language-id keywords
keybindings (truncate-lines t))
Register an extension-defined major mode and return its canonical keyword.
aliases, extensions, and filenames participate in name and pathname
inference; extensions may be written with or without a leading dot. The
optional parent supplies inherited mode-local bindings and defaults to
:fundamental.
unregister-major-mode¶
Remove a dynamically registered mode and return its canonical keyword. Built-in
modes cannot be removed, and an unknown mode returns nil.
major-mode-keymap¶
Return the mode-local keymap layered over fallback, recursively including
registered parent modes. The result is cached until the mode registry or
fallback changes.
current-major-mode¶
Return the major mode currently active in the selected buffer.
set-major-mode¶
Prompt for a mode name and apply it to the selected buffer. Return the activated minibuffer, not a mode value.
toggle-truncate-lines¶
Flip the selected buffer between truncating and wrapping long lines
(M-x toggle-truncate-lines). The flip resolves the mode default first and
stores the opposite as an explicit choice, so the first toggle always changes
something and a later mode change no longer overrides it.
indent-for-tab-command¶
Indent the current line according to the selected buffer's major mode.
comment-line¶
Comment or uncomment the current line according to its major mode.
Syntax-highlighting feature¶
Public symbols from loom/feature/syntax-highlighting.
syntax-token¶
The syntax-token value type used by syntax highlighting.
syntax-token-p¶
Return true when an object is a syntax token.
syntax-token-kind¶
Return a syntax token's kind.
syntax-token-text¶
Return the source text represented by a syntax token.
syntax-highlight-line¶
Tokenize and return highlighted spans for one source line.
syntax-highlight-line-for-mode¶
Tokenize one source line using an explicitly supplied major mode.
syntax-draw-highlighted-line¶
(loom/feature/syntax-highlighting:syntax-draw-highlighted-line
renderer line x y width &optional (mode :common-lisp) (start-column 0))
Draw one highlighted source line through the renderer. start-column is a
horizontal offset in screen cells.
syntax-draw-buffer¶
(loom/feature/syntax-highlighting:syntax-draw-buffer
renderer buffer x y width height &key (start-line 0) (start-column 0))
Draw the visible portion of buffer with line-local syntax styles.
File tree feature¶
Public symbols from loom/feature/file-tree.
Manage the file sidebar, directory listings, and file commands. See the File tree API for signatures and detailed contracts.
Tree navigation¶
make-file-tree, file-tree-visible-p, file-tree-toggle,
file-tree-entries, file-tree-selected-path, file-tree-entry-kind,
file-tree-move-selection, file-tree-toggle-expand
Construct, inspect, and navigate the sidebar tree.
Directory providers¶
file-tree-child-lister, file-tree-install-child-lister,
file-tree-prefetch-paths, loom-fs-list-directory
Inspect or install a child-listing provider, prefetch paths, and list a directory.
Filesystem operations¶
file-tree-create-file, file-tree-create-directory,
file-tree-rename, file-tree-delete
Perform filesystem changes through the tree API.
Concurrent runtime¶
make-loom-concurrent-runtime, loom-concurrent-runtime-directory-entries,
loom-concurrent-runtime-directory-error, loom-concurrent-runtime-prime-directory,
loom-concurrent-runtime-invalidate-directory, loom-concurrent-runtime-invalidate-path,
loom-concurrent-runtime-prefetch, loom-concurrent-runtime-drain,
loom-concurrent-runtime-shutdown
Manage the concurrent directory-listing cache and its lifecycle.
Sidebar commands¶
toggle-file-tree, file-tree-select-next, file-tree-select-previous,
file-tree-open-selected, file-tree-create-file-command,
file-tree-create-directory-command, file-tree-rename-command,
file-tree-delete-command
Interactive commands for sidebar navigation and filesystem changes.
File commands¶
find-file, visit-file, recent-file, save-buffer, write-file
Visit files, select recent files, and save buffers.
Project feature¶
Public symbols from loom/feature/project.
project-marker-names¶
Return the filenames that identify a project root.
project-ignored-directory-names¶
Return directory names excluded from project file searches.
project-marker-name-p¶
Return true when a filename is a recognized project marker.
project-directory-path¶
Return the directory form of a project path.
project-parent-directory¶
Return the parent directory of a project path.
project-root-for-path¶
Find and return the project root containing a path.
project-relative-path¶
Return a path relative to a project root.
project-search-lines¶
Search project files line by line and return matching locations.
project-find-root¶
Find a project root from a starting directory.
project-list-files¶
Return the project files eligible for project operations.
project-search-files¶
Search the eligible files in a project for a pattern.
project-find-file¶
Find a project file by its project-relative name.
project-search¶
Run the interactive project search command.
project-root¶
Display the current project root, or a no-root message, in the minibuffer.
Use project-find-root to obtain a root pathname programmatically.
Search feature¶
Public symbols from loom/feature/search.
buffer-search-forward¶
Search forward from the current buffer position.
buffer-search-backward¶
Search backward from the current buffer position.
buffer-search-spans¶
Return all matching spans for a buffer search.
make-isearch-session¶
Start an incremental-search session over buffer, remembering origin-offset
as the point C-g returns to.
isearch-apply-pattern¶
Search for a new pattern from the session's current search offset and return the session. A longer pattern searches from the same offset, so the match grows in place. The empty pattern the prompt opens with is not a failure.
isearch-repeat¶
Advance the session to the next match in :forward or :backward, wrapping
once. A repeat on a failed pattern leaves the session where it is, so point
stops moving.
isearch-session-match / isearch-session-matches¶
Return the span point currently sits on, and every span the pattern matches in buffer order. The renderer draws the two differently.
isearch-session-buffer / isearch-session-origin-offset / isearch-session-direction / isearch-session-pattern / isearch-session-failed-p¶
The rest of the session's readable state.
replace-string¶
Replace matching text in the selected buffer.
isearch-forward¶
Search forward as the pattern is typed (C-s). Each keystroke moves point to
the next match, a further C-s advances and C-r turns around, RET keeps
point and files the pattern in the minibuffer history, and C-g returns point
to where the search started. A failing pattern says so in the prompt and stops
moving point.
isearch-backward¶
Search backward as the pattern is typed (C-r). See isearch-forward.
search-forward¶
Run the non-incremental forward-search command, which reads a whole pattern
before moving. Available as M-x search-forward; C-s runs isearch-forward.
search-backward¶
Run the non-incremental backward-search command. Available as
M-x search-backward; C-r runs isearch-backward.
Evaluation feature¶
Public symbols from loom/feature/evaluation.
evaluation-result¶
The evaluation-result value type returned by Lisp evaluation.
make-evaluation-result¶
Construct an evaluation result value.
evaluation-result-p¶
Return true when an object is an evaluation result.
evaluation-result-form-count¶
Return the number of forms evaluated in a result.
evaluation-result-value-lines¶
Return printed value lines from an evaluation result.
evaluation-result-output¶
Return standard output captured by an evaluation result.
evaluation-result-error-output¶
Return error output captured by an evaluation result.
evaluation-result-error-message¶
Return the formatted error message from an unsuccessful result.
evaluation-result-success-p¶
Return true when evaluation completed successfully.
evaluation-result-text¶
Return the display-oriented text for an evaluation result.
evaluate-lisp-source¶
Evaluate a string containing one or more Common Lisp forms.
eval-expression¶
Evaluate one interactive Lisp expression.
eval-buffer¶
Evaluate the contents of the selected buffer.
Shell feature¶
Public symbols from loom/feature/shell.
shell-command-result¶
The captured result value for one shell command invocation.
shell-command-result-p¶
Return true when an object is a shell command result.
make-shell-command-result¶
Construct a shell command result with its command, directory, output streams, and exit code.
shell-command-result-command, shell-command-result-directory¶
Return the command string and canonical working directory.
shell-command-result-output, shell-command-result-error-output¶
Return captured standard output and standard error separately.
shell-command-result-exit-code¶
Return the process exit code.
shell-command-result-success-p¶
Return true when the process exit code is zero.
shell-command-result-text¶
Render the result for a command-result buffer.
run-shell-command¶
(loom/feature/shell:run-shell-command
command &key directory (input nil input-supplied-p)
(timeout-seconds loom/feature/shell:*shell-command-timeout-seconds*))
Run a shell command in an optional directory and return a captured result.
When supplied, :input is sent to standard input. Non-zero exit status is
represented in the result instead of signaled. A timeout returns exit code
124 and a timeout message in the error-output field, retaining captured stdout.
command and supplied input must be strings; timeout-seconds must be a
non-negative real. Invalid arguments or directory resolution can signal errors.
*shell-command-timeout-seconds*¶
The default shell-command timeout in seconds, initially 30.
pipe-command¶
Interactively prompt for a shell command, run it in the selected file's
directory, and append the result to *Loom-Pipe-Command*.
Format feature¶
Public symbols from loom/feature/format.
format-buffer-with-command¶
Send the complete buffer text to a formatter command and replace the buffer only when the command exits successfully. The formatter runs in the buffer's file directory when available; point and mark are restored by their text offsets and the replacement is undoable as one edit.
Return a shell-command-result, including unsuccessful process results.
Invalid command or buffer types, read-only buffers, and narrowed buffers signal
errors before the command is started. The default buffer is the selected buffer.
format-current-buffer¶
Prompt for a formatter command and format the selected buffer.
set-format-command¶
Store and return the command after trimming surrounding whitespace. Signal an error for a non-string command, an empty trimmed command, or a missing state.
format-on-save-mode¶
(loom/feature/format:format-on-save-mode
&optional (enabled-p nil enabled-p-supplied-p) (state loom:*editor-state*))
Toggle formatting before save when enabled-p is omitted, or set it from the
supplied value. Return the resulting boolean. Signal an error for a missing
state or when enabling without a configured formatter command.
format-before-save¶
Attempt formatting when the state enables format-on-save and has a command.
Return buffer; caught formatter errors and unsuccessful exits are reported
in the state's minibuffer when present, rather than propagated by this hook.
set-format-command-command¶
Prompt for the format-on-save command. Report configuration errors in the minibuffer. Return the activated minibuffer.
Auto-save feature¶
Public symbols from loom/feature/auto-save.
Write recovery sidecars for eligible modified file buffers. See the Auto-save API for signatures and detailed contracts.
Configuration and eligibility¶
*auto-save-interval*, auto-save-path, auto-save-eligible-p
Configure the interval, derive a sidecar path, and check buffer eligibility.
Recovery files¶
write-auto-save-file, delete-auto-save-file, auto-save-buffer-to-file
Write or remove a sidecar, or save a buffer's recovery text.
Enablement¶
auto-save-enabled-p, auto-save-mode, toggle-auto-save
Inspect, set, or toggle auto-save enablement.
Save passes¶
auto-save-current-buffer, maybe-auto-save
Run auto-save for the selected buffer or an interval-controlled save pass.
Git feature¶
Public symbols from loom/feature/git.
*git-command-timeout-seconds*¶
The Git-command timeout in seconds, initially 30. It is used for both the
resilience deadline and the cl-vcs-kit process timeout.
run-git-status¶
Run Git status in a directory and return its captured process result from
cl-vcs-kit.
git-status¶
Run status from the current project root and display the captured result in the
read-only *Loom-Git-Status* buffer. The buffer shows stdout, falling back to
stderr when stdout is empty. Non-zero exit statuses are reported in the minibuffer.
run-git-diff¶
Run the working-tree or staged Git diff in a directory and return its captured
process result from cl-vcs-kit.
git-diff, git-diff-staged¶
Display the working-tree or staged diff from the current project root in the
read-only *Loom-Git-Diff* buffer, using the same output selection and
minibuffer exit-status reporting as git-status.
run-git-stage, run-git-unstage¶
Run the corresponding index operation in a directory and return its captured
process result from cl-vcs-kit. Paths are passed as arguments after --.
git-stage-file, git-unstage-file¶
Prompt for a repository path, run the corresponding index operation from the current project root, and report the result in the minibuffer.
Terminal feature¶
Public symbols from loom/feature/terminal.
terminal-session¶
The PTY-backed child-process session object. It records the program, arguments, directory, terminal buffer, raw output, a bounded ANSI screen model, liveness, and exit code.
terminal-session-p¶
Return true when an object is a terminal session.
Session metadata¶
terminal-session-name, terminal-session-program, terminal-session-args,
terminal-session-directory, terminal-session-buffer, terminal-session-pty
Return the session's name, program, arguments, working directory, display buffer, or PTY handle.
Session state¶
terminal-session-raw-output, terminal-session-alive-p,
terminal-session-exit-code, terminal-session-screen
Return the cumulative raw PTY output, liveness flag, recorded exit code, or
bounded screen model. The exit code is initially nil.
terminal-session-output¶
Return the current visible screen as a string, not the cumulative raw output.
terminal-session-feed-output¶
Append text to raw output, feed it into the screen model, and return session.
Signal a type error when text is not a string. This function does not itself
replace the display buffer's text.
terminal-session-for-buffer¶
Return the state's session whose display buffer is eq to buffer, or nil.
Session lifecycle¶
start-terminal-session, terminal-session-poll, terminal-session-send,
terminal-session-resize, stop-terminal-session
Start, poll, write to, resize, or stop a terminal session. Polling updates the session's bounded screen model and replaces the read-only buffer with the current visible screen. It closes the PTY after process exit.
Screen operations¶
terminal-screen, make-terminal-screen, terminal-screen-feed,
terminal-screen-text, terminal-screen-resize
Create and inspect the bounded ANSI screen model. It supports common cursor-addressed movement, line and character erasure, cursor save/restore, and minimal alternate-screen switching; it is not a complete VT compatibility layer.
terminal-screen-p¶
Return true when an object is a terminal screen.
Screen geometry¶
terminal-screen-width, terminal-screen-height,
terminal-screen-cursor-row, terminal-screen-cursor-column
Return the screen's column count, row count, or zero-based cursor coordinates.
poll-terminal-sessions, resize-terminal-sessions¶
Poll or resize all sessions in an editor state.
terminal-input-event-p, terminal-handle-key-event¶
Recognize and translate terminal input events, including characters, paste, control keys, and supported special keys.
terminal, terminal-stop¶
Interactive commands for starting a PTY session in the selected context and stopping the session shown by the selected terminal buffer. The selected terminal displays the current bounded ANSI screen, not a cumulative transcript.
Keyboard-macro feature¶
Public symbols from loom/feature/keyboard-macro.
keyboard-macro-event¶
The keyboard-macro event value type.
keyboard-macro-event-p¶
Return true when an object is a keyboard-macro event.
make-keyboard-macro-event¶
Construct a keyboard-macro event.
keyboard-macro-event-kind¶
Return the kind of a keyboard-macro event.
keyboard-macro-event-value¶
Return the payload of a keyboard-macro event.
keyboard-macro¶
The keyboard-macro value type.
keyboard-macro-p¶
Return true when an object is a keyboard macro.
make-keyboard-macro¶
Construct an empty keyboard macro.
keyboard-macro-events¶
Return the recorded events in a keyboard macro.
keyboard-macro-recording-p¶
Return true while a keyboard macro is recording.
keyboard-macro-replaying-p¶
Return true while a keyboard macro is replaying.
keyboard-macro-start-recording¶
Start recording keyboard events.
keyboard-macro-stop-recording¶
Stop recording and return the recorded keyboard macro.
keyboard-macro-drop¶
Discard the current keyboard macro recording.
keyboard-macro-record-event¶
Append an event to the current keyboard macro.
keyboard-macro-remove-last-event¶
Remove the most recently recorded keyboard-macro event.
keyboard-macro-begin-replay¶
Begin replaying a keyboard macro.
keyboard-macro-end-replay¶
End the current keyboard-macro replay.
start-kbd-macro¶
Interactive command to start keyboard-macro recording.
end-kbd-macro¶
Interactive command to stop keyboard-macro recording.
call-last-kbd-macro¶
Interactive command to replay the last keyboard macro.
Register feature¶
Public symbols from loom/feature/register.
register-value¶
The register-value type stored in a register bank.
register-value-p¶
Return true when an object is a register value.
register-value-kind¶
Return the kind of a register value.
register-value-value¶
Return the payload of a register value.
register-bank¶
The register-bank value type.
register-bank-p¶
Return true when an object is a register bank.
make-register-bank¶
Construct an empty register bank.
register-bank-put-text¶
Store text under a register name.
register-bank-text¶
Return text stored under a register name.
register-bank-put-position¶
Store a buffer position under a register name.
register-bank-position¶
Return a position stored under a register name.
copy-to-register¶
Copy the selected buffer region to a named register.
insert-register¶
Insert the contents of a named register at point.
point-to-register¶
Store the selected buffer's point in a named register.
jump-to-register¶
Move point to the position stored in a named register.
Window feature¶
Public symbols from loom/feature/window.
Window-tree and window-view domain operations belong to
loom/core/window-tree. See the Window API for those
signatures and contracts.
Window commands¶
split-window-below, split-window-right, other-window,
delete-window, delete-other-windows, switch-to-buffer, kill-buffer
Interactive commands for managing windows and their buffers.
Workspace feature¶
Public symbols from loom/feature/workspace.
workspace¶
The value type for one named workspace and its independent window tree.
workspace-p¶
Return true when an object is a workspace.
make-workspace¶
Construct a workspace from a non-empty name and a window tree.
workspace-name¶
Return a workspace's name.
workspace-window-tree¶
Return the window tree owned by a workspace.
workspace-manager¶
The ordered collection of named workspaces and its active index.
workspace-manager-p¶
Return true when an object is a workspace manager.
make-workspace-manager¶
Construct a manager with one initial workspace around a window tree.
make-workspace-manager-from-workspaces¶
Construct a manager from an ordered list of workspaces and an active index.
workspace-manager-workspaces¶
Return the manager's ordered workspace list.
workspace-manager-current-index¶
Return the active workspace index.
workspace-manager-current¶
Return the active workspace.
workspace-manager-current-name¶
Return the active workspace name.
workspace-manager-create¶
Create and append a uniquely named workspace without changing the active workspace.
workspace-manager-switch-index¶
Make the workspace at an index active.
workspace-manager-switch-name¶
Make the uniquely named workspace active.
workspace-manager-next / workspace-manager-previous¶
Cycle through workspaces, wrapping at either end.
workspace-manager-delete¶
Delete a named workspace; the final remaining workspace cannot be deleted.
Workspace commands¶
new-workspace, switch-workspace, next-workspace,
previous-workspace, kill-workspace
Interactive commands for creating, selecting, cycling, and deleting
workspaces. They operate on *editor-state* and preserve each workspace's
window tree. new-workspace captures the selected buffer into a new workspace
and activates it, switch-workspace prompts by workspace name, and
kill-workspace deletes the active workspace while activating the surviving
selection.
Session feature¶
Public symbols from loom/feature/session.
session-buffer-snapshot¶
The session-buffer-snapshot value type.
make-session-buffer-snapshot¶
Construct a buffer snapshot for session persistence.
session-buffer-snapshot-name¶
Return a snapshot's buffer name.
session-buffer-snapshot-path¶
Return a snapshot's buffer path.
session-buffer-snapshot-text¶
Return a snapshot's buffer text.
session-buffer-snapshot-point-line¶
Return a snapshot's point line.
session-buffer-snapshot-point-column¶
Return a snapshot's point column.
session-buffer-snapshot-mark-line¶
Return a snapshot's mark line.
session-buffer-snapshot-mark-column¶
Return a snapshot's mark column.
session-buffer-snapshot-modified-p¶
Return whether a snapshot's buffer was modified.
session-bookmark-snapshot¶
The serializable value type for one named bookmark. It stores the name, path, buffer name, line, and column.
make-session-bookmark-snapshot¶
Construct a bookmark snapshot for session persistence.
Bookmark snapshot fields¶
session-bookmark-snapshot-name, session-bookmark-snapshot-path,
session-bookmark-snapshot-buffer-name, session-bookmark-snapshot-line,
session-bookmark-snapshot-column
Return the bookmark snapshot's name, path, buffer name, line, or column.
session-workspace-snapshot¶
The serializable value type for one named workspace, including its layout and selected-window index.
make-session-workspace-snapshot¶
Construct a workspace snapshot for session persistence.
session-workspace-snapshot-name¶
Return a workspace snapshot's name.
session-workspace-snapshot-layout¶
Return a workspace snapshot's serialized window layout.
session-workspace-snapshot-selected-window-index¶
Return a workspace snapshot's selected-window index.
session-snapshot-recent-files¶
Return the recent-file paths in a session snapshot.
session-snapshot-bookmarks¶
Return the bookmark snapshots in a session snapshot.
session-snapshot-command-history¶
Return the M-x/minibuffer command history in newest-first order.
session-snapshot¶
The session-snapshot value type.
make-session-snapshot¶
Construct a complete session snapshot.
session-snapshot-buffers¶
Return the buffer snapshots in a session snapshot.
session-snapshot-workspaces¶
Return the named workspace snapshots in a session snapshot. Each workspace snapshot owns its layout and selected-window index.
session-snapshot-current-workspace-index¶
Return the active workspace index in a session snapshot.
validate-session-snapshot¶
Validate a session snapshot and return it or signal an invalid snapshot.
session-store-read¶
Read a serialized session snapshot from the session store. The current format is version 5; the reader accepts only the v5 envelope and signals an error for any other version, including pre-v5 session files.
session-store-write¶
Write a session snapshot to the session store.
save-session¶
Save the current editor session.
load-session¶
Load a saved editor session.
User-init feature¶
Public symbols from loom/feature/user-init.
define-command¶
Define a user command for the initialization file.
bind-key¶
Add a user key binding to the initialization configuration.
load-user-init¶
Load the user's initialization file and apply its configuration.
LSP feature¶
Public symbols from loom/feature/lsp.
lsp-column-to-character¶
(lsp-column-to-character text column) converts a zero-based Common Lisp
character column in text to an LSP UTF-16 code-unit offset. Columns beyond
the string's end are clamped to its length.
lsp-character-to-column¶
(lsp-character-to-column text character) converts an LSP UTF-16 code-unit
offset to a zero-based Common Lisp character column. An offset inside a
surrogate pair maps to that character's start; offsets beyond the string's
end map to its length.
lsp-position¶
The LSP position value type.
make-lsp-position¶
Construct an LSP position.
lsp-position-p¶
Return true when an object is an LSP position.
lsp-position-line¶
Return an LSP position's zero-based line.
lsp-position-character¶
Return an LSP position's zero-based UTF-16 code-unit offset within its line.
lsp-range¶
The LSP range value type.
make-lsp-range¶
Construct an LSP range.
lsp-range-p¶
Return true when an object is an LSP range.
lsp-range-start¶
Return an LSP range's start position.
lsp-range-end¶
Return an LSP range's end position.
lsp-diagnostic¶
The LSP diagnostic value type.
make-lsp-diagnostic¶
Construct an LSP diagnostic.
lsp-diagnostic-p¶
Return true when an object is an LSP diagnostic.
lsp-diagnostic-range¶
Return a diagnostic's source range.
lsp-diagnostic-message¶
Return a diagnostic's message.
lsp-diagnostic-severity¶
Return a diagnostic's numeric severity.
lsp-diagnostic-source¶
Return a diagnostic's source name.
lsp-diagnostic-code¶
Return a diagnostic's code.
lsp-diagnostic-severity-name¶
Return the display name for a diagnostic severity.
lsp-document¶
The LSP document value type.
make-lsp-document¶
Construct an LSP document state.
lsp-document-p¶
Return true when an object is an LSP document.
lsp-document-uri¶
Return an LSP document's URI.
lsp-document-language-id¶
Return an LSP document's language identifier.
lsp-document-version¶
Return an LSP document's version.
lsp-document-text¶
Return an LSP document's current text.
make-lsp-session¶
Construct an LSP session for a project or document root.
lsp-session-p¶
Return true when an object is an LSP session.
lsp-session-start¶
Start the language-server process for an LSP session.
lsp-session-drain¶
Drain available language-server messages and apply them to the session.
lsp-session-refresh¶
Refresh an LSP session's pending diagnostics and server state.
lsp-session-sync-buffer¶
For an initialized session and a file-backed buffer, send didOpen for a new
document or full-text didChange when the text differs. Unchanged text sends
neither notification. Return the session.
lsp-session-diagnostics¶
Return a copy of the diagnostic list for the specified buffer or pathname,
or nil when no diagnostics are stored for its URI.
lsp-session-stop¶
Stop the language-server process for a session. An initialized session sends
shutdown and then exit; if the response does not arrive before the
shutdown timeout, it sends the exit fallback.
lsp-session-initialized-p¶
Return true when the language server completed initialization.
lsp-session-last-error¶
Return the last error recorded by an LSP session, or nil.
lsp-session-server-capabilities¶
Return the server capability object received during initialization, or an empty object when the server did not provide one.
lsp-session-capability¶
Return the advertised capability named name, or nil when the server did
not advertise it or explicitly disabled it.
lsp-session-server-info¶
Return the optional server information object received during initialization,
or nil.
lsp-path-uri¶
Convert a pathname to an LSP file URI, percent-encoding non-URI-safe path characters as UTF-8.
lsp-uri-path¶
Convert a file:// URI back to its UTF-8 pathname. Return nil for a URI
with another scheme or an unusable path.
lsp-discover-command¶
Find the nearest ancestor .loom-lsp for a pathname and return its first
non-empty, non-comment command line, the project root, and the configuration
pathname as three values. Return three nil values when no usable
configuration exists.
lsp-start¶
Start LSP support for the current editor context.
RET at the command prompt selects the discovered .loom-lsp command for review,
showing its configuration pathname, execution directory, and unchanged shell
command. Use PageDown/C-v and PageUp/M-v to navigate wrapped review rows without
changing the trust answer. Type exactly yes at the trust prompt to start it; any other answer or
C-g cancels without constructing a process or replacing the existing session.
An explicitly typed command overrides discovery and starts without the extra
trust prompt. Confirmation is required on each discovered-command start.
lsp-stop¶
Stop LSP support for the current editor context.
lsp-diagnostics¶
Refresh the session and display the selected file buffer's diagnostics in the
read-only diagnostics buffer. Report missing session/file context or a refresh
error in the minibuffer. Use lsp-session-diagnostics to obtain a diagnostic list.
lsp-request-completion¶
Request completion at a zero-based document position, with the character
offset measured in UTF-16 code units. The caller must synchronize the document
before requesting completion. The request is not sent when the
server does not advertise completionProvider; the callback receives the
decoded completion items or an error message.
lsp-request-definition¶
Request the definition at a zero-based document position, with the character
offset measured in UTF-16 code units. The caller must synchronize the document
before requesting a definition. The request is not sent when
the server does not advertise definitionProvider; the callback receives
decoded locations or an error message.
lsp-completion-item¶
The value type for one completion candidate.
make-lsp-completion-item¶
Construct a completion candidate with optional insertion text and server metadata.
lsp-completion-item-p¶
Return true when an object is a completion item.
Completion item fields¶
lsp-completion-item-label, lsp-completion-item-insert-text,
lsp-completion-item-detail, lsp-completion-item-kind
Return the display label, optional insertion text, detail, or kind.
lsp-completion-item-text¶
Return the insertion text when non-nil, otherwise the display label.
lsp-location¶
Represent a definition target as a URI and an LSP range.
make-lsp-location¶
Construct a definition target from its URI and range.
lsp-location-p¶
Return true when an object is an LSP location.
lsp-location-uri, lsp-location-range¶
Return a location's URI or range.
lsp-completion-at-point¶
Request and display completion candidates at point. C-M-i opens the popup;
C-n / C-p or the arrow keys move selection, and RET or TAB inserts it.
lsp-find-definition¶
Request the definition at point and visit the returned local file. Bound to
M-..
lsp-pop-definition¶
Return point to the origin of the most recent definition jump. Bound to
M-,.
Feature exports are defined in each packages/feature/<name>/src/package.lisp;
core exports are defined in
src/package-exports.lisp.