Skip to content

fix(lsp): read env names from the vault env files - #24

Merged
gandarfh merged 4 commits into
mainfrom
feat/env-names-from-vault
Jun 12, 2026
Merged

fix(lsp): read env names from the vault env files#24
gandarfh merged 4 commits into
mainfrom
feat/env-names-from-vault

Conversation

@gandarfh

Copy link
Copy Markdown
Member

Environments migrated from the app database to file-backed storage (/envs/.toml + active env in the per-machine user.toml), which left the LSP reading an empty table — env name completion and hover enrichment silently disappeared.

The server now discovers the vault root by walking up from the document path to the nearest directory containing envs/, reads the active env name for that vault from user.toml (XDG_CONFIG_HOME, then the platform config dir), and extracts variable NAMES from [vars] and [secrets] (plus the .local.toml override). Values never leave the module — and [secrets] values are keychain references by contract, so secret material is not even on disk there.

New opam dependency: toml (quoted path keys in [active_envs] rule out hand parsing).

Integration fixture switched from sqlite env tables to a temp vault + XDG_CONFIG_HOME override; covers the .local merge and inactive-env exclusion (107 checks).

@gandarfh
gandarfh force-pushed the feat/env-names-from-vault branch from c4bda5a to 25289cc Compare June 12, 2026 01:31
@gandarfh
gandarfh merged commit 183fa43 into main Jun 12, 2026
9 checks passed
@gandarfh
gandarfh deleted the feat/env-names-from-vault branch June 12, 2026 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant