Skip to content

Commit 04135a9

Browse files
committed
nvim: add hiddenAPIs to api_tool
Signed-off-by: Koichi Shiraishi <[email protected]>
1 parent 4785305 commit 04135a9

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

nvim/api_tool.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,11 @@ var compareTemplate = template.Must(template.New("").Funcs(template.FuncMap{
504504
{{- print " {"}} name({{.Name}}){{with .DeprecatedSince}}; deprecatedSince({{.}});{{end}}{{print " }"}}
505505
{{end}}`))
506506

507+
// hiddenAPIs list of hidden API.
508+
var hiddenAPIs = map[string]bool{
509+
"nvim__set_hl_ns": true,
510+
}
511+
507512
// specialAPIs lists API calls that are implemented by hand.
508513
var specialAPIs = map[string]bool{
509514
"nvim_call_atomic": true,
@@ -538,8 +543,11 @@ func compareFunctions(functions []*Function) error {
538543
for i < len(functions) && j < len(info.Functions) {
539544
a := convertToNvimTypes(functions[i])
540545
b := info.Functions[j]
546+
541547
if a.Name < b.Name {
542-
data.Extra = append(data.Extra, a)
548+
if !hiddenAPIs[a.Name] {
549+
data.Extra = append(data.Extra, a)
550+
}
543551
i++
544552
continue
545553
}
@@ -550,6 +558,7 @@ func compareFunctions(functions []*Function) error {
550558
j++
551559
continue
552560
}
561+
553562
equal := len(a.Parameters) == len(b.Parameters) && a.ReturnType == b.ReturnType && a.DeprecatedSince == b.DeprecatedSince
554563
if equal {
555564
for i := range a.Parameters {

0 commit comments

Comments
 (0)