-- import "github.com/metaleap/zentient"
var (
Strf = fmt.Sprintf
Lang struct {
InitErr error
ID string
Title string
Live bool
Misc struct {
BacktickStrings bool
}
SrcMod ISrcMod
SrcIntel ISrcIntel
Diag IDiag
Extras IExtras
PkgIntel IPkgIntel
Caddies []*Caddy
Settings ISettings
Tooling ITooling
Workspace IWorkspace
Pages IPages
}
Prog struct {
Cfg Config
Name string
Dir struct {
Cache string
Config string
}
}
)
func BadMsg(what string, which string) string
func BadPanic(what string, which string)
func CaddyBuildOnDone(failed map[string]bool, skipped map[string]bool, all []string, timeTaken time.Duration)
func CaddyBuildOnRunning(numJobs int, cur int, all string)
func Init() (err error)
func InitAndServe(onPreInit func() error, onPostInit func())
func PrettifyPathsIn(s string) string
func SendNotificationMessageToClient(level DiagSeverity, message string) (err error)
func Serve() (err error)
func ToolGonePanic(missingToolName string)
func ToolsMsgGone(missingToolName string) string
func ToolsMsgMore(missingToolName string) string
type BuildProgress struct {
NumJobs int
StartTime time.Time
Failed map[string]bool
Skipped map[string]bool
PkgNames []string
}
func NewBuildProgress(numJobs int) *BuildProgress
func (me *BuildProgress) AddPkgName(pkgName string)
func (me *BuildProgress) OnDone()
func (me *BuildProgress) OnJob(i int)
func (me *BuildProgress) String() string
type Caddy struct {
ID string `json:",omitempty"`
LangID string `json:",omitempty"`
Icon string
Title string `json:",omitempty"`
Status struct {
Flag CaddyStatus
Desc string `json:",omitempty"`
}
Details string `json:",omitempty"`
UxActionID string `json:",omitempty"`
ShowTitle bool `json:",omitempty"`
ShouldReRunWhenNextDone bool `json:"-"`
OnReady func() `json:"-"`
}
func (me *Caddy) IsPendingOrBusy() bool
func (me *Caddy) IsReady() bool
func (me *Caddy) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *Caddy) OnStatusChanged()
func (me *Caddy) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type CaddyStatus uint8
const (
CADDY_PENDING CaddyStatus = iota
CADDY_ERROR
CADDY_BUSY
CADDY_GOOD
)
func (me CaddyStatus) String() (r string)
String implements the Go standard library's fmt.Stringer
interface.
type Completion uint8
const (
CMPL_TEXT Completion = iota
CMPL_METHOD
CMPL_FUNCTION
CMPL_CONSTRUCTOR
CMPL_FIELD
CMPL_VARIABLE
CMPL_CLASS
CMPL_INTERFACE
CMPL_MODULE
CMPL_PROPERTY
CMPL_UNIT
CMPL_VALUE
CMPL_ENUM
CMPL_KEYWORD
CMPL_SNIPPET
CMPL_COLOR
CMPL_FILE
CMPL_REFERENCE
CMPL_FOLDER
CMPL_ENUMMEMBER
CMPL_CONSTANT
CMPL_STRUCT
CMPL_EVENT
CMPL_OPERATOR
CMPL_TYPEPARAMETER
)
func (me Completion) String() (r string)
String implements the Go standard library's fmt.Stringer
interface.
type Config struct {
Internal map[string]interface{} `json:",omitempty"`
FormatterName string `json:",omitempty"`
FormatterProg string `json:",omitempty"`
AutoDiags []string `json:",omitempty"`
}
func (me *Config) Save() (err error)
type DiagBase struct {
Impl IDiag
}
func (*DiagBase) FixerUppers() []FixerUpper
func (me *DiagBase) Init()
func (me *DiagBase) MenuCategory() string
func (me *DiagBase) NewDiagItemFrom(srcRef *udev.SrcMsg, toolName string, fallbackFilePath func() string) (di *DiagItem)
func (me *DiagBase) UpdateLintDiagsIfAndAsNeeded(workspaceFiles WorkspaceFiles, autos bool, onlyFilePaths ...string)
func (me *DiagBase) UpdateProbDiagsAsNeeded(workspaceFiles WorkspaceFiles, writtenFiles []string)
type DiagBuildJobs []*DiagJobBuild
func (me DiagBuildJobs) Len() int
func (me DiagBuildJobs) Less(i int, j int) bool
func (me DiagBuildJobs) Swap(i int, j int)
type DiagFixUps struct {
FilePath string
Desc map[string][]string
Edits SrcModEdits
Dropped []SrcModEdit
}
func (me *DiagFixUps) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *DiagFixUps) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type DiagItem struct {
Cat string `json:",omitempty"`
Loc SrcLoc
Msg string
Rel []SrcLens `json:",omitempty"`
SrcActions []EditorAction `json:",omitempty"`
StickyForce bool `json:"-"`
StickyAuto bool `json:"Sticky,omitempty"`
Tags []int `json:"Tags,omitempty"`
}
func (me *DiagItem) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *DiagItem) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type DiagItems []*DiagItem
func (me DiagItems) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *DiagItems) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type DiagItemsBy map[string]DiagItems
func (me DiagItemsBy) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *DiagItemsBy) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type DiagJob struct {
AffectedFilePaths []string
Target IDiagJobTarget
}
func (me *DiagJob) String() string
type DiagJobBuild struct {
DiagJob
TargetCmp func(IDiagJobTarget, IDiagJobTarget) bool
Succeeded bool
}
func (me *DiagJobBuild) IsSortedPriorTo(cmp interface{}) bool
type DiagJobLint struct {
DiagJob
Tool *Tool
}
func (me *DiagJobLint) Yield(diag *DiagItem)
type DiagLintJobs []*DiagJobLint
type DiagSeverity int
const (
DIAG_SEV_ERR DiagSeverity = iota
DIAG_SEV_WARN
DIAG_SEV_INFO
DIAG_SEV_HINT
)
func (me DiagSeverity) String() (r string)
String implements the Go standard library's fmt.Stringer
interface.
type Diags struct {
All DiagItemsBy
FixUps []*DiagFixUps
LangID string
}
func (me *Diags) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *Diags) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type EditorAction struct {
Title string `json:"title"`
Cmd string `json:"command"`
Hint string `json:"tooltip,omitempty"`
Arguments []string `json:"arguments,omitempty"`
}
func (me *EditorAction) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *EditorAction) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type Extras struct {
SrcIntels
Items []*ExtrasItem
Warns []string `json:",omitempty"`
Desc string `json:",omitempty"`
Url string `json:",omitempty"`
}
func (me *Extras) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *Extras) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type ExtrasBase struct {
Impl IExtras
}
func (*ExtrasBase) Init()
type ExtrasItem struct {
ID string `json:"id"`
Label string `json:"label"`
Desc string `json:"description"`
Detail string `json:"detail,omitempty"`
QueryArg string `json:"arg,omitempty"`
FilePos string `json:"fPos,omitempty"`
}
func (me *ExtrasItem) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *ExtrasItem) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type FixUp struct {
Name string
Items []string
Edits SrcModEdits
}
type FixerUpper func(*DiagItem) *FixUp
type IDiag interface {
IDiagBuild
IDiagLint
IMenuItems
// contains filtered or unexported methods
}
type IDiagBuild interface {
FixerUppers() []FixerUpper
PrepProbJobs(WorkspaceFiles, []string) DiagBuildJobs
RunProbJobs(DiagBuildJobs, WorkspaceFiles) DiagItems
UpdateProbDiagsAsNeeded(WorkspaceFiles, []string)
}
type IDiagJobTarget interface {
}
type IDiagLint interface {
KnownLinters() Tools
PrepLintJobs(WorkspaceFiles, Tools, []string) DiagLintJobs
RunLintJob(*DiagJobLint, WorkspaceFiles)
UpdateLintDiagsIfAndAsNeeded(WorkspaceFiles, bool, ...string)
}
type IExtras interface {
ListIntelExtras() []*ExtrasItem
ListQueryExtras() []*ExtrasItem
RunIntelExtra(*SrcLens, string, string, *Extras)
RunQueryExtra(*SrcLens, string, string, *Extras)
// contains filtered or unexported methods
}
type IList interface {
UnfilteredDesc() string
Count(ListFilters) int
FilterByID(string) *ListFilter
Filters() []*ListFilter
List(ListFilters) ListItems
}
type IListItem interface {
ISortable
}
type IListMenu interface {
IList
IMenuItems
ListItemToMenuItem(IListItem) *MenuItem
// contains filtered or unexported methods
}
type IMenuItems interface {
MenuCategory() string
// contains filtered or unexported methods
}
type IObjSnap interface {
ObjSnapPrefix() string
ObjSnap(string) interface{}
}
type IPages interface {
PageBodyInnerHtml(string, []string, url.Values, string) string
// contains filtered or unexported methods
}
type IPkgIntel interface {
IListMenu
IObjSnap
Pkgs() PkgInfos
}
type ISettings interface {
IMenuItems
KnownSettings() Settings
}
type ISortable interface {
IsSortedPriorTo(interface{}) bool
}
type ISrcIntel interface {
CanIntelForCmplOrHover(*SrcIntelLex) bool
ComplDetails(*SrcLens, string) *SrcIntelCompl
ComplItems(*SrcLens) SrcIntelCompls
ComplItemsShouldSort(*SrcLens) bool
DefSym(*SrcLens) SrcLocs
DefType(*SrcLens) SrcLocs
DefImpl(*SrcLens) SrcLocs
Highlights(*SrcLens, string) SrcLocs
Hovers(*SrcLens) []SrcInfoTip
Annotactions(*SrcLens) []*SrcAnnotaction
References(*SrcLens, bool) SrcLocs
Signature(*SrcLens) *SrcIntelSigHelp
Symbols(*SrcLens, string, bool) SrcLenses
// contains filtered or unexported methods
}
type ISrcMod interface {
IMenuItems
CodeActions(*SrcLens) []EditorAction
DoesStdoutWithFilePathArg(*Tool) bool
KnownFormatters() Tools
RunRenamer(*SrcLens, string) SrcLenses
RunFormatter(*Tool, string, *SrcFormattingClientPrefs, string, string) (string, string)
}
type ITooling interface {
IMenuItems
KnownTools() Tools
NumInst() int
NumTotal() int
}
type IWorkspace interface {
IObjSnap
json.Marshaler
sync.Locker
Dirs() WorkspaceDirs
Files() WorkspaceFiles
PrettyPath(string, ...string) string
// contains filtered or unexported methods
}
type IpcIDs uint8
const (
IPCID_MENUS_MAIN IpcIDs
IPCID_MENUS_PKGS
IPCID_MENUS_TOOLS
IPCID_OBJ_SNAPSHOT
IPCID_PAGE_HTML
IPCID_CFG_RESETALL
IPCID_CFG_LIST
IPCID_CFG_SET
IPCID_NOTIFY_INFO
IPCID_NOTIFY_WARN
IPCID_NOTIFY_ERR
IPCID_PROJ_CHANGED
IPCID_PROJ_POLLEVTS
IPCID_SRCDIAG_LIST
IPCID_SRCDIAG_RUN_CURFILE
IPCID_SRCDIAG_RUN_OPENFILES
IPCID_SRCDIAG_RUN_ALLFILES
IPCID_SRCDIAG_FORGETALL
IPCID_SRCDIAG_PEEKHIDDEN
IPCID_SRCDIAG_PUB
IPCID_SRCDIAG_AUTO_TOGGLE
IPCID_SRCDIAG_AUTO_ALL
IPCID_SRCDIAG_AUTO_NONE
IPCID_SRCDIAG_STARTED
IPCID_SRCDIAG_FINISHED
IPCID_SRCMOD_FMT_SETDEFMENU
IPCID_SRCMOD_FMT_SETDEFPICK
IPCID_SRCMOD_FMT_RUNONFILE
IPCID_SRCMOD_FMT_RUNONSEL
IPCID_SRCMOD_RENAME
IPCID_SRCMOD_ACTIONS
IPCID_SRCINTEL_HOVER
IPCID_SRCINTEL_SYMS_FILE
IPCID_SRCINTEL_SYMS_PROJ
IPCID_SRCINTEL_CMPL_ITEMS
IPCID_SRCINTEL_CMPL_DETAILS
IPCID_SRCINTEL_HIGHLIGHTS
IPCID_SRCINTEL_ANNS
IPCID_SRCINTEL_SIGNATURE
IPCID_SRCINTEL_REFERENCES
IPCID_SRCINTEL_DEFSYM
IPCID_SRCINTEL_DEFTYPE
IPCID_SRCINTEL_DEFIMPL
IPCID_EXTRAS_INTEL_LIST
IPCID_EXTRAS_INTEL_RUN
IPCID_EXTRAS_QUERY_LIST
IPCID_EXTRAS_QUERY_RUN
)
func (me IpcIDs) String() (r string)
String implements the Go standard library's fmt.Stringer
interface.
func (me IpcIDs) Valid() (r bool)
Valid returns whether the value of this IpcIDs
is between IPCID_MENUS_MAIN
(inclusive) and IPCID_EXTRAS_QUERY_RUN
(inclusive).
type IpcReq struct {
ReqID int64 `json:"ri"`
IpcID IpcIDs `json:"ii"`
IpcArgs interface{} `json:"ia"`
ProjUpd *WorkspaceChanges `json:"projUpd"`
SrcLens *SrcLens `json:"srcLens"`
}
func (me *IpcReq) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *IpcReq) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type IpcResp struct {
IpcID IpcIDs `json:"ii,omitempty"`
ReqID int64 `json:"ri,omitempty"`
ErrMsg string `json:"err,omitempty"`
SrcIntel *SrcIntel `json:"sI,omitempty"`
SrcDiags *Diags `json:"srcDiags,omitempty"`
SrcMods SrcLenses `json:"srcMods,omitempty"`
SrcActions []EditorAction `json:"srcActions,omitempty"`
Extras *Extras `json:"extras,omitempty"`
Menu *MenuResponse `json:"menu,omitempty"`
CaddyUpdate *Caddy `json:"caddy,omitempty"`
Val interface{} `json:"val,omitempty"`
}
func (me *IpcResp) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *IpcResp) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type ListBase struct {
}
func (me *ListBase) Count(all ListFilters) int
func (me *ListBase) FilterByID(id string) *ListFilter
type ListFilter struct {
ID string
Disabled bool
Title string
Desc string
OnSrcLens func(*ListFilter, *SrcLens)
Pred ListItemPredicate
}
type ListFilters map[*ListFilter]bool
type ListItemPredicate func(IListItem) bool
type ListItems []IListItem
func (me ListItems) Len() int
func (me ListItems) Less(i int, j int) bool
func (me ListItems) Swap(i, j int)
type ListMenuBase struct {
ListBase
}
func (me *ListMenuBase) MenuCategory() string
type Menu struct {
Desc string `json:"desc,omitempty"`
TopLevel bool `json:"topLevel,omitempty"`
Items MenuItems `json:"items"`
}
func (me *Menu) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *Menu) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type MenuItem struct {
IpcID IpcIDs `json:"ii,omitempty"`
IpcArgs interface{} `json:"ia,omitempty"`
Category string `json:"c,omitempty"`
Title string `json:"t"`
Desc string `json:"d,omitempty"`
Hint string `json:"h,omitempty"`
Confirm string `json:"q,omitempty"`
}
func (me *MenuItem) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *MenuItem) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type MenuItemArgPrompt struct {
Prompt string `json:"prompt,omitempty"`
Placeholder string `json:"placeHolder,omitempty"`
Value string `json:"value,omitempty"`
}
func (me *MenuItemArgPrompt) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *MenuItemArgPrompt) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type MenuItems []*MenuItem
func (me MenuItems) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *MenuItems) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type MenuResponse struct {
SubMenu *Menu `json:",omitempty"`
WebsiteURL string `json:",omitempty"`
NoteInfo string `json:",omitempty"`
NoteWarn string `json:",omitempty"`
UxActionLabel string `json:",omitempty"`
Refs SrcLocs `json:",omitempty"`
}
func (me *MenuResponse) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *MenuResponse) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type PagesBase struct {
Impl IPages
}
func (*PagesBase) Init()
func (*PagesBase) PageBodyInnerHtml(rawUri string, path []string, query url.Values, fragment string) string
type PkgInfo struct {
Id string
ShortName string
LongName string
Deps func() PkgInfos
Mems func() []*PkgMemInfo
Forget func()
}
type PkgInfos []*PkgInfo
func (me *PkgInfos) Add(pkg *PkgInfo)
func (me PkgInfos) ById(id string) *PkgInfo
type PkgIntelBase struct {
ListMenuBase
Impl IPkgIntel
}
func (me *PkgIntelBase) Init()
func (me *PkgIntelBase) ObjSnapPrefix() string
func (me *PkgIntelBase) Pkgs() PkgInfos
func (me *PkgIntelBase) PkgsAdd(pkg *PkgInfo)
type PkgMemInfo struct {
Kind Symbol
Name string
Desc string
Subs func() []*PkgMemInfo
}
type Setting struct {
Id string
Title string
Desc string
ValCfg interface{}
ValDef interface{}
OnChanging func(newVal interface{}) `json:"-"`
OnChanged func(oldVal interface{}) `json:"-"`
OnReloaded func() `json:"-"`
}
func (me *Setting) Val() interface{}
func (me *Setting) ValBool() (val bool)
func (me *Setting) ValInt() (val int64)
func (me *Setting) ValStr() (val string)
func (me *Setting) ValStrs() (val []string)
func (me *Setting) ValUInt() (val uint64)
type Settings []*Setting
type SettingsBase struct {
Impl ISettings
}
func (me *SettingsBase) Init()
func (me *SettingsBase) KnownSettings() Settings
func (*SettingsBase) MenuCategory() string
type SrcAnnotaction struct {
Range SrcRange
Title string
Desc string `json:",omitempty"`
CmdName string
}
func (me *SrcAnnotaction) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *SrcAnnotaction) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type SrcFormattingClientPrefs struct {
InsertSpaces *bool
TabSize *int
}
type SrcInfoTip struct {
Value string `json:"value"`
// If empty, clients default to 'markdown'
Language string `json:"language,omitempty"`
}
func (me *SrcInfoTip) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *SrcInfoTip) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type SrcIntel struct {
SrcIntels
Sig *SrcIntelSigHelp `json:",omitempty"`
Cmpl SrcIntelCompls `json:",omitempty"`
Syms SrcLenses `json:",omitempty"`
Anns []*SrcAnnotaction `json:",omitempty"`
}
func (me *SrcIntel) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *SrcIntel) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type SrcIntelBase struct {
Impl ISrcIntel
}
func (*SrcIntelBase) Annotactions(*SrcLens) []*SrcAnnotaction
func (*SrcIntelBase) CanIntelForCmplOrHover(*SrcIntelLex) bool
func (*SrcIntelBase) ComplDetails(*SrcLens, string) *SrcIntelCompl
func (*SrcIntelBase) ComplItems(*SrcLens) SrcIntelCompls
func (*SrcIntelBase) ComplItemsShouldSort(*SrcLens) bool
func (*SrcIntelBase) DefImpl(*SrcLens) SrcLocs
func (*SrcIntelBase) DefSym(*SrcLens) SrcLocs
func (*SrcIntelBase) DefType(*SrcLens) SrcLocs
func (*SrcIntelBase) Highlights(*SrcLens, string) SrcLocs
func (*SrcIntelBase) Hovers(*SrcLens) []SrcInfoTip
func (*SrcIntelBase) Init()
func (*SrcIntelBase) References(*SrcLens, bool) SrcLocs
func (*SrcIntelBase) Signature(*SrcLens) *SrcIntelSigHelp
func (*SrcIntelBase) Symbols(*SrcLens, string, bool) SrcLenses
type SrcIntelCompl struct {
Kind Completion `json:"kind"`
Label string `json:"label"`
Documentation *SrcIntelDoc `json:"documentation,omitempty"`
Detail string `json:"detail,omitempty"`
SortText string `json:"sortText,omitempty"`
// FilterText string `json:"filterText,omitempty"`
// InsertText string `json:"insertText,omitempty"`
// CommitChars []string `json:"commitCharacters,omitempty"` // basically in all languages always operator/separator/punctuation (that is, "non-identifier") chars -- no need to send them for each item, for each language -- the client-side will do it
SortPrio int `json:"-"`
}
func (me *SrcIntelCompl) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *SrcIntelCompl) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type SrcIntelCompls []*SrcIntelCompl
func (me SrcIntelCompls) Len() int
func (me SrcIntelCompls) Less(i int, j int) bool
func (me SrcIntelCompls) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me SrcIntelCompls) Swap(i int, j int)
func (me *SrcIntelCompls) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type SrcIntelDoc struct {
Value string `json:"value,omitempty"`
IsTrusted bool `json:"isTrusted,omitempty"`
}
func (me *SrcIntelDoc) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *SrcIntelDoc) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type SrcIntelLex struct {
Ident string
Int string
Float string
Char string
String string
Comment string
Other string
}
type SrcIntelSigHelp struct {
ActiveSignature int `json:"activeSignature"`
ActiveParameter int `json:"activeParameter,omitempty"`
Signatures []SrcIntelSigInfo `json:"signatures,omitempty"`
}
func (me *SrcIntelSigHelp) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *SrcIntelSigHelp) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type SrcIntelSigInfo struct {
Label string `json:"label"`
Documentation SrcIntelDoc `json:"documentation,omitempty"`
Parameters []SrcIntelSigParam `json:"parameters"`
}
func (me *SrcIntelSigInfo) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *SrcIntelSigInfo) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type SrcIntelSigParam struct {
Label string `json:"label"`
Documentation SrcIntelDoc `json:"documentation,omitempty"`
}
func (me *SrcIntelSigParam) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *SrcIntelSigParam) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type SrcIntels struct {
InfoTips []SrcInfoTip `json:",omitempty"`
Refs SrcLocs `json:",omitempty"`
}
func (me *SrcIntels) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *SrcIntels) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type SrcLens struct {
SrcLoc
Txt string `json:"t,omitempty"`
Str string `json:"s,omitempty"`
CrLf bool `json:"l,omitempty"`
}
func (me *SrcLens) Byte0OffsetForPos(pos *SrcPos) int
func (me *SrcLens) ByteOffsetForFirstLineBeginningWith(prefix string) int
func (me *SrcLens) EnsureSrcFull()
func (me *SrcLens) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *SrcLens) Rune1OffsetForByte0Offset(byte0off int) (rune1off int)
func (me *SrcLens) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type SrcLenses []*SrcLens
func (me *SrcLenses) AddFrom(srcRefLoc *udev.SrcMsg, fallbackFilePath func() string) (lens *SrcLens)
func (me SrcLenses) Len() int
func (me SrcLenses) Less(i int, j int) bool
func (me SrcLenses) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me SrcLenses) Swap(i int, j int)
func (me *SrcLenses) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type SrcLoc struct {
Flag int `json:"e"` // don't omitempty, often member of an enum starting at 0
FilePath string `json:"f,omitempty"`
Pos *SrcPos `json:"p,omitempty"`
Range *SrcRange `json:"r,omitempty"`
}
func (me *SrcLoc) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *SrcLoc) SetFilePathAndPosOrRangeFrom(srcRef *udev.SrcMsg, fallbackFilePath func() string)
func (me *SrcLoc) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type SrcLocs []*SrcLoc
func (me *SrcLocs) Add(srcFilePath string, pos *udevlex.Pos) (loc *SrcLoc)
func (me *SrcLocs) AddFrom(srcRefLoc *udev.SrcMsg, fallbackFilePath func() string) (loc *SrcLoc)
func (me SrcLocs) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *SrcLocs) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type SrcModBase struct {
Impl ISrcMod
}
func (*SrcModBase) CodeActions(srcLens *SrcLens) (all []EditorAction)
func (*SrcModBase) DoesStdoutWithFilePathArg(*Tool) bool
func (me *SrcModBase) Init()
func (me *SrcModBase) KnownFormatters() Tools
func (*SrcModBase) MenuCategory() string
func (*SrcModBase) RunFormatter(*Tool, string, *SrcFormattingClientPrefs, string, string) (string, string)
func (*SrcModBase) RunRenamer(srcLens *SrcLens, newName string) (all SrcLenses)
type SrcModEdit struct {
At *SrcRange
Val string // if not empty: inserts if At is pos, replaces if At is range. if empty: deletes if At is range, errors if At is pos.
}
func (me *SrcModEdit) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *SrcModEdit) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type SrcModEdits []SrcModEdit
func (me *SrcModEdits) AddDeleteLine(srcFilePath string, lineAt *SrcPos)
func (me *SrcModEdits) AddInsert(srcFilePath string, atPos func(*SrcLens, *SrcPos) string)
func (me SrcModEdits) Len() int
func (me SrcModEdits) Less(i int, j int) bool
func (me SrcModEdits) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me SrcModEdits) Swap(i int, j int)
func (me *SrcModEdits) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type SrcPos struct {
Ln int `json:"l,omitempty"`
Col int `json:"c,omitempty"`
// rune1 not byte0 offset!
Off int `json:"o,omitempty"`
}
All public fields are 1-based (so 0 means 'missing') and rune-not-byte-based
func (me *SrcPos) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *SrcPos) SetRune1OffFromByte0Off(byte0Off int, src []byte)
func (me *SrcPos) String() string
func (me *SrcPos) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type SrcRange struct {
Start SrcPos `json:"s"`
End SrcPos `json:"e,omitempty"`
}
func (me *SrcRange) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *SrcRange) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type Symbol uint8
const (
SYM_FILE Symbol = iota
SYM_MODULE
SYM_NAMESPACE
SYM_PACKAGE
SYM_CLASS
SYM_METHOD
SYM_PROPERTY
SYM_FIELD
SYM_CONSTRUCTOR
SYM_ENUM
SYM_INTERFACE
SYM_FUNCTION
SYM_VARIABLE
SYM_CONSTANT
SYM_STRING
SYM_NUMBER
SYM_BOOLEAN
SYM_ARRAY
SYM_OBJECT
SYM_KEY
SYM_NULL
SYM_ENUMMEMBER
SYM_STRUCT
SYM_EVENT
SYM_OPERATOR
SYM_TYPEPARAMETER
)
func (me Symbol) String() (r string)
String implements the Go standard library's fmt.Stringer
interface.
type Tool struct {
Cats []ToolCats
Name string
Installed bool
Website string
DiagSev DiagSeverity
}
func (*Tool) Exec(panicOnErr bool, stdin string, cmdName string, cmdArgs []string) (string, string)
func (me *Tool) NotInstalledMessage() string
type ToolCats uint8
const (
TOOLS_CAT_MOD_REN ToolCats
TOOLS_CAT_MOD_FMT
TOOLS_CAT_INTEL_TIPS
TOOLS_CAT_INTEL_SYMS
TOOLS_CAT_INTEL_HIGH
TOOLS_CAT_INTEL_CMPL
TOOLS_CAT_INTEL_NAV
TOOLS_CAT_EXTRAS_QUERY
TOOLS_CAT_DIAGS
TOOLS_CAT_RUNONSAVE
)
func (me ToolCats) String() string
type ToolingBase struct {
Impl ITooling
}
func (me *ToolingBase) CountNumInst(all Tools) (numInst int)
func (me *ToolingBase) Init()
func (me *ToolingBase) KnownToolsFor(cats ...ToolCats) (tools Tools)
func (me *ToolingBase) MenuCategory() string
type Tools []*Tool
type WorkspaceBase struct {
Impl IWorkspace `json:"-"`
// raised before updating zentient-internal workspaceFolders/openedFiles and then requesting new diags
OnBeforeChanges WorkspaceChangesBefore `json:"-"`
// raised after updating zentient-internal workspaceFolders/openedFiles and then requesting new diags
OnAfterChanges WorkspaceChangesAfter `json:"-"`
}
func (me *WorkspaceBase) Dirs() (dirs WorkspaceDirs)
func (me *WorkspaceBase) Files() (files WorkspaceFiles)
func (me *WorkspaceBase) Init()
func (me *WorkspaceBase) Lock()
func (me *WorkspaceBase) MarshalJSON() ([]byte, error)
func (me *WorkspaceBase) ObjSnap(string) interface{}
func (*WorkspaceBase) ObjSnapPrefix() string
func (me *WorkspaceBase) PrettyPath(fsPath string, otherEnvs ...string) string
func (me *WorkspaceBase) Unlock()
type WorkspaceChanges struct {
AddedDirs []string
RemovedDirs []string
OpenedFiles []string
ClosedFiles []string
WrittenFiles []string
LiveFiles map[string]string
}
func (me *WorkspaceChanges) HasDirChanges() bool
func (me *WorkspaceChanges) MarshalJSON() (r []byte, err error)
MarshalJSON implements the Go standard library's encoding/json.Marshaler
interface.
func (me *WorkspaceChanges) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the Go standard library's encoding/json.Unmarshaler
interface.
type WorkspaceChangesAfter func(upd *WorkspaceChanges)
type WorkspaceChangesBefore func(upd *WorkspaceChanges, freshFiles []string, willAutoLint bool)
type WorkspaceDir struct {
Path string
}
type WorkspaceDirs map[string]*WorkspaceDir
type WorkspaceFile struct {
Path string
IsOpen bool `json:",omitempty"`
Diags struct {
AutoLintUpToDate bool
Problems diags
Lintishs diags
}
}
type WorkspaceFiles map[string]*WorkspaceFile
func (me WorkspaceFiles) Has(fpath string) bool
func (me WorkspaceFiles) HasProbDiags(filePath string) (has bool)
func (me WorkspaceFiles) IsOpen(fpath string) bool
func (me WorkspaceFiles) OrFromCurImplIfNil() (ret WorkspaceFiles)