Skip to content

Commit 643e6bc

Browse files
committed
addon: lint: remove gutter icons for now to avoid line numbers disappearing
Close #169
1 parent 5093674 commit 643e6bc

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

addons/GDQuest_GDScript_formatter/plugin.gd

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ var DEFAULT_SETTINGS = {
4747

4848
## Which gutter lint icons are shown in.
4949
## By default, gutter 0 is for breakpoints and 1 is for things like overrides.
50-
const LINT_ICON_GUTTER := 2
50+
# FIXME: see other FIXME comment about gutter icons
51+
# const LINT_ICON_GUTTER := 2
5152

5253
var connection_list: Array[Resource] = []
5354
var installer: FormatterInstaller = null
@@ -612,11 +613,13 @@ func apply_lint_highlights(code_edit: CodeEdit, issues: Array) -> void:
612613

613614
code_edit.set_line_background_color(line_number, color)
614615

615-
# Add gutter icon for severity
616-
var icon_name = "StatusError" if severity == "error" else "StatusWarning"
617-
var icon = EditorInterface.get_editor_theme().get_icon(icon_name, "EditorIcons")
618-
code_edit.set_gutter_type(LINT_ICON_GUTTER, CodeEdit.GutterType.GUTTER_TYPE_ICON)
619-
code_edit.set_line_gutter_icon(line_number, LINT_ICON_GUTTER, icon)
616+
# FIXME: This currently removes line numbers as Godot's script editor uses all its gutters,
617+
# I commented out the code in case someone wants to solve it, otherwise this should be removed.
618+
#
619+
# var icon_name = "StatusError" if severity == "error" else "StatusWarning"
620+
# var icon = EditorInterface.get_editor_theme().get_icon(icon_name, "EditorIcons")
621+
# code_edit.set_gutter_type(LINT_ICON_GUTTER, CodeEdit.GutterType.GUTTER_TYPE_ICON)
622+
# code_edit.set_line_gutter_icon(line_number, LINT_ICON_GUTTER, icon)
620623

621624

622625
## Prints a detailed summary of lint issues to the output
@@ -644,7 +647,8 @@ func print_lint_summary(issues: Array, script_path: String) -> void:
644647
func clear_lint_highlights(code_edit: CodeEdit) -> void:
645648
for line in range(code_edit.get_line_count()):
646649
code_edit.set_line_background_color(line, Color(0, 0, 0, 0))
647-
code_edit.set_line_gutter_icon(line, LINT_ICON_GUTTER, null)
650+
# FIXME: See other FIXME comment about gutter icons
651+
# code_edit.set_line_gutter_icon(line, LINT_ICON_GUTTER, null)
648652

649653

650654
## Data structure to hold code editor state information

0 commit comments

Comments
 (0)