Documentation
¶
Index ¶
- Variables
- func BufferModule() command.Module
- func DiagnosticsModule(model ui.Model) command.Module
- func DirectoryModule() command.Module
- func FileModule() command.Module
- func FormatModule() command.Module
- func LspModule(model ui.Model) command.Module
- func NewBufferPicker(e *view.Editor, opts BufferPickerOptions) *ui.Picker
- func NewDiagnosticPicker(e *view.Editor) *ui.Picker
- func NewFileExplorer(e *view.Editor, opts FileExplorerOptions) *ui.Picker
- func NewFilePicker(e *view.Editor) *ui.Picker
- func NewFilePickerInCWD(e *view.Editor) *ui.Picker
- func NewFilePickerInDir(dir string) ui.PickerFunc
- func NewFocusedPaneDirExplorer(e *view.Editor, opts FileExplorerOptions) *ui.Picker
- func NewGlobalSearchPicker(e *view.Editor) *ui.Picker
- func NewWorkspaceDiagnosticPicker(e *view.Editor) *ui.Picker
- func PickerModule(model ui.Model) command.Module
- func SessionModule(r *command.Registry) command.Module
- type BufferPickerOptions
- type FileExplorerOptions
- type PickerStartPosition
Constants ¶
This section is empty.
Variables ¶
var (
ErrInvalidPickerStart = errors.New("invalid picker start position")
)
Functions ¶
func BufferModule ¶
BufferModule returns the buffer navigation and close commands
func DiagnosticsModule ¶
DiagnosticsModule returns diagnostic and workspace search picker commands separately from PickerModule, allowing independent placement in the space-leader menu
func DirectoryModule ¶
DirectoryModule returns the working-directory commands
func FileModule ¶
FileModule returns the file open, write, and manage commands
func FormatModule ¶
FormatModule returns the document and selection format commands
func NewBufferPicker ¶
func NewBufferPicker(e *view.Editor, opts BufferPickerOptions) *ui.Picker
NewBufferPicker returns a picker over the open buffers
func NewDiagnosticPicker ¶
NewDiagnosticPicker lists diagnostics for the focused document
func NewFileExplorer ¶
func NewFileExplorer(e *view.Editor, opts FileExplorerOptions) *ui.Picker
NewFileExplorer opens a file explorer rooted at the editor's working directory
func NewFilePicker ¶
NewFilePicker opens a file picker rooted at the workspace directory
func NewFilePickerInCWD ¶
NewFilePickerInCWD opens a file picker rooted at the current working directory
func NewFilePickerInDir ¶
func NewFilePickerInDir(dir string) ui.PickerFunc
NewFilePickerInDir opens a file picker rooted at the given directory
func NewFocusedPaneDirExplorer ¶
func NewFocusedPaneDirExplorer(e *view.Editor, opts FileExplorerOptions) *ui.Picker
NewFocusedPaneDirExplorer opens a file explorer rooted at the focused pane's path directory, falling back to the working directory
func NewGlobalSearchPicker ¶
NewGlobalSearchPicker opens a picker searching workspace file contents as the query is typed
func NewWorkspaceDiagnosticPicker ¶
NewWorkspaceDiagnosticPicker lists diagnostics for all open documents
func PickerModule ¶
PickerModule returns the file, buffer, and explorer picker commands
Types ¶
type BufferPickerOptions ¶
type BufferPickerOptions struct {
StartPosition PickerStartPosition `toml:"start-position"`
}
BufferPickerOptions is the buffer picker's own configuration
type FileExplorerOptions ¶
type FileExplorerOptions struct {
Hidden bool
FollowSymlinks bool
Parents bool
IgnoreFiles bool
FlattenDirs bool
}
FileExplorerOptions controls which entries a file explorer lists
func DefaultFileExplorerOptions ¶
func DefaultFileExplorerOptions() FileExplorerOptions
DefaultFileExplorerOptions returns the explorer's out-of-the-box behavior
type PickerStartPosition ¶
type PickerStartPosition string
PickerStartPosition is where the cursor lands when a picker opens
const ( PickerStartTop PickerStartPosition = "top" PickerStartPrevious PickerStartPosition = "previous" )
func (*PickerStartPosition) UnmarshalText ¶
func (p *PickerStartPosition) UnmarshalText(text []byte) error
UnmarshalText parses which entry the picker starts on