diff options
| author | Paul Buetow <paul@buetow.org> | 2025-09-28 17:49:54 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-09-28 17:50:59 +0300 |
| commit | 9cae3b4218184d32033498c6b4ddc43959046cdf (patch) | |
| tree | 204a66ecf96ee33f9abc87677a0b4cddf3caf641 /internal/hexailsp | |
| parent | 0761409497041c752086b9aded08cf9e32e30fd2 (diff) | |
Propagate --config overrides through CLI tools and LSP reloads
Diffstat (limited to 'internal/hexailsp')
| -rw-r--r-- | internal/hexailsp/run.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/hexailsp/run.go b/internal/hexailsp/run.go index 750e544..0e383ac 100644 --- a/internal/hexailsp/run.go +++ b/internal/hexailsp/run.go @@ -65,7 +65,7 @@ func RunWithFactory(logPath string, configPath string, stdin io.Reader, stdout i store := runtimeconfig.New(cfg) logContext := strings.TrimSpace(logPath) != "" loadOpts := appconfig.LoadOptions{ConfigPath: strings.TrimSpace(configPath)} - opts := makeServerOptions(cfg, logContext, client) + opts := makeServerOptions(cfg, logContext, client, loadOpts) opts.ConfigLoadOptions = loadOpts opts.ConfigStore = store server := factory(stdin, stdout, logger, opts) @@ -79,8 +79,7 @@ func RunWithFactory(logPath string, configPath string, stdin io.Reader, stdout i if newClient := buildClientIfNil(updated, nil); newClient != nil { client = newClient } - opts := makeServerOptions(updated, logContext, client) - opts.ConfigLoadOptions = loadOpts + opts := makeServerOptions(updated, logContext, client, loadOpts) opts.ConfigStore = store configurable.ApplyOptions(opts) }) @@ -144,7 +143,7 @@ func ensureFactory(factory ServerFactory) ServerFactory { } } -func makeServerOptions(cfg appconfig.App, logContext bool, client llm.Client) lsp.ServerOptions { +func makeServerOptions(cfg appconfig.App, logContext bool, client llm.Client, loadOpts appconfig.LoadOptions) lsp.ServerOptions { // Map custom actions from appconfig to lsp type var customs []lsp.CustomAction if len(cfg.CustomActions) > 0 { @@ -162,6 +161,7 @@ func makeServerOptions(cfg appconfig.App, logContext bool, client llm.Client) ls } } return lsp.ServerOptions{ + ConfigLoadOptions: loadOpts, LogContext: logContext, ConfigStore: nil, Config: &cfg, |
