Add dircounts to setlocal options (#1920)

* Remove plural from setlocal variable names

* Add `dircounts` for `setlocal`

* Update documentation

* Fix failing test
This commit is contained in:
Joe Lim authored and GitHub committed 2025-02-19 10:43:15 +11:00
1 parent b087bf7d80
commit f9813744f7
9 files changed
+58 -45

No files matched your search

+1 -1
View File
@@ -136,7 +136,7 @@ func getLocalOptWords(localOpts any) (localOptWords []string) {
t := reflect.TypeOf(localOpts)
for i := 0; i < t.NumField(); i++ {
field := t.Field(i)
name := strings.TrimSuffix(field.Name, "s")
name := field.Name
if field.Type.Kind() != reflect.Map {
continue
}