Documentation
¶
Index ¶
- Constants
- func SyntaxReport(source []byte) string
- type ActionCreateFile
- type ActionEdit
- type CodeAction
- type Completion
- type ConvMode
- type Doc
- func (d Doc) ApproximateTargetPos(enc common.Encoding, sourcePos common.Pos) (common.Pos, bool)
- func (d Doc) Assemble()
- func (d Doc) CheckTarget() (needsUpdate bool, err error)
- func (d Doc) Completions(enc common.Encoding, pos common.Pos) (completions []Completion, complete bool)
- func (d Doc) Delete()
- func (d Doc) Err() error
- func (d Doc) ExtractActions(enc common.Encoding, ran common.Range) []CodeAction
- func (d Doc) Format(enc common.Encoding) (Formatted, error)
- func (d Doc) GetDiag() *ast.Node
- func (d Doc) GoxImportPos(enc common.Encoding) (common.Pos, bool)
- func (d Doc) Hover(enc common.Encoding, pos common.Pos) (message string, ran common.Range, ok bool)
- func (d Doc) Init()
- func (d Doc) Load() error
- func (d Doc) Name() string
- func (d Doc) Parse() error
- func (d Doc) PrintTarget()
- func (d Doc) Save() error
- func (d Doc) SourceClose()
- func (d Doc) SourceFile() File
- func (d Doc) SourceIsOpened() bool
- func (d Doc) SourceOpen(version int32)
- func (d Doc) SourcePatch(enc common.Encoding, ran common.Range, content string) (bool, error)
- func (d Doc) SourcePos(enc common.Encoding, targetPos common.Pos, mode ConvMode) (common.Pos, bool)
- func (d Doc) SourceRange(enc common.Encoding, targetRange common.Range, mode ConvMode) (common.Range, bool)
- func (d Doc) SourceUpdate(content string) (bool, error)
- func (d Doc) StoreDiag(a *ast.Node)
- func (d Doc) Symbols(enc common.Encoding) []Symbol
- func (d Doc) SyntaxErrorReport() string
- func (d Doc) SyntaxErrors(enc common.Encoding) []SyntaxError
- func (d Doc) TargetClose()
- func (d Doc) TargetContent() string
- func (d Doc) TargetFile() File
- func (d Doc) TargetIsOpened() bool
- func (d Doc) TargetOpen(version int32)
- func (d Doc) TargetPos(enc common.Encoding, sourcePos common.Pos, mode ConvMode) (common.Pos, bool)
- func (d Doc) TargetRange(enc common.Encoding, sourceRange common.Range, mode ConvMode) (common.Range, bool)
- func (d Doc) TargetWrite() error
- type File
- func (f File) Dir() string
- func (f File) Exists() bool
- func (f File) IsValid() bool
- func (f File) Kind() FileKind
- func (f File) Name() string
- func (f File) Path() string
- func (f File) Remove() error
- func (f File) Reverse() File
- func (f File) URI() string
- func (f File) ValidateTarget(b []byte) (needsUpdate bool, err error)
- type FileKind
- type Formatted
- type Manager
- type Symbol
- type SyntaxError
Constants ¶
View Source
const ( KindExtractVariable = "refactor.extract.variable" KindExtractConstant = "refactor.extract.constant" KindExtractElem = "refactor.extract.elem" KindExtractToNewFile = "refactor.extract.toNewFile" )
Variables ¶
This section is empty.
Functions ¶
func SyntaxReport ¶ added in v0.2.2
SyntaxReport parses source standalone and returns the same report as SyntaxErrorReport, for callers that do not hold a Doc.
Types ¶
type ActionCreateFile ¶ added in v0.2.2
type ActionEdit ¶ added in v0.2.2
type CodeAction ¶ added in v0.2.2
type CodeAction struct {
Title string
Kind string
URI string
Edits []ActionEdit
CreateFile *ActionCreateFile
}
type Completion ¶
type Completion struct {
Range common.Range
Text string
Label string
// contains filtered or unexported fields
}
func (Completion) Kind ¶
func (c Completion) Kind() completion.Kind
type Doc ¶
type Doc = *doc
func (Doc) ApproximateTargetPos ¶
func (Doc) CheckTarget ¶ added in v0.0.41
func (Doc) Completions ¶
func (Doc) ExtractActions ¶ added in v0.2.2
func (Doc) GoxImportPos ¶ added in v0.1.13
func (Doc) PrintTarget ¶
func (d Doc) PrintTarget()
func (Doc) SourceClose ¶
func (d Doc) SourceClose()
func (Doc) SourceFile ¶
func (Doc) SourceIsOpened ¶
func (Doc) SourceOpen ¶
func (Doc) SourcePatch ¶
func (Doc) SourceRange ¶
func (Doc) SyntaxErrorReport ¶ added in v0.2.2
SyntaxErrorReport formats the ERROR/MISSING nodes of the current tree as indented "line:col: message near \"...\"" lines (1-based), or "" when clean.
func (Doc) SyntaxErrors ¶ added in v0.2.2
func (d Doc) SyntaxErrors(enc common.Encoding) []SyntaxError
SyntaxErrors reports ERROR/MISSING nodes as LSP diagnostics, with ranges in the client encoding.
func (Doc) TargetClose ¶
func (d Doc) TargetClose()
func (Doc) TargetContent ¶
func (Doc) TargetFile ¶
func (Doc) TargetIsOpened ¶
func (Doc) TargetOpen ¶
func (Doc) TargetRange ¶
func (Doc) TargetWrite ¶
type SyntaxError ¶ added in v0.2.2
Click to show internal directories.
Click to hide internal directories.