Documentation ¶
Index ¶
- Constants
- func ContentChange(chEvent lsp.TextDocumentContentChangeEvent) filesystem.DocumentChange
- func ConvertSymbols(uri lsp.DocumentURI, sbs []decoder.Symbol) []lsp.SymbolInformation
- func DocumentChanges(events []lsp.TextDocumentContentChangeEvent, f File) (filesystem.DocumentChanges, error)
- func FileFromDocumentItem(doc lsp.TextDocumentItem) *file
- func FileHandlerFromDirPath(dirPath string) *fileHandler
- func FileHandlerFromDirURI(dirUri lsp.DocumentURI) *fileHandler
- func FileHandlerFromDocumentURI(docUri lsp.DocumentURI) *fileHandler
- func FileHandlerFromPath(path string) *fileHandler
- func FilePositionFromDocumentPosition(params lsp.TextDocumentPositionParams, f File) (*filePosition, error)
- func HCLDiagsToLSP(hclDiags hcl.Diagnostics, source string) []lsp.Diagnostic
- func HCLRangeToLSP(rng hcl.Range) lsp.Range
- func HCLSeverityToLSP(severity hcl.DiagnosticSeverity) lsp.DiagnosticSeverity
- func HoverData(data *lang.HoverData, cc lsp.TextDocumentClientCapabilities) *lsp.Hover
- func TextEditsFromDocumentChanges(changes filesystem.DocumentChanges) []lsp.TextEdit
- func ToCompletionList(candidates lang.Candidates, caps lsp.TextDocumentClientCapabilities) lsp.CompletionList
- func VersionedFileHandler(doc lsp.VersionedTextDocumentIdentifier) *versionedFileHandler
- type DirHandler
- type File
- type FileHandler
- type SemanticTokensClientCapabilities
- type TokenEncoder
- type TokenModifier
- type TokenModifiers
- type TokenType
- type TokenTypes
Constants ¶
View Source
const ( // Types predefined in LSP spec TokenTypeClass TokenType = "class" TokenTypeComment TokenType = "comment" TokenTypeEnum TokenType = "enum" TokenTypeEnumMember TokenType = "enumMember" TokenTypeEvent TokenType = "event" TokenTypeFunction TokenType = "function" TokenTypeInterface TokenType = "interface" TokenTypeKeyword TokenType = "keyword" TokenTypeMacro TokenType = "macro" TokenTypeMethod TokenType = "method" TokenTypeModifier TokenType = "modifier" TokenTypeNamespace TokenType = "namespace" TokenTypeNumber TokenType = "number" TokenTypeOperator TokenType = "operator" TokenTypeParameter TokenType = "parameter" TokenTypeProperty TokenType = "property" TokenTypeRegexp TokenType = "regexp" TokenTypeString TokenType = "string" TokenTypeStruct TokenType = "struct" TokenTypeType TokenType = "type" TokenTypeTypeParameter TokenType = "typeParameter" TokenTypeVariable TokenType = "variable" // Modifiers predefined in LSP spec TokenModifierDeclaration TokenModifier = "declaration" TokenModifierDefinition TokenModifier = "definition" TokenModifierReadonly TokenModifier = "readonly" TokenModifierStatic TokenModifier = "static" TokenModifierDeprecated TokenModifier = "deprecated" TokenModifierAbstract TokenModifier = "abstract" TokenModifierAsync TokenModifier = "async" TokenModifierModification TokenModifier = "modification" TokenModifierDocumentation TokenModifier = "documentation" TokenModifierDefaultLibrary TokenModifier = "defaultLibrary" )
Variables ¶
This section is empty.
Functions ¶
func ContentChange ¶ added in v0.6.0
func ContentChange(chEvent lsp.TextDocumentContentChangeEvent) filesystem.DocumentChange
func ConvertSymbols ¶ added in v0.9.0
func ConvertSymbols(uri lsp.DocumentURI, sbs []decoder.Symbol) []lsp.SymbolInformation
func DocumentChanges ¶ added in v0.6.0
func DocumentChanges(events []lsp.TextDocumentContentChangeEvent, f File) (filesystem.DocumentChanges, error)
func FileFromDocumentItem ¶
func FileFromDocumentItem(doc lsp.TextDocumentItem) *file
func FileHandlerFromDirPath ¶ added in v0.4.0
func FileHandlerFromDirPath(dirPath string) *fileHandler
func FileHandlerFromDirURI ¶ added in v0.4.0
func FileHandlerFromDirURI(dirUri lsp.DocumentURI) *fileHandler
func FileHandlerFromDocumentURI ¶ added in v0.4.0
func FileHandlerFromDocumentURI(docUri lsp.DocumentURI) *fileHandler
func FileHandlerFromPath ¶
func FileHandlerFromPath(path string) *fileHandler
func FilePositionFromDocumentPosition ¶
func FilePositionFromDocumentPosition(params lsp.TextDocumentPositionParams, f File) (*filePosition, error)
func HCLDiagsToLSP ¶ added in v0.10.0
func HCLDiagsToLSP(hclDiags hcl.Diagnostics, source string) []lsp.Diagnostic
func HCLRangeToLSP ¶ added in v0.7.0
func HCLSeverityToLSP ¶ added in v0.8.0
func HCLSeverityToLSP(severity hcl.DiagnosticSeverity) lsp.DiagnosticSeverity
func TextEditsFromDocumentChanges ¶ added in v0.11.0
func TextEditsFromDocumentChanges(changes filesystem.DocumentChanges) []lsp.TextEdit
func ToCompletionList ¶ added in v0.10.0
func ToCompletionList(candidates lang.Candidates, caps lsp.TextDocumentClientCapabilities) lsp.CompletionList
func VersionedFileHandler ¶
func VersionedFileHandler(doc lsp.VersionedTextDocumentIdentifier) *versionedFileHandler
Types ¶
type DirHandler ¶ added in v0.11.0
type FileHandler ¶
type SemanticTokensClientCapabilities ¶ added in v0.12.0
type SemanticTokensClientCapabilities struct {
lsp.SemanticTokensClientCapabilities
}
func (SemanticTokensClientCapabilities) FullRequest ¶ added in v0.12.0
func (c SemanticTokensClientCapabilities) FullRequest() bool
type TokenEncoder ¶ added in v0.12.0
type TokenEncoder struct { Lines source.Lines Tokens []lang.SemanticToken ClientCaps lsp.SemanticTokensClientCapabilities }
func (*TokenEncoder) Encode ¶ added in v0.12.0
func (te *TokenEncoder) Encode() []float64
type TokenModifier ¶ added in v0.12.0
type TokenModifier string
type TokenModifiers ¶ added in v0.12.0
type TokenModifiers []TokenModifier
func TokenModifiersLegend ¶ added in v0.12.0
func TokenModifiersLegend(clientSupported []string) TokenModifiers
func (TokenModifiers) AsStrings ¶ added in v0.12.0
func (tm TokenModifiers) AsStrings() []string
func (TokenModifiers) BitMask ¶ added in v0.12.0
func (tm TokenModifiers) BitMask(declaredModifiers TokenModifiers) int
type TokenTypes ¶ added in v0.12.0
type TokenTypes []TokenType
func TokenTypesLegend ¶ added in v0.12.0
func TokenTypesLegend(clientSupported []string) TokenTypes
func (TokenTypes) AsStrings ¶ added in v0.12.0
func (tt TokenTypes) AsStrings() []string
func (TokenTypes) Index ¶ added in v0.12.0
func (tt TokenTypes) Index(tokenType TokenType) int
Click to show internal directories.
Click to hide internal directories.