From 526c3f0ed139bbacaa415154a272d96279d26239 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 10 Mar 2026 19:38:06 +0200 Subject: task 80330fc4: deduplicate default config path helper --- cmd/hexai-lsp-server/main.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'cmd/hexai-lsp-server') 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 { -- cgit v1.2.3