Add generic Linux dev setup & bootstrap - #2035
Open
sunmachine wants to merge 3 commits into
Open
Conversation
sunmachine
force-pushed
the
generic-ide-setup
branch
from
July 26, 2026 03:38
ac0faf9 to
3c56555
Compare
sunmachine
force-pushed
the
generic-ide-setup
branch
from
July 31, 2026 00:37
3c56555 to
8c25c95
Compare
Masterkatze
reviewed
Aug 3, 2026
Contributor
Author
|
Note to self: I still need to toy around with Zed more to make sure this is solid. Note to self 2: Get more details on @Agiel 's specific Zed workflows to make sure I covered his concerns adequately. |
One for client/server and one for vgui2/tier1/mathlib as may want to turn it off only for working on just client/server library side. Also fixup compile/linker errors since the changes and add NEO_UNITY defines to fixup for those ifdef changes. Add info in README.
src/.vscode/tasks.json ran ./buildallprojects, and .gitattributes pinned line endings for the same file. Neither exists: the script came from the source-sdk-2013 import and never survived the move to CMake presets, so the task could only ever fail on invocation.
sunmachine
force-pushed
the
generic-ide-setup
branch
from
August 7, 2026 02:23
8c25c95 to
ea27cba
Compare
Run tools/ntre-dev-setup.sh, reload your editor, and go-to-definition works across src/game. It changes nothing about how NT;RE is built. A unity build's compile_commands.json lists only the generated unity_*.cxx blobs, so roughly 1300 translation units carry no compile flags an indexer can use. Navigation and completion are dead across most of src/game. What the script does: 1. Adds a "Linux Debug (IntelliSense index only)" preset to the git-ignored src/CMakeUserPresets.json, with NEO_UNITY_BUILD_CLIENT_SERVER and NEO_UNITY_BUILD_OTHERS set to OFF. 2. Configures that directory for its compile database alone. Nothing is built from it, and your real build directory keeps whatever unity settings you gave it. 3. Symlinks compile_commands.json at the repo root, where nearly every C++ tool probes for it. 4. Writes a .clangd that drops the GCC-only flags clang rejects. 5. Installs a pinned, checksummed clangd under .ide/. The sniper image ships clangd 13, which is too early for the repo's C++20. The script runs from the dev container (the CI image plus a non-root account matched to the local UID, so bind-mount files stay user-owned under rootful docker), from the tracked VS Code tasks, or directly from a shell. The output is a plain compile database, so any editor that speaks clangd works, not only VS Code. Everything generated is git-ignored. *.sh gains eol=lf so a Windows checkout cannot produce a script that fails to run.
sunmachine
force-pushed
the
generic-ide-setup
branch
from
August 7, 2026 02:57
ea27cba to
6ce4137
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Optional developer tooling for Linux + Clang. It does not change how NT;RE builds.
tools/ntre-dev-setup.sh— sets up working C++ IntelliSense: a pinnedclangd, acompile_commands.jsonsymlinked at the repo root, and a.clangdcarrying the flags the SteamRT toolchain needs..devcontainer/— a dev container on the same sniper SDK image the CI runners use, which runs that script on first open.Why the script is needed: a unity build's
compile_commands.jsonlists only the generatedunity_*.cxxblobs, so roughly 1300 translation units get no compile flags and indexing is dead across most ofsrc/game. The script works around that with a separate, build free CMake directory configured with the unity options off, written to the git-ignoredsrc/CMakeUserPresets.json. Your real build directory keeps whatever settings you gave it, and nothing is ever compiled from the IntelliSense one.Editor config for VS Code and Zed is written on request. Everything generated is git-ignored, and the existing Qt Creator and CLI build workflows are untouched.
Also removes two Source SDK leftovers: the
buildallprojectsgitattributes entry andsrc/.vscode/tasks.json, which both refer to a build script this repo no longer has.Note
Based on #2052
Rebased onto @nullsystem's 6d33c0e, which adds the
NEO_UNITY_BUILD_CLIENT_SERVERandNEO_UNITY_BUILD_OTHERSoptions. The IntelliSense preset sets both toOFFfor itself alone. Following @Masterkatze's review, this branch no longer touches shared build defaults or injects CMake code into the project. That commit appears in the diff below until #2052 merges. This also gives me another day to hammer on Zed a bit.Trying it out
git clonethis repo and check out this branch..cppfile undersrc/and confirm go-to-definition and completion work.Requires Docker or Podman on the host. The
README.mdcovers running the script outside a container.Toolchain
Linked Issues
TODO