Skip to content

Add Nix language support#1084

Open
TyceHerrman wants to merge 1 commit into
colbymchenry:mainfrom
TyceHerrman:codex/nix-language-supersede-prs
Open

Add Nix language support#1084
TyceHerrman wants to merge 1 commit into
colbymchenry:mainfrom
TyceHerrman:codex/nix-language-supersede-prs

Conversation

@TyceHerrman

Copy link
Copy Markdown

Supersedes #219 and #330.

Summary

  • Adds Nix .nix detection, display name, Language entry, extractor registration, and vendored tree-sitter-nix WASM with no new package dependency.
  • Uses feat: add Nix language support #330 as the functional base because it carried the broader extractor and resolver behavior; credits feat: add Nix language support #330 for that implementation and feat: Nix support #219 for the README/default include intent.
  • Extracts Nix variables vs functions, simple/destructured/curried params, inherit bindings, static import refs, function call refs, and exported vs private attrset scope.
  • Resolves only static relative Nix path imports to indexed file nodes, including ./dir to dir/default.nix. Angle-bracket channels, attribute expressions, and variable/dynamic imports do not create project file edges.
  • Keeps existing import resolution behavior by scoping Nix file-path imports beside the existing C/C++ and PHP file-import branches.

Notes

  • Current main no longer has DEFAULT_CONFIG. Nix is included through EXTENSION_MAP/isSourceFile, which is the current indexing source of truth.

Test plan

  • npm run build
  • npm test -- tests/extraction.test.ts tests/resolution.test.ts
  • npm test was attempted locally, but the full suite entered a broad unrelated 5s timeout cascade across many heavy suites under local resource pressure, so it was stopped.

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