Skip to content

bug: flet_code_editor does not mark JSON errors in the gutter #6312

@hschneider

Description

@hschneider

Duplicate Check

Describe the bug

JSON errors are not marked in the gutter, while the same setup works for other languages e.g. SQL.

Code sample

Code
    gutter_style = fce.GutterStyle(
        text_style=ft.TextStyle(
            font_family="monospace", size=10
        ),
        show_line_numbers=True,
        show_folding_handles=False,
        show_errors=True,
        width=80,
        margin=0,
    )

    editorSrc = fce.CodeEditor(
        language=fce.CodeLanguage.JSON,
        code_theme=fce.CodeTheme.ATOM_ONE_LIGHT,
        gutter_style=gutter_style,
        value="",
        expand=True,
        text_style={
            "size": 13
        },
    )

To reproduce

Add some valid JSON. Now remove some comma or bracelet - nothing changes in the gutter.
Change language to SQL, add some SQL, make it invalid - errors are marked correctly.

Expected behavior

Should work with JSON as well.

Screenshots / Videos

Operating System

macOS

Operating system details

macOS 15.7.4

Flet version

Flet 0.82.2 on macOS 15.7.4 (x86_64) Python 3.12.10

Regression

I'm not sure / I don't know

Suggestions

No response

Logs

No response

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions