:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/4.3/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/4.3/doc/classes/CodeEdit.xml. .. _class_CodeEdit: CodeEdit ======== **Inherits:** :ref:`TextEdit` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` A multiline text editor designed for editing code. .. rst-class:: classref-introduction-group Description ----------- CodeEdit is a specialized :ref:`TextEdit` designed for editing plain text code files. It has many features commonly found in code editors such as line numbers, line folding, code completion, indent management, and string/comment management. \ **Note:** Regardless of locale, **CodeEdit** will by default always use left-to-right text direction to correctly display source code. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`auto_brace_completion_enabled` | ``false`` | +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`auto_brace_completion_highlight_matching` | ``false`` | +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`auto_brace_completion_pairs` | ``{ "\"": "\"", "'": "'", "(": ")", "[": "]", "{": "}" }`` | +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`code_completion_enabled` | ``false`` | +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`String`\] | :ref:`code_completion_prefixes` | ``[]`` | +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`String`\] | :ref:`delimiter_comments` | ``[]`` | +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`String`\] | :ref:`delimiter_strings` | ``["' '", "\" \""]`` | +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`gutters_draw_bookmarks` | ``false`` | +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`gutters_draw_breakpoints_gutter` | ``false`` | +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`gutters_draw_executing_lines` | ``false`` | +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`gutters_draw_fold_gutter` | ``false`` | +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`gutters_draw_line_numbers` | ``false`` | +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`gutters_zero_pad_line_numbers` | ``false`` | +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`indent_automatic` | ``false`` | +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`String`\] | :ref:`indent_automatic_prefixes` | ``[":", "{", "[", "("]`` | +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`int` | :ref:`indent_size` | ``4`` | +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`indent_use_spaces` | ``false`` | +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`LayoutDirection` | layout_direction | ``2`` (overrides :ref:`Control`) | +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`line_folding` | ``false`` | +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`int`\] | :ref:`line_length_guidelines` | ``[]`` | +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`symbol_lookup_on_click` | ``false`` | +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`TextDirection` | text_direction | ``1`` (overrides :ref:`TextEdit`) | +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_confirm_code_completion`\ (\ replace\: :ref:`bool`\ ) |virtual| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`_filter_code_completion_candidates`\ (\ candidates\: :ref:`Array`\[:ref:`Dictionary`\]\ ) |virtual| |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_request_code_completion`\ (\ force\: :ref:`bool`\ ) |virtual| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_auto_brace_completion_pair`\ (\ start_key\: :ref:`String`, end_key\: :ref:`String`\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_code_completion_option`\ (\ type\: :ref:`CodeCompletionKind`, display_text\: :ref:`String`, insert_text\: :ref:`String`, text_color\: :ref:`Color` = Color(1, 1, 1, 1), icon\: :ref:`Resource` = null, value\: :ref:`Variant` = null, location\: :ref:`int` = 1024\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_comment_delimiter`\ (\ start_key\: :ref:`String`, end_key\: :ref:`String`, line_only\: :ref:`bool` = false\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_string_delimiter`\ (\ start_key\: :ref:`String`, end_key\: :ref:`String`, line_only\: :ref:`bool` = false\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`can_fold_line`\ (\ line\: :ref:`int`\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`cancel_code_completion`\ (\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`clear_bookmarked_lines`\ (\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`clear_breakpointed_lines`\ (\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`clear_comment_delimiters`\ (\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`clear_executing_lines`\ (\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`clear_string_delimiters`\ (\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`confirm_code_completion`\ (\ replace\: :ref:`bool` = false\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`convert_indent`\ (\ from_line\: :ref:`int` = -1, to_line\: :ref:`int` = -1\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`create_code_region`\ (\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`delete_lines`\ (\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`do_indent`\ (\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`duplicate_lines`\ (\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`duplicate_selection`\ (\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`fold_all_lines`\ (\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`fold_line`\ (\ line\: :ref:`int`\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_auto_brace_completion_close_key`\ (\ open_key\: :ref:`String`\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`get_bookmarked_lines`\ (\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`get_breakpointed_lines`\ (\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`get_code_completion_option`\ (\ index\: :ref:`int`\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`get_code_completion_options`\ (\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_code_completion_selected_index`\ (\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_code_region_end_tag`\ (\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_code_region_start_tag`\ (\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_delimiter_end_key`\ (\ delimiter_index\: :ref:`int`\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_delimiter_end_position`\ (\ line\: :ref:`int`, column\: :ref:`int`\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_delimiter_start_key`\ (\ delimiter_index\: :ref:`int`\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_delimiter_start_position`\ (\ line\: :ref:`int`, column\: :ref:`int`\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`get_executing_lines`\ (\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`int`\] | :ref:`get_folded_lines`\ (\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_text_for_code_completion`\ (\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_text_for_symbol_lookup`\ (\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_text_with_cursor_char`\ (\ line\: :ref:`int`, column\: :ref:`int`\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_auto_brace_completion_close_key`\ (\ close_key\: :ref:`String`\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_auto_brace_completion_open_key`\ (\ open_key\: :ref:`String`\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_comment_delimiter`\ (\ start_key\: :ref:`String`\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_string_delimiter`\ (\ start_key\: :ref:`String`\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`indent_lines`\ (\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`is_in_comment`\ (\ line\: :ref:`int`, column\: :ref:`int` = -1\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`is_in_string`\ (\ line\: :ref:`int`, column\: :ref:`int` = -1\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_line_bookmarked`\ (\ line\: :ref:`int`\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_line_breakpointed`\ (\ line\: :ref:`int`\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_line_code_region_end`\ (\ line\: :ref:`int`\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_line_code_region_start`\ (\ line\: :ref:`int`\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_line_executing`\ (\ line\: :ref:`int`\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_line_folded`\ (\ line\: :ref:`int`\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`move_lines_down`\ (\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`move_lines_up`\ (\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`remove_comment_delimiter`\ (\ start_key\: :ref:`String`\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`remove_string_delimiter`\ (\ start_key\: :ref:`String`\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`request_code_completion`\ (\ force\: :ref:`bool` = false\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_code_completion_selected_index`\ (\ index\: :ref:`int`\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_code_hint`\ (\ code_hint\: :ref:`String`\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_code_hint_draw_below`\ (\ draw_below\: :ref:`bool`\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_code_region_tags`\ (\ start\: :ref:`String` = "region", end\: :ref:`String` = "endregion"\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_line_as_bookmarked`\ (\ line\: :ref:`int`, bookmarked\: :ref:`bool`\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_line_as_breakpoint`\ (\ line\: :ref:`int`, breakpointed\: :ref:`bool`\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_line_as_executing`\ (\ line\: :ref:`int`, executing\: :ref:`bool`\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_symbol_lookup_word_as_valid`\ (\ valid\: :ref:`bool`\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`toggle_foldable_line`\ (\ line\: :ref:`int`\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`toggle_foldable_lines_at_carets`\ (\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`unfold_all_lines`\ (\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`unfold_line`\ (\ line\: :ref:`int`\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`unindent_lines`\ (\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`update_code_completion_options`\ (\ force\: :ref:`bool`\ ) | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group Theme Properties ---------------- .. table:: :widths: auto +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Color` | :ref:`bookmark_color` | ``Color(0.5, 0.64, 1, 0.8)`` | +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Color` | :ref:`brace_mismatch_color` | ``Color(1, 0.2, 0.2, 1)`` | +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Color` | :ref:`breakpoint_color` | ``Color(0.9, 0.29, 0.3, 1)`` | +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Color` | :ref:`code_folding_color` | ``Color(0.8, 0.8, 0.8, 0.8)`` | +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Color` | :ref:`completion_background_color` | ``Color(0.17, 0.16, 0.2, 1)`` | +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Color` | :ref:`completion_existing_color` | ``Color(0.87, 0.87, 0.87, 0.13)`` | +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Color` | :ref:`completion_scroll_color` | ``Color(1, 1, 1, 0.29)`` | +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Color` | :ref:`completion_scroll_hovered_color` | ``Color(1, 1, 1, 0.4)`` | +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Color` | :ref:`completion_selected_color` | ``Color(0.26, 0.26, 0.27, 1)`` | +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Color` | :ref:`executing_line_color` | ``Color(0.98, 0.89, 0.27, 1)`` | +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Color` | :ref:`folded_code_region_color` | ``Color(0.68, 0.46, 0.77, 0.2)`` | +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Color` | :ref:`line_length_guideline_color` | ``Color(0.3, 0.5, 0.8, 0.1)`` | +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Color` | :ref:`line_number_color` | ``Color(0.67, 0.67, 0.67, 0.4)`` | +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`completion_lines` | ``7`` | +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`completion_max_width` | ``50`` | +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`completion_scroll_width` | ``6`` | +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Texture2D` | :ref:`bookmark` | | +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Texture2D` | :ref:`breakpoint` | | +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Texture2D` | :ref:`can_fold` | | +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Texture2D` | :ref:`can_fold_code_region` | | +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Texture2D` | :ref:`executing_line` | | +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Texture2D` | :ref:`folded` | | +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Texture2D` | :ref:`folded_code_region` | | +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Texture2D` | :ref:`folded_eol_icon` | | +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`StyleBox` | :ref:`completion` | | +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Signals ------- .. _class_CodeEdit_signal_breakpoint_toggled: .. rst-class:: classref-signal **breakpoint_toggled**\ (\ line\: :ref:`int`\ ) :ref:`🔗` Emitted when a breakpoint is added or removed from a line. If the line is moved via backspace a removed is emitted at the old line. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_signal_code_completion_requested: .. rst-class:: classref-signal **code_completion_requested**\ (\ ) :ref:`🔗` Emitted when the user requests code completion. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_signal_symbol_lookup: .. rst-class:: classref-signal **symbol_lookup**\ (\ symbol\: :ref:`String`, line\: :ref:`int`, column\: :ref:`int`\ ) :ref:`🔗` Emitted when the user has clicked on a valid symbol. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_signal_symbol_validate: .. rst-class:: classref-signal **symbol_validate**\ (\ symbol\: :ref:`String`\ ) :ref:`🔗` Emitted when the user hovers over a symbol. The symbol should be validated and responded to, by calling :ref:`set_symbol_lookup_word_as_valid`. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_CodeEdit_CodeCompletionKind: .. rst-class:: classref-enumeration enum **CodeCompletionKind**: :ref:`🔗` .. _class_CodeEdit_constant_KIND_CLASS: .. rst-class:: classref-enumeration-constant :ref:`CodeCompletionKind` **KIND_CLASS** = ``0`` Marks the option as a class. .. _class_CodeEdit_constant_KIND_FUNCTION: .. rst-class:: classref-enumeration-constant :ref:`CodeCompletionKind` **KIND_FUNCTION** = ``1`` Marks the option as a function. .. _class_CodeEdit_constant_KIND_SIGNAL: .. rst-class:: classref-enumeration-constant :ref:`CodeCompletionKind` **KIND_SIGNAL** = ``2`` Marks the option as a Godot signal. .. _class_CodeEdit_constant_KIND_VARIABLE: .. rst-class:: classref-enumeration-constant :ref:`CodeCompletionKind` **KIND_VARIABLE** = ``3`` Marks the option as a variable. .. _class_CodeEdit_constant_KIND_MEMBER: .. rst-class:: classref-enumeration-constant :ref:`CodeCompletionKind` **KIND_MEMBER** = ``4`` Marks the option as a member. .. _class_CodeEdit_constant_KIND_ENUM: .. rst-class:: classref-enumeration-constant :ref:`CodeCompletionKind` **KIND_ENUM** = ``5`` Marks the option as an enum entry. .. _class_CodeEdit_constant_KIND_CONSTANT: .. rst-class:: classref-enumeration-constant :ref:`CodeCompletionKind` **KIND_CONSTANT** = ``6`` Marks the option as a constant. .. _class_CodeEdit_constant_KIND_NODE_PATH: .. rst-class:: classref-enumeration-constant :ref:`CodeCompletionKind` **KIND_NODE_PATH** = ``7`` Marks the option as a Godot node path. .. _class_CodeEdit_constant_KIND_FILE_PATH: .. rst-class:: classref-enumeration-constant :ref:`CodeCompletionKind` **KIND_FILE_PATH** = ``8`` Marks the option as a file path. .. _class_CodeEdit_constant_KIND_PLAIN_TEXT: .. rst-class:: classref-enumeration-constant :ref:`CodeCompletionKind` **KIND_PLAIN_TEXT** = ``9`` Marks the option as unclassified or plain text. .. rst-class:: classref-item-separator ---- .. _enum_CodeEdit_CodeCompletionLocation: .. rst-class:: classref-enumeration enum **CodeCompletionLocation**: :ref:`🔗` .. _class_CodeEdit_constant_LOCATION_LOCAL: .. rst-class:: classref-enumeration-constant :ref:`CodeCompletionLocation` **LOCATION_LOCAL** = ``0`` The option is local to the location of the code completion query - e.g. a local variable. Subsequent value of location represent options from the outer class, the exact value represent how far they are (in terms of inner classes). .. _class_CodeEdit_constant_LOCATION_PARENT_MASK: .. rst-class:: classref-enumeration-constant :ref:`CodeCompletionLocation` **LOCATION_PARENT_MASK** = ``256`` The option is from the containing class or a parent class, relative to the location of the code completion query. Perform a bitwise OR with the class depth (e.g. ``0`` for the local class, ``1`` for the parent, ``2`` for the grandparent, etc.) to store the depth of an option in the class or a parent class. .. _class_CodeEdit_constant_LOCATION_OTHER_USER_CODE: .. rst-class:: classref-enumeration-constant :ref:`CodeCompletionLocation` **LOCATION_OTHER_USER_CODE** = ``512`` The option is from user code which is not local and not in a derived class (e.g. Autoload Singletons). .. _class_CodeEdit_constant_LOCATION_OTHER: .. rst-class:: classref-enumeration-constant :ref:`CodeCompletionLocation` **LOCATION_OTHER** = ``1024`` The option is from other engine code, not covered by the other enum constants - e.g. built-in classes. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CodeEdit_property_auto_brace_completion_enabled: .. rst-class:: classref-property :ref:`bool` **auto_brace_completion_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_auto_brace_completion_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_auto_brace_completion_enabled**\ (\ ) Sets whether brace pairs should be autocompleted. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_property_auto_brace_completion_highlight_matching: .. rst-class:: classref-property :ref:`bool` **auto_brace_completion_highlight_matching** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_highlight_matching_braces_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_highlight_matching_braces_enabled**\ (\ ) Highlight mismatching brace pairs. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_property_auto_brace_completion_pairs: .. rst-class:: classref-property :ref:`Dictionary` **auto_brace_completion_pairs** = ``{ "\"": "\"", "'": "'", "(": ")", "[": "]", "{": "}" }`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_auto_brace_completion_pairs**\ (\ value\: :ref:`Dictionary`\ ) - :ref:`Dictionary` **get_auto_brace_completion_pairs**\ (\ ) Sets the brace pairs to be autocompleted. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_property_code_completion_enabled: .. rst-class:: classref-property :ref:`bool` **code_completion_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_code_completion_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_code_completion_enabled**\ (\ ) Sets whether code completion is allowed. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_property_code_completion_prefixes: .. rst-class:: classref-property :ref:`Array`\[:ref:`String`\] **code_completion_prefixes** = ``[]`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_code_completion_prefixes**\ (\ value\: :ref:`Array`\[:ref:`String`\]\ ) - :ref:`Array`\[:ref:`String`\] **get_code_completion_prefixes**\ (\ ) Sets prefixes that will trigger code completion. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_property_delimiter_comments: .. rst-class:: classref-property :ref:`Array`\[:ref:`String`\] **delimiter_comments** = ``[]`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_comment_delimiters**\ (\ value\: :ref:`Array`\[:ref:`String`\]\ ) - :ref:`Array`\[:ref:`String`\] **get_comment_delimiters**\ (\ ) Sets the comment delimiters. All existing comment delimiters will be removed. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_property_delimiter_strings: .. rst-class:: classref-property :ref:`Array`\[:ref:`String`\] **delimiter_strings** = ``["' '", "\" \""]`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_string_delimiters**\ (\ value\: :ref:`Array`\[:ref:`String`\]\ ) - :ref:`Array`\[:ref:`String`\] **get_string_delimiters**\ (\ ) Sets the string delimiters. All existing string delimiters will be removed. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_property_gutters_draw_bookmarks: .. rst-class:: classref-property :ref:`bool` **gutters_draw_bookmarks** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_draw_bookmarks_gutter**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_drawing_bookmarks_gutter**\ (\ ) Sets if bookmarked should be drawn in the gutter. This gutter is shared with breakpoints and executing lines. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_property_gutters_draw_breakpoints_gutter: .. rst-class:: classref-property :ref:`bool` **gutters_draw_breakpoints_gutter** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_draw_breakpoints_gutter**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_drawing_breakpoints_gutter**\ (\ ) Sets if breakpoints should be drawn in the gutter. This gutter is shared with bookmarks and executing lines. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_property_gutters_draw_executing_lines: .. rst-class:: classref-property :ref:`bool` **gutters_draw_executing_lines** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_draw_executing_lines_gutter**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_drawing_executing_lines_gutter**\ (\ ) Sets if executing lines should be marked in the gutter. This gutter is shared with breakpoints and bookmarks lines. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_property_gutters_draw_fold_gutter: .. rst-class:: classref-property :ref:`bool` **gutters_draw_fold_gutter** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_draw_fold_gutter**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_drawing_fold_gutter**\ (\ ) Sets if foldable lines icons should be drawn in the gutter. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_property_gutters_draw_line_numbers: .. rst-class:: classref-property :ref:`bool` **gutters_draw_line_numbers** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_draw_line_numbers**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_draw_line_numbers_enabled**\ (\ ) Sets if line numbers should be drawn in the gutter. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_property_gutters_zero_pad_line_numbers: .. rst-class:: classref-property :ref:`bool` **gutters_zero_pad_line_numbers** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_line_numbers_zero_padded**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_line_numbers_zero_padded**\ (\ ) Sets if line numbers drawn in the gutter are zero padded. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_property_indent_automatic: .. rst-class:: classref-property :ref:`bool` **indent_automatic** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_auto_indent_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_auto_indent_enabled**\ (\ ) Sets whether automatic indent are enabled, this will add an extra indent if a prefix or brace is found. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_property_indent_automatic_prefixes: .. rst-class:: classref-property :ref:`Array`\[:ref:`String`\] **indent_automatic_prefixes** = ``[":", "{", "[", "("]`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_auto_indent_prefixes**\ (\ value\: :ref:`Array`\[:ref:`String`\]\ ) - :ref:`Array`\[:ref:`String`\] **get_auto_indent_prefixes**\ (\ ) Prefixes to trigger an automatic indent. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_property_indent_size: .. rst-class:: classref-property :ref:`int` **indent_size** = ``4`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_indent_size**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_indent_size**\ (\ ) Size of the tabulation indent (one :kbd:`Tab` press) in characters. If :ref:`indent_use_spaces` is enabled the number of spaces to use. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_property_indent_use_spaces: .. rst-class:: classref-property :ref:`bool` **indent_use_spaces** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_indent_using_spaces**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_indent_using_spaces**\ (\ ) Use spaces instead of tabs for indentation. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_property_line_folding: .. rst-class:: classref-property :ref:`bool` **line_folding** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_line_folding_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_line_folding_enabled**\ (\ ) Sets whether line folding is allowed. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_property_line_length_guidelines: .. rst-class:: classref-property :ref:`Array`\[:ref:`int`\] **line_length_guidelines** = ``[]`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_line_length_guidelines**\ (\ value\: :ref:`Array`\[:ref:`int`\]\ ) - :ref:`Array`\[:ref:`int`\] **get_line_length_guidelines**\ (\ ) Draws vertical lines at the provided columns. The first entry is considered a main hard guideline and is draw more prominently. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_property_symbol_lookup_on_click: .. rst-class:: classref-property :ref:`bool` **symbol_lookup_on_click** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_symbol_lookup_on_click_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_symbol_lookup_on_click_enabled**\ (\ ) Set when a validated word from :ref:`symbol_validate` is clicked, the :ref:`symbol_lookup` should be emitted. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_CodeEdit_private_method__confirm_code_completion: .. rst-class:: classref-method |void| **_confirm_code_completion**\ (\ replace\: :ref:`bool`\ ) |virtual| :ref:`🔗` Override this method to define how the selected entry should be inserted. If ``replace`` is ``true``, any existing text should be replaced. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_private_method__filter_code_completion_candidates: .. rst-class:: classref-method :ref:`Array`\[:ref:`Dictionary`\] **_filter_code_completion_candidates**\ (\ candidates\: :ref:`Array`\[:ref:`Dictionary`\]\ ) |virtual| |const| :ref:`🔗` Override this method to define what items in ``candidates`` should be displayed. Both ``candidates`` and the return is a :ref:`Array` of :ref:`Dictionary`, see :ref:`get_code_completion_option` for :ref:`Dictionary` content. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_private_method__request_code_completion: .. rst-class:: classref-method |void| **_request_code_completion**\ (\ force\: :ref:`bool`\ ) |virtual| :ref:`🔗` Override this method to define what happens when the user requests code completion. If ``force`` is ``true``, any checks should be bypassed. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_add_auto_brace_completion_pair: .. rst-class:: classref-method |void| **add_auto_brace_completion_pair**\ (\ start_key\: :ref:`String`, end_key\: :ref:`String`\ ) :ref:`🔗` Adds a brace pair. Both the start and end keys must be symbols. Only the start key has to be unique. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_add_code_completion_option: .. rst-class:: classref-method |void| **add_code_completion_option**\ (\ type\: :ref:`CodeCompletionKind`, display_text\: :ref:`String`, insert_text\: :ref:`String`, text_color\: :ref:`Color` = Color(1, 1, 1, 1), icon\: :ref:`Resource` = null, value\: :ref:`Variant` = null, location\: :ref:`int` = 1024\ ) :ref:`🔗` Submits an item to the queue of potential candidates for the autocomplete menu. Call :ref:`update_code_completion_options` to update the list. \ ``location`` indicates location of the option relative to the location of the code completion query. See :ref:`CodeCompletionLocation` for how to set this value. \ **Note:** This list will replace all current candidates. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_add_comment_delimiter: .. rst-class:: classref-method |void| **add_comment_delimiter**\ (\ start_key\: :ref:`String`, end_key\: :ref:`String`, line_only\: :ref:`bool` = false\ ) :ref:`🔗` Adds a comment delimiter from ``start_key`` to ``end_key``. Both keys should be symbols, and ``start_key`` must not be shared with other delimiters. If ``line_only`` is ``true`` or ``end_key`` is an empty :ref:`String`, the region does not carry over to the next line. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_add_string_delimiter: .. rst-class:: classref-method |void| **add_string_delimiter**\ (\ start_key\: :ref:`String`, end_key\: :ref:`String`, line_only\: :ref:`bool` = false\ ) :ref:`🔗` Defines a string delimiter from ``start_key`` to ``end_key``. Both keys should be symbols, and ``start_key`` must not be shared with other delimiters. If ``line_only`` is ``true`` or ``end_key`` is an empty :ref:`String`, the region does not carry over to the next line. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_can_fold_line: .. rst-class:: classref-method :ref:`bool` **can_fold_line**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` Returns if the given line is foldable, that is, it has indented lines right below it or a comment / string block. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_cancel_code_completion: .. rst-class:: classref-method |void| **cancel_code_completion**\ (\ ) :ref:`🔗` Cancels the autocomplete menu. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_clear_bookmarked_lines: .. rst-class:: classref-method |void| **clear_bookmarked_lines**\ (\ ) :ref:`🔗` Clears all bookmarked lines. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_clear_breakpointed_lines: .. rst-class:: classref-method |void| **clear_breakpointed_lines**\ (\ ) :ref:`🔗` Clears all breakpointed lines. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_clear_comment_delimiters: .. rst-class:: classref-method |void| **clear_comment_delimiters**\ (\ ) :ref:`🔗` Removes all comment delimiters. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_clear_executing_lines: .. rst-class:: classref-method |void| **clear_executing_lines**\ (\ ) :ref:`🔗` Clears all executed lines. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_clear_string_delimiters: .. rst-class:: classref-method |void| **clear_string_delimiters**\ (\ ) :ref:`🔗` Removes all string delimiters. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_confirm_code_completion: .. rst-class:: classref-method |void| **confirm_code_completion**\ (\ replace\: :ref:`bool` = false\ ) :ref:`🔗` Inserts the selected entry into the text. If ``replace`` is ``true``, any existing text is replaced rather than merged. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_convert_indent: .. rst-class:: classref-method |void| **convert_indent**\ (\ from_line\: :ref:`int` = -1, to_line\: :ref:`int` = -1\ ) :ref:`🔗` Converts the indents of lines between ``from_line`` and ``to_line`` to tabs or spaces as set by :ref:`indent_use_spaces`. Values of ``-1`` convert the entire text. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_create_code_region: .. rst-class:: classref-method |void| **create_code_region**\ (\ ) :ref:`🔗` Creates a new code region with the selection. At least one single line comment delimiter have to be defined (see :ref:`add_comment_delimiter`). A code region is a part of code that is highlighted when folded and can help organize your script. Code region start and end tags can be customized (see :ref:`set_code_region_tags`). Code regions are delimited using start and end tags (respectively ``region`` and ``endregion`` by default) preceded by one line comment delimiter. (eg. ``#region`` and ``#endregion``) .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_delete_lines: .. rst-class:: classref-method |void| **delete_lines**\ (\ ) :ref:`🔗` Deletes all lines that are selected or have a caret on them. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_do_indent: .. rst-class:: classref-method |void| **do_indent**\ (\ ) :ref:`🔗` Perform an indent as if the user activated the "ui_text_indent" action. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_duplicate_lines: .. rst-class:: classref-method |void| **duplicate_lines**\ (\ ) :ref:`🔗` Duplicates all lines currently selected with any caret. Duplicates the entire line beneath the current one no matter where the caret is within the line. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_duplicate_selection: .. rst-class:: classref-method |void| **duplicate_selection**\ (\ ) :ref:`🔗` Duplicates all selected text and duplicates all lines with a caret on them. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_fold_all_lines: .. rst-class:: classref-method |void| **fold_all_lines**\ (\ ) :ref:`🔗` Folds all lines that are possible to be folded (see :ref:`can_fold_line`). .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_fold_line: .. rst-class:: classref-method |void| **fold_line**\ (\ line\: :ref:`int`\ ) :ref:`🔗` Folds the given line, if possible (see :ref:`can_fold_line`). .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_get_auto_brace_completion_close_key: .. rst-class:: classref-method :ref:`String` **get_auto_brace_completion_close_key**\ (\ open_key\: :ref:`String`\ ) |const| :ref:`🔗` Gets the matching auto brace close key for ``open_key``. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_get_bookmarked_lines: .. rst-class:: classref-method :ref:`PackedInt32Array` **get_bookmarked_lines**\ (\ ) |const| :ref:`🔗` Gets all bookmarked lines. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_get_breakpointed_lines: .. rst-class:: classref-method :ref:`PackedInt32Array` **get_breakpointed_lines**\ (\ ) |const| :ref:`🔗` Gets all breakpointed lines. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_get_code_completion_option: .. rst-class:: classref-method :ref:`Dictionary` **get_code_completion_option**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` Gets the completion option at ``index``. The return :ref:`Dictionary` has the following key-values: \ ``kind``: :ref:`CodeCompletionKind`\ \ ``display_text``: Text that is shown on the autocomplete menu. \ ``insert_text``: Text that is to be inserted when this item is selected. \ ``font_color``: Color of the text on the autocomplete menu. \ ``icon``: Icon to draw on the autocomplete menu. \ ``default_value``: Value of the symbol. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_get_code_completion_options: .. rst-class:: classref-method :ref:`Array`\[:ref:`Dictionary`\] **get_code_completion_options**\ (\ ) |const| :ref:`🔗` Gets all completion options, see :ref:`get_code_completion_option` for return content. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_get_code_completion_selected_index: .. rst-class:: classref-method :ref:`int` **get_code_completion_selected_index**\ (\ ) |const| :ref:`🔗` Gets the index of the current selected completion option. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_get_code_region_end_tag: .. rst-class:: classref-method :ref:`String` **get_code_region_end_tag**\ (\ ) |const| :ref:`🔗` Returns the code region end tag (without comment delimiter). .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_get_code_region_start_tag: .. rst-class:: classref-method :ref:`String` **get_code_region_start_tag**\ (\ ) |const| :ref:`🔗` Returns the code region start tag (without comment delimiter). .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_get_delimiter_end_key: .. rst-class:: classref-method :ref:`String` **get_delimiter_end_key**\ (\ delimiter_index\: :ref:`int`\ ) |const| :ref:`🔗` Gets the end key for a string or comment region index. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_get_delimiter_end_position: .. rst-class:: classref-method :ref:`Vector2` **get_delimiter_end_position**\ (\ line\: :ref:`int`, column\: :ref:`int`\ ) |const| :ref:`🔗` If ``line`` ``column`` is in a string or comment, returns the end position of the region. If not or no end could be found, both :ref:`Vector2` values will be ``-1``. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_get_delimiter_start_key: .. rst-class:: classref-method :ref:`String` **get_delimiter_start_key**\ (\ delimiter_index\: :ref:`int`\ ) |const| :ref:`🔗` Gets the start key for a string or comment region index. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_get_delimiter_start_position: .. rst-class:: classref-method :ref:`Vector2` **get_delimiter_start_position**\ (\ line\: :ref:`int`, column\: :ref:`int`\ ) |const| :ref:`🔗` If ``line`` ``column`` is in a string or comment, returns the start position of the region. If not or no start could be found, both :ref:`Vector2` values will be ``-1``. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_get_executing_lines: .. rst-class:: classref-method :ref:`PackedInt32Array` **get_executing_lines**\ (\ ) |const| :ref:`🔗` Gets all executing lines. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_get_folded_lines: .. rst-class:: classref-method :ref:`Array`\[:ref:`int`\] **get_folded_lines**\ (\ ) |const| :ref:`🔗` Returns all lines that are current folded. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_get_text_for_code_completion: .. rst-class:: classref-method :ref:`String` **get_text_for_code_completion**\ (\ ) |const| :ref:`🔗` Returns the full text with char ``0xFFFF`` at the caret location. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_get_text_for_symbol_lookup: .. rst-class:: classref-method :ref:`String` **get_text_for_symbol_lookup**\ (\ ) |const| :ref:`🔗` Returns the full text with char ``0xFFFF`` at the cursor location. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_get_text_with_cursor_char: .. rst-class:: classref-method :ref:`String` **get_text_with_cursor_char**\ (\ line\: :ref:`int`, column\: :ref:`int`\ ) |const| :ref:`🔗` Returns the full text with char ``0xFFFF`` at the specified location. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_has_auto_brace_completion_close_key: .. rst-class:: classref-method :ref:`bool` **has_auto_brace_completion_close_key**\ (\ close_key\: :ref:`String`\ ) |const| :ref:`🔗` Returns ``true`` if close key ``close_key`` exists. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_has_auto_brace_completion_open_key: .. rst-class:: classref-method :ref:`bool` **has_auto_brace_completion_open_key**\ (\ open_key\: :ref:`String`\ ) |const| :ref:`🔗` Returns ``true`` if open key ``open_key`` exists. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_has_comment_delimiter: .. rst-class:: classref-method :ref:`bool` **has_comment_delimiter**\ (\ start_key\: :ref:`String`\ ) |const| :ref:`🔗` Returns ``true`` if comment ``start_key`` exists. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_has_string_delimiter: .. rst-class:: classref-method :ref:`bool` **has_string_delimiter**\ (\ start_key\: :ref:`String`\ ) |const| :ref:`🔗` Returns ``true`` if string ``start_key`` exists. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_indent_lines: .. rst-class:: classref-method |void| **indent_lines**\ (\ ) :ref:`🔗` Indents selected lines, or in the case of no selection the caret line by one. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_is_in_comment: .. rst-class:: classref-method :ref:`int` **is_in_comment**\ (\ line\: :ref:`int`, column\: :ref:`int` = -1\ ) |const| :ref:`🔗` Returns delimiter index if ``line`` ``column`` is in a comment. If ``column`` is not provided, will return delimiter index if the entire ``line`` is a comment. Otherwise ``-1``. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_is_in_string: .. rst-class:: classref-method :ref:`int` **is_in_string**\ (\ line\: :ref:`int`, column\: :ref:`int` = -1\ ) |const| :ref:`🔗` Returns the delimiter index if ``line`` ``column`` is in a string. If ``column`` is not provided, will return the delimiter index if the entire ``line`` is a string. Otherwise ``-1``. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_is_line_bookmarked: .. rst-class:: classref-method :ref:`bool` **is_line_bookmarked**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` Returns whether the line at the specified index is bookmarked or not. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_is_line_breakpointed: .. rst-class:: classref-method :ref:`bool` **is_line_breakpointed**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` Returns whether the line at the specified index is breakpointed or not. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_is_line_code_region_end: .. rst-class:: classref-method :ref:`bool` **is_line_code_region_end**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` Returns whether the line at the specified index is a code region end. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_is_line_code_region_start: .. rst-class:: classref-method :ref:`bool` **is_line_code_region_start**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` Returns whether the line at the specified index is a code region start. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_is_line_executing: .. rst-class:: classref-method :ref:`bool` **is_line_executing**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` Returns whether the line at the specified index is marked as executing or not. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_is_line_folded: .. rst-class:: classref-method :ref:`bool` **is_line_folded**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` Returns whether the line at the specified index is folded or not. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_move_lines_down: .. rst-class:: classref-method |void| **move_lines_down**\ (\ ) :ref:`🔗` Moves all lines down that are selected or have a caret on them. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_move_lines_up: .. rst-class:: classref-method |void| **move_lines_up**\ (\ ) :ref:`🔗` Moves all lines up that are selected or have a caret on them. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_remove_comment_delimiter: .. rst-class:: classref-method |void| **remove_comment_delimiter**\ (\ start_key\: :ref:`String`\ ) :ref:`🔗` Removes the comment delimiter with ``start_key``. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_remove_string_delimiter: .. rst-class:: classref-method |void| **remove_string_delimiter**\ (\ start_key\: :ref:`String`\ ) :ref:`🔗` Removes the string delimiter with ``start_key``. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_request_code_completion: .. rst-class:: classref-method |void| **request_code_completion**\ (\ force\: :ref:`bool` = false\ ) :ref:`🔗` Emits :ref:`code_completion_requested`, if ``force`` is ``true`` will bypass all checks. Otherwise will check that the caret is in a word or in front of a prefix. Will ignore the request if all current options are of type file path, node path, or signal. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_set_code_completion_selected_index: .. rst-class:: classref-method |void| **set_code_completion_selected_index**\ (\ index\: :ref:`int`\ ) :ref:`🔗` Sets the current selected completion option. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_set_code_hint: .. rst-class:: classref-method |void| **set_code_hint**\ (\ code_hint\: :ref:`String`\ ) :ref:`🔗` Sets the code hint text. Pass an empty string to clear. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_set_code_hint_draw_below: .. rst-class:: classref-method |void| **set_code_hint_draw_below**\ (\ draw_below\: :ref:`bool`\ ) :ref:`🔗` Sets if the code hint should draw below the text. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_set_code_region_tags: .. rst-class:: classref-method |void| **set_code_region_tags**\ (\ start\: :ref:`String` = "region", end\: :ref:`String` = "endregion"\ ) :ref:`🔗` Sets the code region start and end tags (without comment delimiter). .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_set_line_as_bookmarked: .. rst-class:: classref-method |void| **set_line_as_bookmarked**\ (\ line\: :ref:`int`, bookmarked\: :ref:`bool`\ ) :ref:`🔗` Sets the line as bookmarked. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_set_line_as_breakpoint: .. rst-class:: classref-method |void| **set_line_as_breakpoint**\ (\ line\: :ref:`int`, breakpointed\: :ref:`bool`\ ) :ref:`🔗` Sets the line as breakpointed. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_set_line_as_executing: .. rst-class:: classref-method |void| **set_line_as_executing**\ (\ line\: :ref:`int`, executing\: :ref:`bool`\ ) :ref:`🔗` Sets the line as executing. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_set_symbol_lookup_word_as_valid: .. rst-class:: classref-method |void| **set_symbol_lookup_word_as_valid**\ (\ valid\: :ref:`bool`\ ) :ref:`🔗` Sets the symbol emitted by :ref:`symbol_validate` as a valid lookup. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_toggle_foldable_line: .. rst-class:: classref-method |void| **toggle_foldable_line**\ (\ line\: :ref:`int`\ ) :ref:`🔗` Toggle the folding of the code block at the given line. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_toggle_foldable_lines_at_carets: .. rst-class:: classref-method |void| **toggle_foldable_lines_at_carets**\ (\ ) :ref:`🔗` Toggle the folding of the code block on all lines with a caret on them. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_unfold_all_lines: .. rst-class:: classref-method |void| **unfold_all_lines**\ (\ ) :ref:`🔗` Unfolds all lines, folded or not. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_unfold_line: .. rst-class:: classref-method |void| **unfold_line**\ (\ line\: :ref:`int`\ ) :ref:`🔗` Unfolds all lines that were previously folded. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_unindent_lines: .. rst-class:: classref-method |void| **unindent_lines**\ (\ ) :ref:`🔗` Unindents selected lines, or in the case of no selection the caret line by one. Same as performing "ui_text_unindent" action. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_method_update_code_completion_options: .. rst-class:: classref-method |void| **update_code_completion_options**\ (\ force\: :ref:`bool`\ ) :ref:`🔗` Submits all completion options added with :ref:`add_code_completion_option`. Will try to force the autocomplete menu to popup, if ``force`` is ``true``. \ **Note:** This will replace all current candidates. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Theme Property Descriptions --------------------------- .. _class_CodeEdit_theme_color_bookmark_color: .. rst-class:: classref-themeproperty :ref:`Color` **bookmark_color** = ``Color(0.5, 0.64, 1, 0.8)`` :ref:`🔗` :ref:`Color` of the bookmark icon for bookmarked lines. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_theme_color_brace_mismatch_color: .. rst-class:: classref-themeproperty :ref:`Color` **brace_mismatch_color** = ``Color(1, 0.2, 0.2, 1)`` :ref:`🔗` :ref:`Color` of the text to highlight mismatched braces. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_theme_color_breakpoint_color: .. rst-class:: classref-themeproperty :ref:`Color` **breakpoint_color** = ``Color(0.9, 0.29, 0.3, 1)`` :ref:`🔗` :ref:`Color` of the breakpoint icon for bookmarked lines. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_theme_color_code_folding_color: .. rst-class:: classref-themeproperty :ref:`Color` **code_folding_color** = ``Color(0.8, 0.8, 0.8, 0.8)`` :ref:`🔗` :ref:`Color` for all icons related to line folding. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_theme_color_completion_background_color: .. rst-class:: classref-themeproperty :ref:`Color` **completion_background_color** = ``Color(0.17, 0.16, 0.2, 1)`` :ref:`🔗` Sets the background :ref:`Color` for the code completion popup. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_theme_color_completion_existing_color: .. rst-class:: classref-themeproperty :ref:`Color` **completion_existing_color** = ``Color(0.87, 0.87, 0.87, 0.13)`` :ref:`🔗` Background highlight :ref:`Color` for matching text in code completion options. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_theme_color_completion_scroll_color: .. rst-class:: classref-themeproperty :ref:`Color` **completion_scroll_color** = ``Color(1, 1, 1, 0.29)`` :ref:`🔗` :ref:`Color` of the scrollbar in the code completion popup. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_theme_color_completion_scroll_hovered_color: .. rst-class:: classref-themeproperty :ref:`Color` **completion_scroll_hovered_color** = ``Color(1, 1, 1, 0.4)`` :ref:`🔗` :ref:`Color` of the scrollbar in the code completion popup when hovered. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_theme_color_completion_selected_color: .. rst-class:: classref-themeproperty :ref:`Color` **completion_selected_color** = ``Color(0.26, 0.26, 0.27, 1)`` :ref:`🔗` Background highlight :ref:`Color` for the current selected option item in the code completion popup. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_theme_color_executing_line_color: .. rst-class:: classref-themeproperty :ref:`Color` **executing_line_color** = ``Color(0.98, 0.89, 0.27, 1)`` :ref:`🔗` :ref:`Color` of the executing icon for executing lines. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_theme_color_folded_code_region_color: .. rst-class:: classref-themeproperty :ref:`Color` **folded_code_region_color** = ``Color(0.68, 0.46, 0.77, 0.2)`` :ref:`🔗` :ref:`Color` of background line highlight for folded code region. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_theme_color_line_length_guideline_color: .. rst-class:: classref-themeproperty :ref:`Color` **line_length_guideline_color** = ``Color(0.3, 0.5, 0.8, 0.1)`` :ref:`🔗` :ref:`Color` of the main line length guideline, secondary guidelines will have 50% alpha applied. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_theme_color_line_number_color: .. rst-class:: classref-themeproperty :ref:`Color` **line_number_color** = ``Color(0.67, 0.67, 0.67, 0.4)`` :ref:`🔗` Sets the :ref:`Color` of line numbers. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_theme_constant_completion_lines: .. rst-class:: classref-themeproperty :ref:`int` **completion_lines** = ``7`` :ref:`🔗` Max number of options to display in the code completion popup at any one time. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_theme_constant_completion_max_width: .. rst-class:: classref-themeproperty :ref:`int` **completion_max_width** = ``50`` :ref:`🔗` Max width of options in the code completion popup. Options longer than this will be cut off. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_theme_constant_completion_scroll_width: .. rst-class:: classref-themeproperty :ref:`int` **completion_scroll_width** = ``6`` :ref:`🔗` Width of the scrollbar in the code completion popup. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_theme_icon_bookmark: .. rst-class:: classref-themeproperty :ref:`Texture2D` **bookmark** :ref:`🔗` Sets a custom :ref:`Texture2D` to draw in the bookmark gutter for bookmarked lines. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_theme_icon_breakpoint: .. rst-class:: classref-themeproperty :ref:`Texture2D` **breakpoint** :ref:`🔗` Sets a custom :ref:`Texture2D` to draw in the breakpoint gutter for breakpointed lines. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_theme_icon_can_fold: .. rst-class:: classref-themeproperty :ref:`Texture2D` **can_fold** :ref:`🔗` Sets a custom :ref:`Texture2D` to draw in the line folding gutter when a line can be folded. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_theme_icon_can_fold_code_region: .. rst-class:: classref-themeproperty :ref:`Texture2D` **can_fold_code_region** :ref:`🔗` Sets a custom :ref:`Texture2D` to draw in the line folding gutter when a code region can be folded. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_theme_icon_executing_line: .. rst-class:: classref-themeproperty :ref:`Texture2D` **executing_line** :ref:`🔗` Icon to draw in the executing gutter for executing lines. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_theme_icon_folded: .. rst-class:: classref-themeproperty :ref:`Texture2D` **folded** :ref:`🔗` Sets a custom :ref:`Texture2D` to draw in the line folding gutter when a line is folded and can be unfolded. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_theme_icon_folded_code_region: .. rst-class:: classref-themeproperty :ref:`Texture2D` **folded_code_region** :ref:`🔗` Sets a custom :ref:`Texture2D` to draw in the line folding gutter when a code region is folded and can be unfolded. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_theme_icon_folded_eol_icon: .. rst-class:: classref-themeproperty :ref:`Texture2D` **folded_eol_icon** :ref:`🔗` Sets a custom :ref:`Texture2D` to draw at the end of a folded line. .. rst-class:: classref-item-separator ---- .. _class_CodeEdit_theme_style_completion: .. rst-class:: classref-themeproperty :ref:`StyleBox` **completion** :ref:`🔗` :ref:`StyleBox` for the code completion popup. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`