Properties
capabilities
→ LspClientCapabilities
The capabilities of the LSP client that are communicated to the language server during initialization.
This determines the features and requests that the client supports, allowing the server to tailor its responses accordingly.
final
disableError
→ bool
Whether to disable errors from the LSP server.
final
disableWarning
→ bool
Whether to disable warnings from the LSP server.
final
hashCode
→ int
The hash code for this object.
no setter override
isInitialized
↔ bool
getter/setter pair
languageId
→ String
The language ID of the language.
final
responses
→ Stream <Map <String , dynamic > >
Stream of responses from the LSP server.
Use this to listen for notifications like diagnostics.
no setter
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
serverTokenModifiers
→ List <String > ?
The server's semantic token modifiers legend.
Returns null if not yet initialized.
no setter
serverTokenTypes
→ List <String > ?
The server's semantic token types legend.
Returns null if not yet initialized.
no setter
workspacePath
→ String
The workspace path of the document to be processed by the LSP.
final
Methods
closeDocument (String filePath )
→ Future <void >
Updates the document in the LSP server if there is any change.
///
This method is used internally by the CodeForge widget and calling it directly is not recommended.
dispose ()
→ void
executeCommand (String command , List ? arguments )
→ Future <void >
Execute a workspace command on the server
Wrapper around the 'workspace/executeCommand' request.
exitServer ()
→ Future <void >
Exits the LSP server process.
formatDocument (String filePath )
→ Future <List >
Formats the entire document according to server rules.
formatRange ({required String filePath , required int startLine , required int startCharacter , required int endLine , required int endCharacter })
→ Future <List >
Formats a specific range in the document.
getCodeActions ({required String filePath , required int startLine , required int startCharacter , required int endLine , required int endCharacter , List <Map <String , dynamic > > diagnostics = const [] })
→ Future <List >
Retrieves available code actions at a given range.
getColorPresentation (String filePath , {required double red , required double blue , required double green , required double alpha , required Map <String , dynamic > range })
→ Future <Map <String , dynamic > >
getCompletions (String filePath , int line , int character )
→ Future <List <LspCompletion > >
This method is used to get completions at a specific position in the document.
getDeclaration (String filePath , int line , int character )
→ Future <Map <String , dynamic > >
Gets the declaration for a symbol at the specified position.
getDefinition (String filePath , int line , int character )
→ Future <Map <String , dynamic > >
Gets the definition location for a symbol at the specified position.
getDocumentColor (String filePath )
→ Future <Map <String , dynamic > >
Requests all color information found in the document.
getDocumentHighlight (String filePath , int line , int character )
→ Future <List >
Gets all highlights for a symbol at the specified position in the document.
getDocumentLinks (String filePath )
→ Future <List >
Retrieves document links such as import paths and URLs.
getDocumentSymbols (String filePath )
→ Future <List >
Retrieves all symbols defined in the current document.
getHover (String filePath , int line , int character )
→ Future <String >
This method is used to get details at a specific position in the document.
getImplementation (String filePath , int line , int character )
→ Future <Map <String , dynamic > >
Gets the implementation locations for a symbol at the specified position.
getIncomingCalls (Map <String , dynamic > item )
→ Future <List >
Retrieves incoming calls for a call hierarchy item.
getInlayHints (String filePath , int startLine , int startCharacter , int endLine , int endCharacter )
→ Future <Map <String , dynamic > >
Requests inlay hints for a specific range in the document.
getLSPFoldRanges (String filePath )
→ Future <Map <String , dynamic > >
Requests folding ranges for the given document.
getOutgoingCalls (Map <String , dynamic > item )
→ Future <List >
Retrieves outgoing calls for a call hierarchy item.
getReferences (String filePath , int line , int character )
→ Future <List >
Gets all references to a symbol at the specified position.
getSemanticTokensFull (String filePath )
→ Future <List <LspSemanticToken > >
Gets all semantic tokens for the document.
getSignatureHelp (String filePath , int line , int character , int triggerKind , {String ? triggerCharacter , bool isRetrigger = false })
→ Future <LspSignatureHelps >
Requests signature help information for the given position in a document.
getSubtypes (Map <String , dynamic > item )
→ Future <List >
Retrieves subtypes (derived classes / implementations).
getSupertypes (Map <String , dynamic > item )
→ Future <List >
Retrieves supertypes (base classes / interfaces).
getTypeDefinition (String filePath , int line , int character )
→ Future <Map <String , dynamic > >
Jumps to the location where the data type of a symbol is defined.
getWorkspaceSymbols (String query )
→ Future <List >
Searches for symbols across the entire workspace.
initialize ()
→ Future <void >
This method is used to initialize the LSP server.
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openDocument (String filePath )
→ Future <void >
Opens the document in the LSP server.
prepareCallHierarchy (String filePath , int line , int character )
→ Future <Map <String , dynamic > ? >
Prepares a call hierarchy item at the given position.
prepareRename (String filePath , int line , int character )
→ Future <Map <String , dynamic > ? >
Checks whether a symbol can be renamed at the given position.
prepareTypeHierarchy (String filePath , int line , int character )
→ Future <Map <String , dynamic > ? >
Prepares a type hierarchy item at the given position.
renameSymbol (String filePath , int line , int character , String newName )
→ Future <Map <String , dynamic > >
Renames a symbol at the given position across the workspace.
resolveCompletionItem (Map <String , dynamic > item )
→ Future <Map <String , dynamic > >
Resolves and retrieves additional details for the given LSP completion item.
saveDocument (String filePath , String content )
→ Future <void >
Saves the document in the LSP server.
shutdown ()
→ Future <void >
Shuts down the LSP server gracefully.
toString ()
→ String
A string representation of this object.
inherited
updateDocument (String filePath , String content )
→ Future <void >
Updates the document content in the LSP server.