Skip to content

Commit fa71fc5

Browse files
committed
3.2.1 update
1 parent 4d45818 commit fa71fc5

20 files changed

+811
-152
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Change Log
22

3+
## [3.2.1] 2025-11-17
4+
### Changed
5+
- New way of backing up/restoring *.code-workspace settings
6+
### Added
7+
- Backs up workspace cfg on startup or on cfg change (if conditions met)
8+
- Backup is saved in `.vscode/unreal-clangd/.code-workspace.backup`
9+
- Restores on startup if bad workspace file detected
10+
- currently only restores sections: `folders`, `settings`, `tasks`, `launch`
11+
- Asks to restore after running command: Update compile commands (refresh project)
12+
- Added manual commands: `Backup Workspace cfg file` , `Restore Workspace cfg file`
13+
- Added Links to `Unreal 5.7` requirements
14+
### Fixed
15+
- Fixed system include, for Linux, that gets put in .clangd file
16+
17+
318
## [3.1.0] 2025-10-18
419
### Fixed
520
- Fixed Unreal source files not working correctly (thanks @romantimm)

FRONT.md

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,24 @@ This is a local copy of the front facing Docs located here: https://github.com/b
5151
- [Create BuildConfiguration.xml](#create-a-buildconfigurationxml)
5252
- [Installing correct LLVM (clangd/clang) versions](#installing-correct-llvm-clangdclang-version)
5353
- [Installing correct library versions (Windows)](#installing-correct-library-versions-windows)
54-
- [All supported Unreal version requirement links](#all-supported-unreal-version-requirement-links)
54+
- [All supported Unreal versions requirement links](#all-supported-unreal-version-requirement-links)
5555
- [Downloading Source Code](#downloading-source-code)
5656

5757
---
5858
---
5959

6060
## Updates
6161

62+
### Version 3.2.1
63+
- Backs up workspace cfg on startup or on cfg change (if conditions met)
64+
- Backup is saved in `.vscode/unreal-clangd/.code-workspace.backup`
65+
- Restores on startup if bad workspace file detected
66+
- currently only restores sections: `folders`, `settings`, `tasks`, `launch`
67+
- Asks to restore after running command: Update compile commands (refresh project)
68+
- Added manual commands: `Backup Workspace cfg file` , `Restore Workspace cfg file`
69+
- Added Links to `Unreal 5.7` requirements
70+
- Fixed system include, for Ubuntu Linux, that gets put in .clangd file (for Unreal 5.7)
71+
6272
### Version 3.1.0
6373
- Fixed bug in Unreal source file support
6474

@@ -154,10 +164,12 @@ This extension:
154164
- [Installing correct library versions (Windows)](#installing-correct-library-versions-windows)
155165
- [All supported Unreal version requirement links](#all-supported-unreal-version-requirement-links)
156166

157-
`note`: The links below will tell you the requirements for `Unreal 5.6.#`
158-
- If you need requirements for older Unreal versions see [All supported Unreal version requirements links](#all-supported-unreal-version-requirement-links)
167+
`note`: The links below will tell you the requirements for `Unreal 5.7.#`
168+
- If you need requirements for other Unreal versions
169+
- see [All supported Unreal version requirements links](#all-supported-unreal-version-requirement-links)
170+
---
159171

160-
1. [Unreal 5.6 Release Notes (Platform SDK Upgrades)](https://dev.epicgames.com/documentation/en-us/unreal-engine/unreal-engine-5-6-release-notes?application_version=5.6#platform-sdk-upgrades)
172+
1. [Unreal 5.7 Release Notes (Platform SDK Upgrades)](https://dev.epicgames.com/documentation/en-us/unreal-engine/unreal-engine-5-7-release-notes?application_version=5.7#platform-sdk-upgrades)
161173

162174
- Note: The link above can take too long to load so might not take you to the right section (`Platform SDK Upgrades`)
163175
- Try loading link twice
@@ -170,17 +182,17 @@ This extension:
170182
- See: [Installing correct library versions (Windows)](#installing-correct-library-versions-windows)
171183
- Also shows useful `Linux/Mac` info
172184

173-
2. [Unreal Docs: Hardware and Software Specifications](https://dev.epicgames.com/documentation/en-us/unreal-engine/hardware-and-software-specifications-for-unreal-engine?application_version=5.6)
185+
2. [Unreal Docs: Hardware and Software Specifications](https://dev.epicgames.com/documentation/en-us/unreal-engine/hardware-and-software-specifications-for-unreal-engine?application_version=5.7)
174186
- Useful info for `Linux` and `Mac` (Not that useful for Windows)
175187
- Use `Operating System` dropdown to change to Linux/Mac
176188
- You can change `Unreal Engine version` on left hand side
177189

178-
3. [Unreal Docs: Linux Development Requirements](https://dev.epicgames.com/documentation/en-us/unreal-engine/linux-development-requirements-for-unreal-engine?application_version=5.6)
190+
3. [Unreal Docs: Linux Development Requirements](https://dev.epicgames.com/documentation/en-us/unreal-engine/linux-development-requirements-for-unreal-engine?application_version=5.7)
179191

180192
- Shows useful `Linux` info
181193
- You can change `Unreal Engine version` on left hand side
182194

183-
4. [Unreal Docs: MacOS Development Requirements](https://dev.epicgames.com/documentation/en-us/unreal-engine/macos-development-requirements-for-unreal-engine?application_version=5.6)
195+
4. [Unreal Docs: MacOS Development Requirements](https://dev.epicgames.com/documentation/en-us/unreal-engine/macos-development-requirements-for-unreal-engine?application_version=5.7)
184196

185197
- Shows usefull `Mac` info
186198
- You can change `Unreal Engine version` on left hand side
@@ -473,7 +485,7 @@ Here's a basic BuildConfiguration.xml (It's easy to create all this using VSCode
473485

474486
## Installing correct LLVM (clangd/clang) version
475487

476-
`note`: These examples are for Unreal `5.6.#`. Make sure you get the correct library and compiler versions for your `specific` Unreal version
488+
`note`: These examples are for Unreal `5.6.#`. Make sure you get the correct library and compiler versions for your `specific` Unreal version [here](#all-supported-unreal-version-requirement-links)
477489

478490
### Windows
479491
1. Get the correct LLVM (clangd/clang) version from the Release Notes of your Unreal version.
@@ -536,7 +548,7 @@ Here's a basic BuildConfiguration.xml (It's easy to create all this using VSCode
536548

537549
2. I use the stand-alone `Visual Studio Build Tools 2022` but this also should work if you have the `Visual Studio 2022` IDE installed.
538550

539-
3. This example is for Unreal 5.6.# but it can apply to older Unreal versions. Older versions will probably require different clangd/library versions so make sure to see here for older version requirement links: [Older Version Requirement Links](#older-unreal-versions-requirement-links)
551+
3. This example is for Unreal 5.6.# but it can apply to other Unreal versions. Other versions will probably require different clangd/library versions so make sure to see here for other version requirement links: [Other Version Requirement Links](#all-supported-unreal-version-requirement-links)
540552

541553
4. From the `Visual Studio installer` click on `Modify` next to Build Tools 2022 or VS 2022 IDE
542554

@@ -554,7 +566,7 @@ Here's a basic BuildConfiguration.xml (It's easy to create all this using VSCode
554566
Below are the versions found in the Unreal 5.6 Release Notes and what they look like in the `Visual Studio Installer (Individual components)`.
555567

556568
7. Here's the `Platform SDK Upgrades` section in the Unreal 5.6 Release Notes
557-
- For older Unreal version Release Notes see [here](#all-supported-unreal-version-requirement-links)
569+
- For other Unreal version Release Notes see [here](#all-supported-unreal-version-requirement-links)
558570

559571
![Image](https://github.com/user-attachments/assets/c54ad0fb-1c59-4184-a34d-8af3a424ab6d)
560572

@@ -621,6 +633,18 @@ Below are the versions found in the Unreal 5.6 Release Notes and what they look
621633
- [How to install correct LLVM (clangd/clang) version](#installing-correct-llvm-clangdclang-version)
622634
- [Installing correct library versions (Windows)](#installing-correct-library-versions-windows)
623635

636+
## Unreal 5.7.#
637+
Release Notes: [5.7.# (Platform SDK Upgrades)](https://dev.epicgames.com/documentation/en-us/unreal-engine/unreal-engine-5-7-release-notes?application_version=5.7#platform-sdk-upgrades)
638+
639+
Here's what the Windows requirements look like(section: Platform SDK Upgrades):
640+
![Image](https://github.com/user-attachments/assets/573d2626-97a2-46b1-9f02-86ba8c344f99)
641+
642+
Unreal Docs Requirements: [Requirements](https://dev.epicgames.com/documentation/en-us/unreal-engine/hardware-and-software-specifications-for-unreal-engine?application_version=5.7)
643+
644+
Unreal Docs Linux Requirements [Linux](https://dev.epicgames.com/documentation/en-us/unreal-engine/linux-development-requirements-for-unreal-engine?application_version=5.7)
645+
646+
Unreal Docs MacOS requirements [MacOS](https://dev.epicgames.com/documentation/en-us/unreal-engine/macos-development-requirements-for-unreal-engine?application_version=5.7)
647+
624648
## Unreal 5.6.#
625649
Release Notes: [5.6.# (Platform SDK Upgrades)](https://dev.epicgames.com/documentation/en-us/unreal-engine/unreal-engine-5-6-release-notes?application_version=5.6#platform-sdk-upgrades)
626650

package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "unreal-clangd",
33
"displayName": "Unreal Clangd",
44
"description": "Creates clangd project for Unreal 5.2+",
5-
"version": "3.1.0",
5+
"version": "3.2.1",
66
"engines": {
77
"vscode": "^1.99.0"
88
},
@@ -80,6 +80,16 @@
8080
"command": "unreal-clangd.openAddCompletionsFiles",
8181
"title": "Open 'Add Completions' Files (regular and macro)",
8282
"category": "unreal clangd"
83+
},
84+
{
85+
"command": "unreal-clangd.backupWorkspaceConfig",
86+
"title": "Back up workspace cfg file",
87+
"category": "unreal clangd"
88+
},
89+
{
90+
"command": "unreal-clangd.restoreWorkspaceConfig",
91+
"title": "Restore workspace cfg file",
92+
"category": "unreal clangd"
8393
}
8494
],
8595
"configuration": [
@@ -102,12 +112,6 @@
102112
"scope": "resource",
103113
"order": 0
104114
},
105-
"unreal-clangd.native.code-workspaceFileBackupSettings": {
106-
"type": "array",
107-
"markdownDescription": "Any setting you want backed up when running the Native \"Update Intellisense Files\" command.\nRunning this `Unreal Build Tool's` command refreshes your project causing the project's `*.code-workspace` file to be overwritten.\n These settings will automatically be backed up: `clangd.arguments`, `clangd.path`, `clangd.detectExtensionConflicts`, `files.associations`, `workbench.colorCustomizations`, `editor.suggestFontSize`, `dotnet.defaultSolution`\n* `note:` Do not set in a config that Unreal overwrites!",
108-
"scope": "resource",
109-
"order": 1
110-
},
111115
"unreal-clangd.fixes.delegateFuncCompletions": {
112116
"type": "boolean",
113117
"default": true,

src/dynamic.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { getProjectWorkspaceFolder, UnrealVersion } from "./libs/ueHelpers";
77
import { FILENAME_MACRO_COMP_HELPER } from "./modules/completionFiles";
88
import { getFullPreparseIncludeLine } from "./modules/preParseIncludes";
99
import { convertWindowsDriveLetterToUpper } from "./libs/projHelpers";
10+
import { getLinuxStdLibSystemInclude } from "./shared";
1011

1112

1213
export function addDynamicDefaultSettingsToConfig(ueVersion: UnrealVersion | undefined, clangdExtYamlFiles: ExtensionYamlFiles, configSettings: AllDefaultSettings, clangdPath: string, compileCommandsDirUri: vscode.Uri | undefined): boolean {
@@ -50,7 +51,7 @@ export function addDynamicDefaultSettingsToConfig(ueVersion: UnrealVersion | und
5051

5152

5253
// eslint-disable-next-line @typescript-eslint/no-unused-vars
53-
export function addPlatformSpecificChanges( intellisenseType: ExtensionIntellisenseType, uePlatform: UnrealPlatform, clangdExtYamlFiles: ExtensionYamlFiles, clangUri?: vscode.Uri) {
54+
export async function addPlatformSpecificChanges( intellisenseType: ExtensionIntellisenseType, uePlatform: UnrealPlatform, clangdExtYamlFiles: ExtensionYamlFiles, clangUri?: vscode.Uri) {
5455

5556
switch (uePlatform) {
5657
case "Win64":
@@ -80,8 +81,11 @@ export function addPlatformSpecificChanges( intellisenseType: ExtensionIntellise
8081
break;
8182
case 'Linux':
8283
if(intellisenseType === "Native"){
83-
addToClangdAdd(clangdExtYamlFiles, consts.LINUX_STDLIB_SYS_INCLUDE_CPP_V1);
84-
84+
85+
const sysInclude = await getLinuxStdLibSystemInclude();
86+
87+
addToClangdAdd(clangdExtYamlFiles, sysInclude);
88+
8589
for (const warning of consts.LINUX_COMPILER_FLAGS_TO_ADD) {
8690
addToClangdAdd(clangdExtYamlFiles, warning);
8791
}

0 commit comments

Comments
 (0)