Search code examples
c++neovimliskov-substitution-principlecompletionunreal

How to config Unreal Engine5 C++ code auto completion for neovim?


I want to write Unreal Engine C++ code in Neovim, but don't how to config lsp server to enable the auto completion and formating for UE C++. Anyone who can help me out of this? Thx a lot.

I want to know the exact way to config lsp server for Unreal Engine C++ coding in Neovim.


Solution

  • Check this repository:

    https://github.com/zadirion/Unreal.nvim

    Requirements

    make sure you install the clangd support component through Visual Studio Setup, and make sure the installed clang++.exe is in your system path env variable. Needs to be added manually to path, the installer does not do that has been tested with Unreal Engine 5.1 and 5.2. Unsure what, if any other versions work (optional) If you don't already have your own configuration, I recommend you use my neovim configuration specialized for development in Unreal Engine https://github.com/zadirion/UnrealHero.nvim Installation

    Install with packer

    use {'zadirion/Unreal.nvim',
        requires =
        {
            {"tpope/vim-dispatch"}
        }
      }
    

    Known Limitations

    the generated plugin config file that sits next to the uproj (UnrealNvim.json) only contains the Editor and non-Editor Development target configurations. Feel free to add DebugGame, Test, and Shipping targets to it, it should work in theory but I have not tested it. Let me know if you encounter issues.