You can easily develop Godot with any text editor and by invoking scons
on the command line, but if you want to work with an IDE (Integrated
Development Environment), here are setup instructions for some popular ones:

Here you can choose which folders and files will be visible to the project. C/C++ files
are added automatically. Potentially useful additions: *.py for buildsystem files, *.java for Android development,
*.mm for macOS. Click “Next”.

Click Finish.

Add a line containing . to project_name.includes to get working code completion.

Type scons in the Command field. If it fails with ‘Could not start process “scons”’,
it can mean that scons is not in your PATH environment variable, so you may have to
use the full path to the SCons binary.

Fill the Arguments field with your compilation options. (e.g.: p=x11target=debug-j4)

Run configuration:

Open the Run tab.

Point the Executable to your compiled Godot binary (e.g: %{buildDir}/bin/godot.x11.opt.tools.64)

If you want to run a specific game or project, point Working directory to the game directory.

If you want to run the editor, add -e to the Command line arguments field.

As a developer you usually want to frequently pull the latest commits
from the upstream git repository or a specific fork etc. However this
brings a little problem with it: as the development continues, source files
(and folders) are added or removed. These changes needs to be reflected in
your project files for Qt Creator too, so you continue to have a nice
experience coding in it. A simple way to check these things, is to right click
at your root folder in the “Projects View” and click on “Edit files…”

Now a new dialog should appear that is similar in functionality to the one in the third step
of the “Importing the project” section. Here now you can check whether you want to add/remove
specific files and/or folders. You can chose by clicking with your mouse or just simply by
clicking the “Apply Filter” button. A simple click on “Ok” and you’re ready to continue your work.

Developers must follow the project’s code style
and IDE should help them to do it. By default, Qt Creator does use spaces for indentation
which is incorrect for Godot project. You can change this behavior by
changing the “Code Style” in Options -> C++.

Click on Edit to change the current settings, then click on Copy Built-in Code Style button
to set a new code style. Set a name for it (e.g. Godot) and change the Tab policy
to be Tabs Only.

You can find a video tutorial here.
Or you may follow this text version tutorial.

Start by opening KDevelop and choosing “open project”.

Choose the directory where you cloned Godot.

On the next screen, choose “Custom Build System” for the Project manager.

Now that the project has been imported, open the project configuration.

Add the following includes/imports:

.//adottoindicatetherootoftheGodotprojectcore/core/os/core/math/drivers/platform/x11///makethatplatform/osx/ifyou're using macOS

Apply the changes.

Switch to the “Custom Build System” tab. Add a build configuration
and keep the build directory blank. Enable build tools and add scons
as the executable then add platform=x11target=debug (platform=osx
if you’re on macOS) as the arguments.

Next we need to tell KDevelop where to find the binary.
From the “Run” menu, choose “Configure Launches”.

Click “Add” if no launcher exists. Then add the path to your
executable in the executable section. Your executable should be located
in the bin/ sub-directory and should be named something like
godot.x11.tools.64 (the name could be different depending on your
platform and depending on your build options).