Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CodeRef ¶
type CodeRef struct { AbsPath string Line uint Column uint RelPath string Filename string Excerpt string }
CodeRef is a reference to a specific piece of code in a textmate document
type Cursor ¶
type Cursor struct { Dir string // directory of current doc (may be empty) Doc string // filepath to document (may be empty) Line int // line number (starting at 1) Index int // index of line (starting at 1) Scope Scope // scope type specified by grammar Word string // the word under the cursor (may be empty) SelectedText string // text currently highlighted by cursor (may be empty) }
Cursor contains all information to determine where the UI cursor is currently pointing
func (Cursor) RuneOffset ¶
RuneOffset attemps to calculate the rune offset for the cursor in the specified document. An error may occur if the document does not exist OR if the desired offset is out of bounds of the provided file.
type Drawer ¶
type Drawer struct { TopDir string // top level folder in project drawer Selected []string // files and dirs currently selected SelectedFirst string // first selected file (what determines first?) }
Drawer represents the drawer state
type Env ¶
type Env struct { Cursor Cursor // where is current caret/cursor pointing? Drawer Drawer // current state of project drawer? // remaining dynamic env vars BundleDir string // the support folder of the bundle that ran the item SoftTabs bool // are soft tabs being used? SupportPath string // common textmate support items TabSize int // size of soft tabs // Static Environment Variables GoPath string // GOPATH variable Dialog string // Path to Textmate dialog helper app }
Env represents all required data derived from textmate/system environment variables
func LoadEnvironment ¶
LoadEnvironment sources all environment variables or populates defaults
type ExitCode ¶
type ExitCode int
ExitCode is an enumeration of the different exit codes supported by Textmate. Note: exit codes are ignored if HTML output is being used Refer to the official docs: https://github.com/textmate/bundle-support.tmbundle/blob/master/Support/shared/lib/exit_codes.rb
const ( // ExitDiscard will discard output ExitDiscard ExitCode = iota + 200 // ExitReplaceText will replace the selected text with the output ExitReplaceText // ExitReplaceDocument will replace the entire document with the output ExitReplaceDocument // ExitInsertText will insert the output at the cursor location ExitInsertText // ExitInsertSnippet will insert the snippet at the cursor location ExitInsertSnippet // ExitShowHTML will render output as HTML in a separate window ExitShowHTML // ExitShowToolTip will show the output as a tool tip near the cursor ExitShowToolTip // ExitCreateNewDoc will create a new document with the output ExitCreateNewDoc // ExitInsertSnipNoIdent will insert the snippet at the cursor with no // additional indentation ExitInsertSnipNoIdent )
type Scope ¶
type Scope string
Scope refers to the type of symbol under the cursor as determined by the textmate grammer See http://blog.macromates.com/2005/introduction-to-scopes/ for more info
const ( // ScopeNone is when we don't receive a scope from textmate ScopeNone Scope = "" )
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
Package code provides code completion features.
|
Package code provides code completion features. |
Package gui provides Textmate user interface components for requesting user input.
|
Package gui provides Textmate user interface components for requesting user input. |
notes is a utility that recursively scans all note markings in a directory and returns a representation of those notes mapped by tag and ID to the actual note and location.
|
notes is a utility that recursively scans all note markings in a directory and returns a representation of those notes mapped by tag and ID to the actual note and location. |
Package outline is adapted from https://github.com/lukehoban/go-outline
|
Package outline is adapted from https://github.com/lukehoban/go-outline |