Skip to content

Suggest object overrides in map files - #115

Open
ViTeXFTW wants to merge 1 commit into
devfrom
t3code/allow-new-object-names
Open

Suggest object overrides in map files#115
ViTeXFTW wants to merge 1 commit into
devfrom
t3code/allow-new-object-names

Conversation

@ViTeXFTW

@ViTeXFTW ViTeXFTW commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

  1. Suggest indexed objects while completing top-level Object names in map.ini and solo.ini
  2. Keep new object names valid by treating this as completion-only
  3. Add regression coverage for blank and partial Object headers

Tests

  • cargo test -p zerosyntax-analysis

@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds workspace-backed Object-name completion for top-level Object headers in map.ini and solo.ini while preserving support for newly introduced object names.

  • Adds an override-layer-specific completion context.
  • Suggests indexed Object names as override targets.
  • Adds regression coverage for blank, partial, and non-map Object headers.

Confidence Score: 4/5

The PR appears safe to merge, with one non-blocking completion-quality issue around presenting override-only objects as base override targets.

The new completion path is correctly limited to Object headers in map and solo files, but its unfiltered workspace lookup can produce misleading candidates.

Files Needing Attention: crates/analysis/src/completion.rs

Important Files Changed

Filename Overview
crates/analysis/src/completion.rs Adds map/solo Object-header completion and regression tests, but the candidate source also includes objects defined only in override layers and labels them as override targets.

Reviews (1): Last reviewed commit: "feat: suggest object overrides in map fi..." | Re-trigger Greptile

Comment on lines +284 to +286
fn object_name_completions(index: Option<&WorkspaceIndex>) -> Vec<Completion> {
index
.into_iter()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Override-only objects appear as targets

object_name_completions enumerates every indexed Object, including templates defined only in the current or another override layer, and labels each one as an override target. This makes the completion list misleading because those map-local templates have no base definition to override.

Knowledge Base Used:

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

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.

[Feature] Show existing objects in map.ini

1 participant