Closed ColinWttt closed 11 months ago
First make sure you've built your project first. The .generated.h file not found message seems to indicate it hasn't been Built.
Make sure you use the 'Editor' suffix along with the development flag to build.
In Terminal->Run Build Task...
run this:
Of course yours won't have Win64.
Also make sure you run my extensions command:
Errors might occur after you build and this command should fix them.
Of course you still might get errors. Let me know!
I tried various methods and don't remember the specific order anymore.
Run Build Task
,
updated the compile command
,
create unreal-clangd project
in full
mode,
set UEIntellisense Fixes › Compiler: Intellisense Mode
to clang-arm64
,
checked enable UEIntellisense Fixes: Enable Fixes
, and set UEIntellisense Fixes › Compiler: Intellisense Mode
to arm64
.
I'm not sure which of these steps are necessary, but it did work, and the results are excellent.
Strange, ueintellisense fixes shouldn't have done anything. It's for Microsoft's C++ extension and shouldn't do anything to get clangd to work. You should be able to disable the ueintellisense fixes extension.
I'm wondering if you somehow got Microsoft's C++ extension to do the intellisense. That could have happened if you reset your project. It would have overwrote the cfg files for your project so it defaulted back to Microsoft's C++ extension.
You can test this out by using my extension's command Create Unreal clangd project
and choosing Partial
install.
It should add these settings, to your project's settings.json, that disables Microsoft's C++ extension's ability to do Intellisense.
"C_Cpp.autocomplete": "disabled",
"C_Cpp.errorSquiggles": "disabled",
"C_Cpp.formatting": "disabled",
"C_Cpp.intelliSenseEngine": "disabled",
I still keep Microsoft's C++ extension enabled for debugging.
I do have some other stuff to try if you are accidently using Microsoft's C++ extension and want to try to get clangd to work. If I'm wrong and you are really using clangd then great!
Background: Microsoft C++ plugin is disabled.
I attempted to replicate the process using partial
mode:
Refresh Visual Studio Code
.Completion Helper.cpp
.Create Unreal clangd project
and chose Partial
installation.setting.json
is as follows:{
"unreal-clangd.creation.overwrite": "partial",
"unreal-clangd.utility.createProjectOnStartup": false,
"editor.suggest.snippetsPreventQuickSuggestions": false
}
I believe this plugin is indeed effective on macOS ARM64. After sufficient polishing, I strongly recommend that you apply for Epic's MegaGrants.
Cool, didn't think it worked with the default settings for Mac. Thanks for testing it out!
Just to be sure, did you have to use any of these unreal-clangd extension settings below?
Yeah, those Microsoft C++ extensions settings, in settings.json, will not get set if you have Microsoft's C++ extensions disabled when installing a clangd project. This is because a VSCode exception is thrown when setting the settings of an extension that is disabled.
I should ask users to set them, though, if you do enable MS's C++ extension afterward... Like previously mentioned, MS C++ extension is still useful for it's debugging
and shouldn't interfere with clangd with those settings set.
I wouldn't think my projects would be considered. This one has very limited number of users. There's also lots of competition for Unreal IDEs.
Visual Studio 2022 is suppose to be a lot better and they're also doing updates specific for Unreal.
People say Rider is really good for Unreal even though it's paid. Some reddit users mentioned you can legally use it for free if you use the nightly builds though I've never tried it.
Just to be sure, did you have to use any of these unreal-clangd extension settings below?
Architecture Platform Compiler Path
Architecture
was set to arm64
, and both Platform
and Compiler Path
were blank. After I set Architecture
to blank, using partial
build, Intellisense still works fine.
Visual Studio 2022 requires intricate setup, installing plugins from Visual Studio and Unreal, and the startup speed is still quite slow.
The Architecture setting is used when the Update Compile Commands setting is run. You don't usually run this manually. The extension should detect when it needs to run.
You should
run it manually, though, now that Architecture is blank and restart VSCode to see if it still works without errors.
Would be helpful so I can update my Docs for Mac arm64 users and let them know your results on if they need that setting or not.
I'm getting a few winks so won't be responding till I wake up. I also have stuff to do so can't respond for awhile after that as well.
You should run it manually, though, now that Architecture is blank and restart VSCode to see if it still works without errors.
Looks good, nothing really change. Thanks for your help!
Followed the readme.md and intellisense works really good and fast, development build can open editor successfully. Encounters several errors similar to #4,
project: Unreal example project Lyra hardware: Mac M1 pro (arm64) macOS: 14.1.2 Xcode: 15.0.1 clangd: 16.0.6 (also configured in clangd-vscode path) Unreal: 5.3.2 VS code: 1.84.2 (Universal)
GENERATED_BODY
macroThese type of error appera at every .cpp/.h file in the environment.