fix(language-server): read the ingredient database named by database: in .gram/config.yaml #296
No reviewers
Labels
No labels
bug
discussion
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gram-lang/gram!296
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/lsp-config-database"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The language server ignored
database:in the project's.gram/config.yaml, whichgramreads (resolveDbPath): in a project that keeps its ingredient database elsewhere, the editor had no database at all (no unknown-ingredient diagnostic, no nutrition hover, no gram conversion).readProjectConfigSyncreadsdatabase:.resolveIngredientDbfollows the CLI's order:gram.ingredientDatabase.path, else the first workspace folder'sdatabase:(relative to the folder), else its.gram/ingredients.yaml. Adatabase:naming a missing file does not fall back to.gram/ingredients.yaml, as the CLI does not. It also returns the path it loaded.**/*.{yaml,yml};isIngredientDbChangekeeps only.gram/ingredients.yamlfiles and the database in use. A.gram/config.yamlchange reloads the database too.patchchangeset.Tests: 8 new (
db-reload,project-config), red before the fix.bun test3957 pass / 1 skip, typecheck 24/24, biome clean.After merge: merge
mainintodev/1.6(small conflict expected inserver.ts).