Commit Graph

120 Commits

Author SHA1 Message Date
77e6d92357 Fix highlighting warning and error issues related to Godot editor.
Fix Issue #104413 : Add a limit of 20 lines of warning highlight otherwise paint the background of the first line only.
Fix Issue #106278 : Extract the logic from clearing and setting background lines from _update_errors() and _update_warnings() to _update_background_text().
Fix Issue #83979 : Added signal for folding/unfolding lines (fold_lines_updated).
Feature: Highlight the folded line using signals connected to _update_background_text() to keep the editor visuals up to date. The background is set in the following priority order: Error, Warning, then Highlight background.
2025-05-20 10:03:39 +02:00
b9f59ae6ca Add color pickers to script editor 2025-05-13 18:03:21 -04:00
e8eeccebcb Unify Scripts Panel naming for the script and shader editors
Both use the same shortcut and action, so it makes sense to call it
a Files panel as opposed to a Scripts panel.
2025-04-09 01:17:36 +02:00
5280c0bf4a Merge pull request #102469 from sockeye-d/warning-highlights
Highlight warning lines in Script editor
2025-03-11 14:00:33 -05:00
324512e11c Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
eb99adb11b Added warning line highlight 2025-02-11 18:59:28 -08:00
b252867145 [macOS/Windows] Add Emoji & Symbols context menu item to LineEdit/TextEdit to show system character picker. 2025-01-10 09:25:34 +02:00
98c5267ce5 Merge pull request #91388 from kitbdev/fix-goto-line
Make Goto line a Popup and column input
2024-12-23 11:15:12 -06:00
80d11500b5 Code Editor: Add documentation tooltips 2024-12-15 10:51:33 +03:00
kit
f41cd8ad52 Make Goto line a Popup and allow column input 2024-10-31 10:11:46 -04:00
kit
06b17a4d2f Fix goto line issues in code editor 2024-07-31 10:34:10 -04:00
b4c1634b52 Implement trim_final_newlines functionality 2024-05-02 22:57:34 -04:00
3a1246c198 Store line change in script navigation history 2024-04-25 23:22:47 +02:00
1638c1b28f Add const lvalue ref to editor/* container parameters 2024-02-26 15:28:15 -03:00
9281c441f6 Improved text editor status bar and zooming UX. 2024-02-21 17:33:16 -06:00
d2e651f403 Add Duplicate Lines shortcut to CodeTextEditor
This keyboard shortcut has been made with inspiration from the VS Code keyboard shortcut editor.action.copyLinesDownAction. It duplicates all selected lines and inserts them below no matter where the caret is within the line.
2023-09-25 23:41:31 +02:00
67dce301aa Add code region folding to CodeEdit 2023-09-11 18:36:40 +02:00
83b01708b2 Script editor: Show depended script errors 2023-07-24 15:49:39 +02:00
006e899bb3 sort code completions with rules
Fixups

Add levenshtein distance for comparisons, remove kind sort order, try to improve as many different use cases as possible

Trying again to improve code completion

Sort code autocompletion options by similarity based on input

To make it really brief, uses a combination `String.similiary`, the category system introduced in a previous PR, and some filtering to yield more predictable results, instead of scattering every completion option at seemingly random.

It also gives much higher priority to strings that contain the base in full, closer to the beginning or are perfect matches.

Also moves CodeCompletionOptionCompare to code_edit.cpp

Co-Authored-By: Micky <66727710+Mickeon@users.noreply.github.com>
Co-Authored-By: Eric M <41730826+EricEzaM@users.noreply.github.com>
2023-05-23 05:12:34 +02:00
0b3fba45c6 Move convert_indent into CodeEdit 2023-05-07 13:08:37 +01:00
ff310f0969 Add shortcut for quick-toggling word wrap 2023-04-19 23:46:22 +02:00
59ea36b87c Remove set_drag_forwarding_compat() 2023-01-14 15:16:51 +01:00
d95794ec8a One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
c90d0bd84f Use forward-declarations in big editor classes 2022-11-29 09:59:43 +01:00
d499071e5b Set the shortcut context for the edit/search/goto menus to the ScriptEditor so that shortcuts continue to work when FindReplaceBar is focused. 2022-10-25 19:52:42 +10:00
af0ee8b0a0 Reorganize script editor menu 2022-10-14 18:41:01 +02:00
121e1df55b Merge pull request #66300 from KoBeWi/📝🧭
Split script navigation state and edit state
2022-10-05 08:30:49 +02:00
ded10214bf Rename Indent Left/Right to Indent/Dedent 2022-09-29 14:42:46 +02:00
14435ebcee Split script navigation state and edit state 2022-09-25 23:06:39 +02:00
8be27dc59e Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
45af29da80 Add a new HashSet template
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
2022-05-20 22:40:38 +02:00
746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
180e5d3028 Remove RES and REF typedefs in favor of spelled out Ref<>
These typedefs don't save much typing compared to the full `Ref<Resource>`
and `Ref<RefCounted>`, yet they sometimes introduce confusion among
new contributors.
2022-05-03 01:43:50 +02:00
4ab605d14d Improve sorting of Code Completion options.
Done by ordering options by their location in the code - e.g. local, parent class, global, etc.
2022-04-01 20:39:09 +10:00
360dea5348 Add GDExtension support to Script
* Ability to create script languages from GDExtension
* Some additions to gdnative_extension.h to make this happen
* Moved the GDExtension binder to core

This now allows creating scripting languages from GDExtension, with the same ease as if it was a module. It replaces the old PluginScript from Godot 3.x.
Warning: GodotCPP will need to be updated to support this (it may be a bit of work as ScriptInstance needs to be created over there again).
2022-03-27 16:13:00 +02:00
050f746e19 Fix theming update of shader editor 2022-01-25 12:10:07 +03:00
f43f68f605 Convert TextEdit callbacks to Callable 2022-01-19 17:26:22 +00:00
fe52458154 Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
1dda47c280 Added status bar and toggle scripts panel button to EditorHelp/VScripts 2021-09-15 11:35:03 +03:00
58c30b2626 Merge pull request #51639 from Ev1lbl0w/gsoc21-dap
Implement more advanced features for DAP
2021-09-01 16:17:32 +02:00
292ed61c18 Implemented advanced features of DAP
Respect client "supportsVariableType" capability

Implement "breakpointLocations" request

Implement "restart" request

Implement "evaluate" request

Fix error messages not being shown, and improved wrong path message

Removed thread option and behavior

Implemented detailed inspection of complex variables

Fix "const"ness of functions

Added a configurable timeout for requests

Implement Godot custom data request/event

Implement syncing of breakpoints

Added support for debugging native platforms
2021-08-31 15:17:58 +01:00
16c2d4ef22 Improve Undo/Redo menu items
* Make Undo/Redo menu items disabled when clicking it does nothing.
    * Context menu of `TextEdit`
    * Context menu of `LineEdit`
    * Editor's Scene menu
    * Script editor's Edit menu and context menu (for Script and Text)
* Make editor undo/redo log messages translatable.
* Mark `UndoRedo`'s `has_{un,re}do()` methods as `const`.
* Expose `TextEdit`'s `has_{un,re}do()` to scripts since `{un,re}do()` are already available.
2021-08-17 21:11:10 +08:00
d41f4aca77 Script editor: Rename 'Clone Down' to 'Duplicate Selection'
Fixes #36670.
2021-06-29 12:14:24 +02:00
d0e78c86d7 Added support for scripts reporting multiple errors to ScriptTextEditor
Scripts can now report multiple errors to the scripting editors in the engine. UI elements were added to support multiple errors.
2021-06-19 22:20:30 +10:00
da6aebeb4c Move FindReplaceBar out of CodeTextEditor 2021-06-08 23:23:07 +02:00
00e10a842f Add custom background line colour to TextEdit and remove marked lines 2021-05-22 14:41:55 +01:00
2b30728ebf Add get_base_editor to ScriptEditorBase 2021-05-15 18:47:00 +07:00
b5334d14f7 Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
33ab9cd621 Move safe line color into editor 2020-09-10 20:35:28 +01:00
d18a90b8f0 Move ConnectionGutter to editor code_editor 2020-09-10 20:35:28 +01:00