Skip to content

fix(lsp): preserve dotted custom root markers#51

Merged
ualtinok merged 1 commit into
cortexkit:mainfrom
chrisolszewski:fix/lsp-dotted-root-markers
May 22, 2026
Merged

fix(lsp): preserve dotted custom root markers#51
ualtinok merged 1 commit into
cortexkit:mainfrom
chrisolszewski:fix/lsp-dotted-root-markers

Conversation

@chrisolszewski
Copy link
Copy Markdown
Contributor

@chrisolszewski chrisolszewski commented May 21, 2026

Summary

Custom LSP server root_markers lose their leading dot during config parsing,
so .oxlintrc.json is read as oxlintrc.json. The marker never matches, the
workspace root isn't found, and the custom server starts in the wrong directory.

What changed

crates/aft/src/commands/configure.rs: leading-dot stripping now runs only on
extension lists. Root markers are kept as written. Added parser coverage for a
dotted marker.

Why this scope

Stripping the dot is right for extensions (.ts becomes ts) but wrong for
filenames, which are matched literally. The fix stays in the parser and changes
no schema or runtime behavior beyond the marker lookup.

Validation

  • cargo fmt --check
  • cargo test -p agent-file-tools (configure parser and lsp inspect tests)

Summary by cubic

Fixes LSP config parsing to preserve dotted root markers (e.g., ".oxlintrc.json"). This lets custom servers detect the correct workspace root and start in the right directory.

  • Bug Fixes
    • Preserve leading dots in root_markers and args.
    • Strip leading dots only for extensions via a new required_extension_array.
    • Added a test to ensure extensions are normalized and dotted markers are kept.

Written for commit 95bfe2e. Summary will update on new commits. Review in cubic

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

Re-trigger cubic

@ualtinok ualtinok merged commit d46586f into cortexkit:main May 22, 2026
11 checks passed
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.

2 participants