feat: add directive auto complete and documents #816

This commit is contained in:
Jacky 2025-01-21 10:42:11 +08:00
parent 830ed28148
commit 5911462f90
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
25 changed files with 4288 additions and 306 deletions

View file

@ -0,0 +1,22 @@
package nginx
import (
_ "embed"
"encoding/json"
)
//go:embed nginx_directives.json
var directivesJson []byte
type Directive struct {
Links []string `json:"links"`
}
func GetDirectives() (map[string]Directive, error) {
var directives map[string]Directive
err := json.Unmarshal(directivesJson, &directives)
if err != nil {
return nil, err
}
return directives, nil
}

File diff suppressed because it is too large Load diff