Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/en/manuals/images/editor/jump-to-symbol.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion docs/en/manuals/writing-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ Defold has a built-in code editor that allows you to open and edit Lua files (.l

![](/images/editor/code-editor.png)


### Code completion

The built-in code editor will show code completion of functions while writing code:
Expand All @@ -36,6 +35,14 @@ Pressing <kbd>CTRL</kbd> + <kbd>Space</kbd> will show additional information abo

![](/images/editor/apireference.png)

### Jump to symbol

The built-in code editor can show a searchable list of symbols in the current code file, such as functions, objects, and variables. Select <kbd>View ▸ Jump to Symbol…</kbd>, or press <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>O</kbd> on Windows and Linux, or <kbd>⌘ Cmd</kbd> + <kbd>Shift</kbd> + <kbd>O</kbd> on macOS.

Start typing to fuzzy search the symbols, use the arrow keys to move through the results and preview their locations in the editor, then press <kbd>Enter</kbd> to jump to the selected symbol. Press <kbd>Esc</kbd> to close the dialog and return to the previous cursor and scroll position.

![](/images/editor/jump-to-symbol.png)

### Linting configuration

The built-in code editor performs code linting using [Luacheck](https://luacheck.readthedocs.io/en/stable/index.html) and [Lua language server](https://luals.github.io/wiki/diagnostics/). To configure the Luacheck, create a `.luacheckrc` file in the project root. You can read the [Luacheck configuration page](https://luacheck.readthedocs.io/en/stable/config.html) for the list of the available options. Defold uses the following defaults for the Luacheck configuration:
Expand Down
Loading