diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-10 19:38:06 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-10 19:38:06 +0200 |
| commit | 526c3f0ed139bbacaa415154a272d96279d26239 (patch) | |
| tree | 3754e0b969b47761583ec408e02ea45a7185ad71 /cmd/hexai-lsp-server | |
| parent | 07115c22a74dd5311f70434029791d5346e627c4 (diff) | |
task 80330fc4: deduplicate default config path helper
Diffstat (limited to 'cmd/hexai-lsp-server')
| -rw-r--r-- | cmd/hexai-lsp-server/main.go | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/cmd/hexai-lsp-server/main.go b/cmd/hexai-lsp-server/main.go index e3e458d..6577bc2 100644 --- a/cmd/hexai-lsp-server/main.go +++ b/cmd/hexai-lsp-server/main.go @@ -17,7 +17,7 @@ import ( func main() { defaultLog := defaultLogPath() logPath := flag.String("log", defaultLog, "path to log file (optional)") - defaultCfg := defaultConfigPath() + defaultCfg := appconfig.DefaultConfigPath() configPath := flag.String("config", "", fmt.Sprintf("path to config file (default: %s)", defaultCfg)) showVersion := flag.Bool("version", false, "print version and exit") flag.Parse() @@ -32,14 +32,6 @@ func main() { } } -func defaultConfigPath() string { - path, err := appconfig.ConfigPath() - if err != nil { - return "$XDG_CONFIG_HOME/hexai/config.toml" - } - return path -} - // defaultLogPath returns the default LSP log file path in the state directory. // Falls back to the system temp directory if the state directory is unavailable. func defaultLogPath() string { |
