diff options
| author | Paul Buetow <paul@buetow.org> | 2025-09-28 17:30:44 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-09-28 17:30:44 +0300 |
| commit | 0761409497041c752086b9aded08cf9e32e30fd2 (patch) | |
| tree | e62721bc119d4ae435d2609292faea06a68244a4 /cmd/hexai-lsp/main.go | |
| parent | 0ac2d186e84f77d73d924e2c0ce975a17c3a8078 (diff) | |
Add --config flag support across CLI, LSP, and tmux tools
Diffstat (limited to 'cmd/hexai-lsp/main.go')
| -rw-r--r-- | cmd/hexai-lsp/main.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/hexai-lsp/main.go b/cmd/hexai-lsp/main.go index f2cad6d..9764f0b 100644 --- a/cmd/hexai-lsp/main.go +++ b/cmd/hexai-lsp/main.go @@ -5,6 +5,7 @@ import ( "flag" "log" "os" + "strings" "codeberg.org/snonux/hexai/internal" "codeberg.org/snonux/hexai/internal/hexailsp" @@ -12,6 +13,7 @@ import ( func main() { logPath := flag.String("log", "/tmp/hexai-lsp.log", "path to log file (optional)") + configPath := flag.String("config", "", "path to config file") showVersion := flag.Bool("version", false, "print version and exit") flag.Parse() if *showVersion { @@ -19,7 +21,8 @@ func main() { return } - if err := hexailsp.Run(*logPath, os.Stdin, os.Stdout, os.Stderr); err != nil { + path := strings.TrimSpace(*configPath) + if err := hexailsp.RunWithConfig(*logPath, path, os.Stdin, os.Stdout, os.Stderr); err != nil { log.Fatalf("server error: %v", err) } } |
