zyedidia / micro

A modern and intuitive terminal-based text editor
https://micro-editor.github.io
MIT License
24.47k stars 1.16k forks source link

Add syntax highlight code for ignore files #3104

Open taconi opened 6 months ago

taconi commented 6 months ago

Adding ignore file support by default so you don't need to install the language-ignore plugin.

image

Andriamanitra commented 6 months ago

I like the idea but I would reconsider the syntax groups. The current colors seem a bit weird because files are not statements, wildcards are not identifiers, and negated files are definitely not errors.

Screenshots

Using the default config: ![image](https://github.com/zyedidia/micro/assets/10672443/238a48a0-54bf-4be9-aa0a-8c8ac344ee91) Using my current config: ![image](https://github.com/zyedidia/micro/assets/10672443/085b6db1-16aa-4119-ae66-a60f14769e53)

Maybe using diff-added and diff-deleted colors would make more sense?

taconi commented 6 months ago

[...] files are not statements, wildcards are not identifiers, and negated files are definitely not errors. Maybe using diff-added and diff-deleted colors would make more sense?

The relationship was based on colors because of the existing identifiers I did not find any related to the ignore file patterns. diff-added and diff-deleted are also not nominally related. I believe one thing that might bother you is that some color schemes add a background color to the error handler, so I don't see any problem with switching to diff-deleted.

taconi commented 4 months ago

If you commit the changes from #3104 (comment) it looks good to me

@Andriamanitra Applied