From 0e23567e1723f4d278f5f31bbbe79d142bb31731 Mon Sep 17 00:00:00 2001 From: Joseph Kato Date: Wed, 22 Jan 2025 15:38:19 -0800 Subject: [PATCH] refactor: use default location when `dicpath` is not set --- internal/check/spelling.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/check/spelling.go b/internal/check/spelling.go index 37eab753..ad4238e3 100644 --- a/internal/check/spelling.go +++ b/internal/check/spelling.go @@ -249,6 +249,9 @@ func makeSpeller(s *Spelling, cfg *core.Config, rulePath string) (*spell.Checker if !found { return nil, errors.New("unable to resolve dicpath") } + } else { + options = append(options, spell.WithPath( + filepath.Join(cfg.StylesPath(), core.DictDir))) } if len(s.Dictionaries) > 0 {