face-hh / griddycode

A code editor made with Godot. Code has never been more lit!
Apache License 2.0
1.82k stars 115 forks source link

Syntax highlights is automated in certain files that is unwanted #81

Closed Symmettry closed 8 months ago

Symmettry commented 8 months ago

Describe the bug Stuff like numbers, commas, symbols, etc. is highlighted everywhere which has some problems

To Reproduce

  1. make a txt file
  2. type stuff like "and" or "of"
  3. it highlights.

Expected behavior .txt files should not have any highlighting.

Screenshots image

Desktop (please complete the following information):

ItsTato commented 8 months ago

Try closing and re-launching the editor. It may be caching the highlight instructions from another language (if you've opened any file that is compatible or has a .lua file for it, the editor is infamous for not clearing that)

If after re-launching the editor and opening only that .txt file it still happens then 😭

Symmettry commented 8 months ago

The old symbols clear, but there are still highlights that shouldn't exist (e.g. binary operators, commas, and periods)

ItsTato commented 8 months ago

Those are provided by our face-hh overlord

face-hh commented 8 months ago

This is because the CodeEdit node has the option to highlight the symbols, functions, etc., something the themes API takes advantage of. It can be disabled, and we could add something like disable_highlighting() to the plugins API for stuff like txt, but I really don't see a need in that as txt doesn't require any plugin at all

Symmettry commented 8 months ago

I think you should. There's no reason to highlight txt or log or really any of those files.

face-hh commented 8 months ago

Merging issue with #92