Skip to main content

Module LanguageFeature

Module LanguageFeature 

Source
Expand description

ยงLanguageFeature (Tauri command surface)

Bridges Monaco-Editor language requests from Sky into the Mountain LanguageFeatureProvider registry. Six wire-bound commands, each in its own file (file name = Tauri command identifier per the Naming-Convention exception):

  • MountainProvideHover::MountainProvideHover
  • MountainProvideCodeActions::MountainProvideCodeActions
  • MountainProvideDocumentHighlights::MountainProvideDocumentHighlights
  • MountainProvideCompletions::MountainProvideCompletions
  • MountainProvideDefinition::MountainProvideDefinition
  • MountainProvideReferences::MountainProvideReferences

Each command is a thin shell that validates input and delegates to the matching provide_*_impl in the sibling Hover / CodeActions / โ€ฆ modules. Implementation files are pub(crate) because callers outside this directory should go through the wire-bound shells.

Errors propagate as Result<Value, String> with the string sent straight to the frontend; provider errors (CommonError) are stringified at the boundary.

VS Code reference: vs/workbench/api/common/extHostLanguageFeatures.ts, vs/workbench/services/languageFeatures/common/languageFeaturesService.ts.

ยงPlanned Work

  • Document symbols, formatting, rename, signature help
  • Semantic tokens, code lens, inlay hints
  • Linked editing range, call/type hierarchy
  • Document color, folding/selection range
  • Request dedupe and cancellation tokens for long-running ops

Modulesยง

CodeActions ๐Ÿ”’
LanguageFeature - Code Actions
Completions ๐Ÿ”’
LanguageFeature - Completions
Definition ๐Ÿ”’
LanguageFeature - Definition
Highlights ๐Ÿ”’
LanguageFeature - Document Highlights
Hover ๐Ÿ”’
LanguageFeature - Hover
InvokeProvider ๐Ÿ”’
LanguageFeature - Invoke Provider Helper
MountainProvideCodeActions
Tauri command - quick fixes and refactorings for a code range. Delegates to LanguageFeature::CodeActions::provide_code_actions_impl.
MountainProvideCompletions
Tauri command - code completion suggestions. Delegates to LanguageFeature::Completions::provide_completions_impl.
MountainProvideDefinition
Tauri command - go-to-definition. Delegates to LanguageFeature::Definition::provide_definition_impl.
MountainProvideDocumentHighlights
Tauri command - symbol occurrences in a document. Delegates to LanguageFeature::Highlights::provide_document_highlights_impl.
MountainProvideHover
Tauri command - show hover information at the cursor position. Delegates to LanguageFeature::Hover::provide_hover_impl.
MountainProvideReferences
Tauri command - find all references to a symbol. Delegates to LanguageFeature::References::provide_references_impl.
References ๐Ÿ”’
LanguageFeature - References
Validation ๐Ÿ”’
LanguageFeature - Validation