Skip to content

Commit e467ad0

Browse files
committed
nvim: add UIOptions and Version field to APIInfo
1 parent 59f1338 commit e467ad0

File tree

1 file changed

+31
-5
lines changed

1 file changed

+31
-5
lines changed

nvim/apitool.go

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ type APIInfo struct {
3131
ErrorTypes map[string]ErrorType `msgpack:"error_types"`
3232
Types map[string]ExtensionType `msgpack:"types"`
3333
Functions []*Function `msgpack:"functions"`
34+
UIOptions UIOptions `msgpack:"ui_options"`
35+
Version Version `msgpack:"version"`
3436
}
3537

3638
type ErrorType struct {
@@ -58,15 +60,39 @@ type Field struct {
5860
Name string
5961
}
6062

63+
type UIOptions []string
64+
65+
type Version struct {
66+
APICompatible int `msgpack:"api_compatible"`
67+
APILevel int `msgpack:"api_level"`
68+
APIPrerelease bool `msgpack:"api_prerelease"`
69+
Major int `msgpack:"major"`
70+
Minor int `msgpack:"minor"`
71+
Patch int `msgpack:"patch"`
72+
}
73+
6174
var errorTypes = map[string]ErrorType{
62-
"Exception": {ID: 0},
63-
"Validation": {ID: 1},
75+
"Exception": {
76+
ID: 0,
77+
},
78+
"Validation": {
79+
ID: 1,
80+
},
6481
}
6582

6683
var extensionTypes = map[string]ExtensionType{
67-
"Buffer": {ID: 0, Doc: `// Buffer represents a Nvim buffer.`},
68-
"Window": {ID: 1, Doc: `// Window represents a Nvim window.`},
69-
"Tabpage": {ID: 2, Doc: `// Tabpage represents a Nvim tabpage.`},
84+
"Buffer": {
85+
ID: 0,
86+
Doc: `// Buffer represents a Nvim buffer.`,
87+
},
88+
"Window": {
89+
ID: 1,
90+
Doc: `// Window represents a Nvim window.`,
91+
},
92+
"Tabpage": {
93+
ID: 2,
94+
Doc: `// Tabpage represents a Nvim tabpage.`,
95+
},
7096
}
7197

7298
func formatNode(fset *token.FileSet, node interface{}) string {

0 commit comments

Comments
 (0)