Priority
Medium-high — editor correctness, module awareness, and consistency with CLI validation.
Context
internal/lsp/components.go builds workspace component definitions by walking the workspace root directly:
_ = filepath.WalkDir(root, func(filePath string, entry os.DirEntry, err error) error {
...
if !strings.HasSuffix(filePath, ".gwdk") { return nil }
payload, err := os.ReadFile(filePath)
...
if lang.ClassifySource(filePath, payload) != lang.FileKindComponent { return nil }
...
})
The skip list is hard-coded to directory names such as .git, .gowdk, bin, dist, gowdk_cache, node_modules, and vendor.
Problem
The LSP workspace component index does not appear to use the same discovery rules as project-aware CLI commands.
Consequences:
- Components excluded by
Source.Exclude can still appear in editor navigation/completion.
- Module-scoped source selection is not reflected in LSP component lookup.
- Hard-coded directory skips can drift from CLI discovery defaults.
- Editor behavior can disagree with
gowdk check, build, routes, and generated output.
- Large workspaces can be scanned more broadly than necessary.
Proposed direction
Route LSP workspace component indexing through the same configured discovery service used by CLI/compiler flows.
The shared discovery path should account for:
- project root;
Source.Include / Source.Exclude;
- configured modules, when relevant;
- default exclude patterns;
- generated output exclusions;
- open-document overlays.
Acceptance criteria
Related
Priority
Medium-high — editor correctness, module awareness, and consistency with CLI validation.
Context
internal/lsp/components.gobuilds workspace component definitions by walking the workspace root directly:The skip list is hard-coded to directory names such as
.git,.gowdk,bin,dist,gowdk_cache,node_modules, andvendor.Problem
The LSP workspace component index does not appear to use the same discovery rules as project-aware CLI commands.
Consequences:
Source.Excludecan still appear in editor navigation/completion.gowdk check,build,routes, and generated output.Proposed direction
Route LSP workspace component indexing through the same configured discovery service used by CLI/compiler flows.
The shared discovery path should account for:
Source.Include/Source.Exclude;Acceptance criteria
WalkDirimplementation.Related