neovim

package module
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2021 License: MIT Imports: 12 Imported by: 3

README

neovim

Experimental neovim SDK for go.


Examples

func main() {
  neovim.Register(&plugin{})
}

func plugin struct {}

func (p *plugin) Register(api novim.RegisterApi) {
  api.Function("Hello", func() {
    api.Out.Messagef("Hallo %s!", "Welt")
  })
}

License

MIT © Josa Gesell

Documentation

Index

Constants

View Source
const (
	BufferOptionModifiable BoolOption   = "modifiable" // bool
	BufferOptionReadOnly   BoolOption   = "readonly"   // bool
	BufferOptionHidden     StringOption = "bufhidden"  // string
	BufferOptionType       StringOption = "buftype"    // string
	BufferOptionFileType   StringOption = "filetype"   // string

	BufferOptionSwapFile  BoolOption   = "swapfile"  // bool
	BufferOptionListed    BoolOption   = "buflisted" // bool
	BufferOptionList      BoolOption   = "list"      // bool? "no"
	BufferOptionSpell     BoolOption   = "spell"     // bool
	BufferOptionListchars StringOption = "listchars" // ""
)
View Source
const (

	// starting to edit a file that doesn't exist
	EventBufNewFile = "BufNewFile"

	// starting to edit a new buffer, before reading the file
	EventBufReadPre = "BufReadPre"

	// starting to edit a new buffer, after reading the file
	EventBufRead = "BufRead"

	// starting to edit a new buffer, after reading the file
	EventBufReadPost = "BufReadPost"

	// before starting to edit a new buffer |Cmd-event|
	EventBufReadCmd = "BufReadCmd"

	// before reading a file with a ":read" command
	EventFileReadPre = "FileReadPre"

	// after reading a file with a ":read" command
	EventFileReadPost = "FileReadPost"

	// before reading a file with a ":read" command |Cmd-event|
	EventFileReadCmd = "FileReadCmd"

	// before reading a file from a filter command
	EventFilterReadPre = "FilterReadPre"

	// after reading a file from a filter command
	EventFilterReadPost = "FilterReadPost"

	// before reading from stdin into the buffer
	EventStdinReadPre = "StdinReadPre"

	// After reading from the stdin into the buffer
	EventStdinReadPost = "StdinReadPost"

	// starting to write the whole buffer to a file
	EventBufWrite = "BufWrite"

	// starting to write the whole buffer to a file
	EventBufWritePre = "BufWritePre"

	// after writing the whole buffer to a file
	EventBufWritePost = "BufWritePost"

	// before writing the whole buffer to a file |Cmd-event|
	EventBufWriteCmd = "BufWriteCmd"

	// starting to write part of a buffer to a file
	EventFileWritePre = "FileWritePre"

	// after writing part of a buffer to a file
	EventFileWritePost = "FileWritePost"

	// before writing part of a buffer to a file |Cmd-event|
	EventFileWriteCmd = "FileWriteCmd"

	// starting to append to a file
	EventFileAppendPre = "FileAppendPre"

	// after appending to a file
	EventFileAppendPost = "FileAppendPost"

	// before appending to a file |Cmd-event|
	EventFileAppendCmd = "FileAppendCmd"

	// starting to write a file for a filter command or diff
	EventFilterWritePre = "FilterWritePre"

	// after writing a file for a filter command or diff
	EventFilterWritePost = "FilterWritePost"

	// just after adding a buffer to the buffer list
	EventBufAdd = "BufAdd"

	// just after adding a buffer to the buffer list
	EventBufCreate = "BufCreate"

	// before deleting a buffer from the buffer list
	EventBufDelete = "BufDelete"

	// before completely deleting a buffer
	EventBufWipeout = "BufWipeout"

	// before changing the name of the current buffer
	EventBufFilePre = "BufFilePre"

	// after changing the name of the current buffer
	EventBufFilePost = "BufFilePost"

	// after entering a buffer
	EventBufEnter = "BufEnter"

	// before leaving to another buffer
	EventBufLeave = "BufLeave"

	// after a buffer is displayed in a window
	EventBufWinEnter = "BufWinEnter"

	// before a buffer is removed from a window
	EventBufWinLeave = "BufWinLeave"

	// before unloading a buffer
	EventBufUnload = "BufUnload"

	// just after a buffer has become hidden
	EventBufHidden = "BufHidden"

	// just after creating a new buffer
	EventBufNew = "BufNew"

	// detected an existing swap file
	EventSwapExists = "SwapExists"

	// starting a terminal job
	EventTermOpen = "TermOpen"

	// entering Terminal-mode
	EventTermEnter = "TermEnter"

	// leaving Terminal-mode
	EventTermLeave = "TermLeave"

	// stopping a terminal job
	EventTermClose = "TermClose"

	// after a channel opened
	EventChanOpen = "ChanOpen"

	// after a channel has its state changed
	EventChanInfo = "ChanInfo"

	// Options
	// when the 'filetype' option has been set
	EventFileType = "FileType"

	// when the 'syntax' option has been set
	EventSyntax = "Syntax"

	// after setting any option
	EventOptionSet = "OptionSet"

	// Startup and exit
	// after doing all the startup stuff
	EventVimEnter = "VimEnter"

	// after a UI attaches
	EventUIEnter = "UIEnter"

	// after a UI detaches
	EventUILeave = "UILeave"

	// after the terminal response to t_RV is received
	EventTermResponse = "TermResponse"

	// when using `:quit`, before deciding whether to exit
	EventQuitPre = "QuitPre"

	// when using a command that may make Vim exit
	EventExitPre = "ExitPre"

	// before exiting Nvim, before writing the shada file
	EventVimLeavePre = "VimLeavePre"

	// before exiting Nvim, after writing the shada file
	EventVimLeave = "VimLeave"

	// after Nvim is resumed
	EventVimResume = "VimResume"

	// before Nvim is suspended
	EventVimSuspend = "VimSuspend"

	// after diffs have been updated
	EventDiffUpdated = "DiffUpdated"

	// after the |current-directory| was changed
	EventDirChanged = "DirChanged"

	// Vim notices that a file changed since editing started
	EventFileChangedShell = "FileChangedShell"

	// after handling a file changed since editing started
	EventFileChangedShellPost = "FileChangedShellPost"

	// before making the first change to a read-only file
	EventFileChangedRO = "FileChangedRO"

	// after executing a shell command
	EventShellCmdPost = "ShellCmdPost"

	// after filtering with a shell command
	EventShellFilterPost = "ShellFilterPost"

	// a user command is used but it isn't defined
	EventCmdUndefined = "CmdUndefined"

	// a user function is used but it isn't defined
	EventFuncUndefined = "FuncUndefined"

	// a spell file is used but it can't be found
	EventSpellFileMissing = "SpellFileMissing"

	// before sourcing a Vim script
	EventSourcePre = "SourcePre"

	// after sourcing a Vim script
	EventSourcePost = "SourcePost"

	// before sourcing a Vim script |Cmd-event|
	EventSourceCmd = "SourceCmd"

	// after the Vim window size changed
	EventVimResized = "VimResized"

	// Nvim got focus
	EventFocusGained = "FocusGained"

	// Nvim lost focus
	EventFocusLost = "FocusLost"

	// the user doesn't press a key for a while
	EventCursorHold = "CursorHold"

	// the user doesn't press a key for a while in Insert mode
	EventCursorHoldI = "CursorHoldI"

	// the cursor was moved in Normal mode
	EventCursorMoved = "CursorMoved"

	// the cursor was moved in Insert mode
	EventCursorMovedI = "CursorMovedI"

	// after creating a new window
	EventWinNew = "WinNew"

	// after entering another window
	EventWinEnter = "WinEnter"

	// before leaving a window
	EventWinLeave = "WinLeave"

	// after entering another tab page
	EventTabEnter = "TabEnter"

	// before leaving a tab page
	EventTabLeave = "TabLeave"

	// when creating a new tab page
	EventTabNew = "TabNew"

	// after entering a new tab page
	EventTabNewEntered = "TabNewEntered"

	// after closing a tab page
	EventTabClosed = "TabClosed"

	// after a change was made to the command-line text
	EventCmdlineChanged = "CmdlineChanged"

	// after entering cmdline mode
	EventCmdlineEnter = "CmdlineEnter"

	// before leaving cmdline mode
	EventCmdlineLeave = "CmdlineLeave"

	// after entering the command-line window
	EventCmdwinEnter = "CmdwinEnter"

	// before leaving the command-line window
	EventCmdwinLeave = "CmdwinLeave"

	// starting Insert mode
	EventInsertEnter = "InsertEnter"

	// when typing <Insert> while in Insert or Replace mode
	EventInsertChange = "InsertChange"

	// when leaving Insert mode
	EventInsertLeave = "InsertLeave"

	// when a character was typed in Insert mode, before
	// inserting it
	EventInsertCharPre = "InsertCharPre"

	// when some text is yanked or deleted
	EventTextYankPost = "TextYankPost"

	// after a change was made to the text in Normal mode
	EventTextChanged = "TextChanged"

	// after a change was made to the text in Insert mode
	// when popup menu is not visible
	EventTextChangedI = "TextChangedI"

	// after a change was made to the text in Insert mode
	// when popup menu visible
	EventTextChangedP = "TextChangedP"

	// before loading a color scheme
	EventColorSchemePre = "ColorSchemePre"

	// after loading a color scheme
	EventColorScheme = "ColorScheme"

	// a reply from a server Vim was received
	EventRemoteReply = "RemoteReply"

	// before a quickfix command is run
	EventQuickFixCmdPre = "QuickFixCmdPre"

	// after a quickfix command is run
	EventQuickFixCmdPost = "QuickFixCmdPost"

	// after loading a session file
	EventSessionLoadPost = "SessionLoadPost"

	// just before showing the popup menu
	EventMenuPopup = "MenuPopup"

	// after popup menu changed, not fired on popup menu hide
	EventCompleteChanged = "CompleteChanged"

	// after Insert mode completion is done
	EventCompleteDone = "CompleteDone"

	// to be used in combination with ":doautocmd"
	EventUser = "User"

	// after Nvim receives a signal
	EventSignal = "Signal"
)
View Source
const (
	RegistryTypeBuffer = "buffer"
	RegistryTypeWindow = "window"
	RegistryTypeTab    = "tab"
)
View Source
const (
	WindowOptionFixWidth       BoolOption   = "winfixwidth"    // bool
	WindowOptionNumber         BoolOption   = "number"         // bool
	WindowOptionRelativeNumber BoolOption   = "relativenumber" // bool
	WindowOptionFoldColumn     IntOption    = "foldcolumn"     // "0"
	WindowOptionFoldMethod     StringOption = "foldmethod"     // "manual"
	WindowOptionFoldEnable     BoolOption   = "foldenable"     // bool
	WindowOptionWrap           BoolOption   = "wrap"           // bool
	WindowOptionCursorLine     BoolOption   = "cursorline"     // bool
	WindowOptionCursorColumn   BoolOption   = "cursorcolumn"   // bool
	WindowOptionSignColumn     StringOption = "signcolumn"     // string
	WindowOptionList           BoolOption   = "list"           // bool
	WindowOptionWidth          IntOption    = "winwidth"       // int
	WindowOptionColorColumn    StringOption = "colorcolumn"    // string
	WindowOptionSpell          BoolOption   = "spell"          // bool
)

Variables

This section is empty.

Functions

func Register

func Register(p Plugin)

func SetUUID added in v0.3.0

func SetUUID(u string)

func SetupLogging

func SetupLogging() func()

Types

type Api

type Api struct {
	Out     Out
	Global  Global
	Handler Handler

	Renderer Renderer
	// contains filtered or unexported fields
}

func NewApi

func NewApi() *Api

func (*Api) BufferById

func (api *Api) BufferById(id int) (*Buffer, bool)

func (*Api) CreateSplitBuffer

func (api *Api) CreateSplitBuffer(width int, mods ...SplitModifier) *Buffer

func (*Api) CurrentBuffer

func (api *Api) CurrentBuffer() *Buffer

func (*Api) CurrentTab

func (api *Api) CurrentTab() *Tab

func (*Api) CurrentWindow

func (api *Api) CurrentWindow() *Window

func (*Api) Cwd

func (api *Api) Cwd() string

func (*Api) Execute

func (api *Api) Execute(cmd string) (string, error)

func (*Api) Executef

func (api *Api) Executef(format string, args ...interface{}) (string, error)

func (*Api) FindBuffer

func (api *Api) FindBuffer(fn func(buffer *Buffer) bool) (*Buffer, bool)

func (*Api) FindTab

func (api *Api) FindTab(fn func(tab *Tab) bool) (*Tab, bool)

func (*Api) FindWindow

func (api *Api) FindWindow(fn func(win *Window) bool) (*Window, bool)

func (*Api) Function

func (api *Api) Function(name string, fn interface{})

func (*Api) TabById

func (api *Api) TabById(id int) (*Tab, bool)

func (*Api) WindowById

func (api *Api) WindowById(id int) (*Window, bool)

type BoolOption

type BoolOption string

type Buffer

type Buffer struct {
	Options BufferOptions
	KeyMaps KeyMaps
	Vars    Vars
	// contains filtered or unexported fields
}

func (*Buffer) Close

func (b *Buffer) Close()

func (*Buffer) Exists

func (b *Buffer) Exists() bool

func (*Buffer) Freeze

func (b *Buffer) Freeze()

func (*Buffer) ID

func (b *Buffer) ID() int

func (*Buffer) IsCurrent

func (b *Buffer) IsCurrent() bool

func (*Buffer) IsEmpty

func (b *Buffer) IsEmpty() bool

func (*Buffer) Lines

func (b *Buffer) Lines() []string

func (*Buffer) On

func (b *Buffer) On(event string, fn func())

func (*Buffer) Path

func (b *Buffer) Path() string

func (*Buffer) SetLines

func (b *Buffer) SetLines(lines []string)

func (*Buffer) SetTitle

func (b *Buffer) SetTitle(title string)

func (*Buffer) SetVarBool

func (b *Buffer) SetVarBool(name string, value bool)

func (*Buffer) SetVarString

func (b *Buffer) SetVarString(name string, value string)

func (*Buffer) Title

func (b *Buffer) Title() string

func (*Buffer) Unfreeze

func (b *Buffer) Unfreeze()

func (*Buffer) VarBool

func (b *Buffer) VarBool(name string) bool

func (*Buffer) VarString

func (b *Buffer) VarString(name string) string

func (*Buffer) Windows

func (b *Buffer) Windows() []*Window

type BufferHiddenValue

type BufferHiddenValue string
const (
	// follow the global 'hidden' option
	BufferHiddenDefault BufferHiddenValue = ""

	// hide the buffer (don't unload it), also when 'hidden' is not set
	BufferHiddenHide BufferHiddenValue = "hide"

	// the buffer, also when 'hidden' is set or using :hide
	BufferHiddenUnload BufferHiddenValue = "unload"

	// the buffer from the buffer list, also when 'hidden' is set or using :hide, like using :bdelete
	BufferHiddenDelete BufferHiddenValue = "delete"

	// out the buffer from the buffer list, also when 'hidden' is set or using :hide, like using :bwipeout
	BufferHiddenWipe BufferHiddenValue = "wipe"
)

type BufferOptions

type BufferOptions struct {
	// contains filtered or unexported fields
}

func (*BufferOptions) FileType

func (o *BufferOptions) FileType() string

func (*BufferOptions) Hidden

func (o *BufferOptions) Hidden() string

func (*BufferOptions) Modifiable

func (o *BufferOptions) Modifiable() bool

func (*BufferOptions) ReadOnly

func (o *BufferOptions) ReadOnly() bool

func (*BufferOptions) SetFileType

func (o *BufferOptions) SetFileType(value string)

func (*BufferOptions) SetHidden

func (o *BufferOptions) SetHidden(value BufferHiddenValue)

func (*BufferOptions) SetListed

func (o *BufferOptions) SetListed(value bool)

func (*BufferOptions) SetModifiable

func (o *BufferOptions) SetModifiable(value bool)

func (*BufferOptions) SetReadOnly

func (o *BufferOptions) SetReadOnly(value bool)

func (*BufferOptions) SetSwapFile

func (o *BufferOptions) SetSwapFile(value bool)

func (*BufferOptions) SetType

func (o *BufferOptions) SetType(value BufferTypeValue)

func (*BufferOptions) SwapFile

func (o *BufferOptions) SwapFile() bool

func (*BufferOptions) SwapListed

func (o *BufferOptions) SwapListed() bool

func (*BufferOptions) Type

func (o *BufferOptions) Type() string

type BufferTypeValue

type BufferTypeValue string
const (

	// normal buffer
	BufferTypeDefault BufferTypeValue = ""

	// buffer will always be written with |BufWriteCmd|s
	BufferTypeAcwrite BufferTypeValue = "acwrite"

	// help buffer (do not set this manually)
	BufferTypeHelp BufferTypeValue = "help"

	// buffer is not related to a file, will not be written
	BufferTypeNoFile BufferTypeValue = "nofile"

	// buffer will not be written
	BufferTypeNowrite BufferTypeValue = "nowrite"

	// list of errors |:cwindow| or locations |:lwindow
	BufferTypeQuickFix BufferTypeValue = "quickfix"

	// |terminal-emulator| buffer
	BufferTypeTerminal BufferTypeValue = "terminal"
)

type Cursor

type Cursor [2]int

func (*Cursor) SetX

func (c *Cursor) SetX(x int)

func (*Cursor) SetY

func (c *Cursor) SetY(y int)

func (Cursor) X

func (c Cursor) X() int

func (Cursor) Y

func (c Cursor) Y() int

type Global

type Global struct {
	Vars    Vars
	Options GlobalOptions
	KeyMaps KeyMaps
	// contains filtered or unexported fields
}

func (*Global) On

func (g *Global) On(event string, fn func())

type GlobalClipboardValue

type GlobalClipboardValue string
const (
	GlobalClipboardNone GlobalClipboardValue = ""
	// When included, Vim will use the clipboard register '*'
	// for all yank, delete, change and put operations which
	// would normally go to the unnamed register.  When a
	// register is explicitly specified, it will always be
	// used regardless of whether "unnamed" is in 'clipboard'
	// or not.  The clipboard register can always be
	// explicitly accessed using the "* notation.  Also see
	// |clipboard|.
	GlobalClipboardUnnamed GlobalClipboardValue = "unnamed"

	// A variant of the "unnamed" flag which uses the
	// clipboard register '+' (|quoteplus|) instead of
	// register '*' for all yank, delete, change and put
	// operations which would normally go to the unnamed
	// register.  When "unnamed" is also included to the
	// option, yank and delete operations (but not put)
	// will additionally copy the text into register
	// '*'. See |clipboard|.
	GlobalClipboardUnnamedPlus GlobalClipboardValue = "unnamedplus"
)

type GlobalOptions

type GlobalOptions struct {
	// contains filtered or unexported fields
}

func (GlobalOptions) Clipboard

func (o GlobalOptions) Clipboard() GlobalClipboardValue

func (GlobalOptions) OperatorFunc

func (o GlobalOptions) OperatorFunc() string

func (GlobalOptions) Selection

func (o GlobalOptions) Selection() GlobalSelectionValue

func (GlobalOptions) SetClipboard

func (o GlobalOptions) SetClipboard(value GlobalClipboardValue)

func (GlobalOptions) SetOperatorFunc

func (o GlobalOptions) SetOperatorFunc(fn string)

func (GlobalOptions) SetSelection

func (o GlobalOptions) SetSelection(value GlobalSelectionValue)

type GlobalSelectionValue

type GlobalSelectionValue string
const (
	GlobalSelectionOld       GlobalSelectionValue = "old"
	GlobalSelectionInclusive GlobalSelectionValue = "inclusive"
	GlobalSelectionExclusive GlobalSelectionValue = "exclusive"
)

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func (*Handler) Create

func (h *Handler) Create(fn interface{}) *HandlerFunc

func (*Handler) SetOperatorFunc

func (h *Handler) SetOperatorFunc(fn func(args []interface{})) disposables.Disposable

type HandlerFunc

type HandlerFunc struct {
	// contains filtered or unexported fields
}

func (*HandlerFunc) Dispose

func (h *HandlerFunc) Dispose()

func (*HandlerFunc) String

func (h *HandlerFunc) String() string

func (*HandlerFunc) StringWithEvals

func (h *HandlerFunc) StringWithEvals(evals ...string) string

type Initializable

type Initializable interface {
	Initialize(*Buffer, *Api)
}

type IntOption

type IntOption string

type KeyMaps

type KeyMaps struct {
	// contains filtered or unexported fields
}

func (KeyMaps) Delete

func (m KeyMaps) Delete(mode Mode, keys string)

func (KeyMaps) Disable

func (m KeyMaps) Disable(mode Mode, keys string)

func (KeyMaps) Set

func (m KeyMaps) Set(mode Mode, keys string, eval string)

func (*KeyMaps) SetFunc

func (m *KeyMaps) SetFunc(mode Mode, keys string, fn func())

func (*KeyMaps) SetTextAction

func (m *KeyMaps) SetTextAction(keys string, fn func(string) string)

func (KeyMaps) Setf

func (m KeyMaps) Setf(mode Mode, keys string, eval string, args ...interface{})

type Mode

type Mode string
const (
	ModeAll Mode = ""

	// n	Normal
	ModeNormal Mode = "n"

	// v	Visual by character
	ModeVisual Mode = "v"

	// V	Visual by line
	ModeVisualLine Mode = "V"

	// i	Insert
	ModeInsert Mode = "i"

	// R	Replace |R|
	ModeReplace Mode = "R"

	// t	Terminal mode: keys go to the job
	ModeTerminal Mode = "t"
)

type Out

type Out struct {
	// contains filtered or unexported fields
}

func (*Out) Error

func (o *Out) Error(str string)

func (*Out) Errorf

func (o *Out) Errorf(format string, args ...interface{})

func (*Out) Message

func (o *Out) Message(str string)

func (*Out) Messagef

func (o *Out) Messagef(format string, args ...interface{})

func (*Out) Print

func (o *Out) Print(str string)

func (*Out) Printf

func (o *Out) Printf(format string, args ...interface{})

type Plugin

type Plugin interface {
	Activate(api *Api)
}

type RegisterApi

type RegisterApi interface {
	Function(name string, fn interface{})
}

type Registerable

type Registerable interface {
	Register(api RegisterApi)
}

type Renderer

type Renderer struct {
}

func (*Renderer) Attach

func (r *Renderer) Attach(b *Buffer, view View)

type SplitModifier

type SplitModifier int
const (
	SplitVertical SplitModifier = iota
	SplitHorizontal
	SplitTopLeft
	SplitBottomRight
)

func (SplitModifier) String

func (s SplitModifier) String() string

type StringOption

type StringOption string
const (
	GlobalOperatorFunc StringOption = "operatorfunc"
	GlobalSelection    StringOption = "selection"
	GlobalClipboard    StringOption = "clipboard"
)

type Tab

type Tab struct {
	Vars Vars
	// contains filtered or unexported fields
}

func (*Tab) Close

func (t *Tab) Close(force bool)

func (*Tab) Exists

func (tab *Tab) Exists() bool

func (*Tab) FindWindow

func (t *Tab) FindWindow(fn func(window *Window) bool) (*Window, bool)

func (*Tab) HasBuffer

func (t *Tab) HasBuffer(b Buffer) bool

func (*Tab) HasBufferID

func (t *Tab) HasBufferID(bID int) bool

func (*Tab) ID

func (t *Tab) ID() int

func (*Tab) IsCurrent

func (b *Tab) IsCurrent() bool

func (*Tab) Windows

func (t *Tab) Windows() []*Window

type Updatable

type Updatable interface {
	Update()
}

type Vars

type Vars struct {
	// contains filtered or unexported fields
}

func (*Vars) Bool

func (v *Vars) Bool(name string) bool

func (*Vars) Delete

func (v *Vars) Delete(name string)

func (*Vars) Int

func (v *Vars) Int(name string) int

func (*Vars) SetBool

func (v *Vars) SetBool(name string, value bool)

func (*Vars) SetInt

func (v *Vars) SetInt(name string, value int)

func (*Vars) SetString

func (v *Vars) SetString(name string, value string)

func (*Vars) String

func (v *Vars) String(name string) string

type View

type View interface {
	FileType() string
	Attach(ViewRenderer)
	Lines() []string
}

type ViewRenderer

type ViewRenderer struct {
	// contains filtered or unexported fields
}

func (*ViewRenderer) ShouldRender

func (r *ViewRenderer) ShouldRender()

type Window

type Window struct {
	Vars    Vars
	Options WindowOptions
	// contains filtered or unexported fields
}

func (*Window) Buffer

func (w *Window) Buffer() *Buffer

func (*Window) Close

func (w *Window) Close(force bool)

func (*Window) Cursor

func (w *Window) Cursor() Cursor

func (*Window) Exists

func (win *Window) Exists() bool

func (*Window) Focus

func (w *Window) Focus()

func (*Window) ID

func (w *Window) ID() int

func (*Window) IsCurrent

func (b *Window) IsCurrent() bool

func (*Window) SetCursor

func (w *Window) SetCursor(c Cursor)

func (*Window) SetVarBool

func (b *Window) SetVarBool(name string, value bool)

func (*Window) SetVarString

func (b *Window) SetVarString(name string, value string)

func (*Window) Tab

func (w *Window) Tab() *Tab

func (*Window) VarBool

func (b *Window) VarBool(name string) bool

func (*Window) VarString

func (b *Window) VarString(name string) string

type WindowFoldMethodValue

type WindowFoldMethodValue string
const (
	// Folds are created manually.
	WindowFoldMethodManual WindowFoldMethodValue = "manual"

	// Lines with equal indent form a fold.
	WindowFoldMethodIndent WindowFoldMethodValue = "indent"

	// 'foldexpr' gives the fold level of a line.
	WindowFoldMethodExpr WindowFoldMethodValue = "expr"

	// Markers are used to specify folds.
	WindowFoldMethodMarker WindowFoldMethodValue = "marker"

	// Syntax highlighting items specify folds.
	WindowFoldMethodSyntax WindowFoldMethodValue = "syntax"

	// Fold text that is not changed.
	WindowFoldMethodDiff WindowFoldMethodValue = "diff"
)

type WindowOptions

type WindowOptions struct {
	// contains filtered or unexported fields
}

func (*WindowOptions) ColorColumn

func (o *WindowOptions) ColorColumn() string

func (*WindowOptions) CursorColumn

func (o *WindowOptions) CursorColumn() bool

func (*WindowOptions) CursorLine

func (o *WindowOptions) CursorLine() bool

func (*WindowOptions) FixWidth

func (o *WindowOptions) FixWidth() bool

func (*WindowOptions) FoldColumn

func (o *WindowOptions) FoldColumn() int

func (*WindowOptions) FoldEnable

func (o *WindowOptions) FoldEnable() bool

func (*WindowOptions) FoldMethod

func (o *WindowOptions) FoldMethod() WindowFoldMethodValue

func (*WindowOptions) List

func (o *WindowOptions) List() bool

func (*WindowOptions) Number

func (o *WindowOptions) Number() bool

func (*WindowOptions) RelativeNumber

func (o *WindowOptions) RelativeNumber() bool

func (*WindowOptions) SetCursorColumn

func (o *WindowOptions) SetCursorColumn(value bool)

func (*WindowOptions) SetCursorLine

func (o *WindowOptions) SetCursorLine(value bool)

func (*WindowOptions) SetFixWidth

func (o *WindowOptions) SetFixWidth(value bool)

func (*WindowOptions) SetFoldColumn

func (o *WindowOptions) SetFoldColumn(value int)

func (*WindowOptions) SetFoldEnable

func (o *WindowOptions) SetFoldEnable(value bool)

func (*WindowOptions) SetFoldMethod

func (o *WindowOptions) SetFoldMethod(value WindowFoldMethodValue)

func (*WindowOptions) SetList

func (o *WindowOptions) SetList(value bool)

func (*WindowOptions) SetNumber

func (o *WindowOptions) SetNumber(value bool)

func (*WindowOptions) SetRelativeNumber

func (o *WindowOptions) SetRelativeNumber(value bool)

func (*WindowOptions) SetSignColumn

func (o *WindowOptions) SetSignColumn(value WindowSignColumnValue, number ...int)

When and how to draw the signcolumn.

func (*WindowOptions) SetSpell

func (o *WindowOptions) SetSpell(value bool)

func (*WindowOptions) SetWidth

func (o *WindowOptions) SetWidth(value int)

func (*WindowOptions) SetWrap

func (o *WindowOptions) SetWrap(value bool)

func (*WindowOptions) SignColumn

func (o *WindowOptions) SignColumn() WindowSignColumnValue

When and how to draw the signcolumn.

func (*WindowOptions) Spell

func (o *WindowOptions) Spell() bool

func (*WindowOptions) Width

func (o *WindowOptions) Width() int

func (*WindowOptions) Wrap

func (o *WindowOptions) Wrap() bool

type WindowSignColumnValue

type WindowSignColumnValue string
const (
	WindowSignColumnAuto WindowSignColumnValue = "auto"
	WindowSignColumnNo   WindowSignColumnValue = "no"
	WindowSignColumnYes  WindowSignColumnValue = "yes"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL