request: syntax highlighting for .txt files #2609

Open
opened 2026-02-16 17:36:27 -05:00 by yindo · 6 comments
Owner

Originally created by @OpeOginni on GitHub (Nov 5, 2025).

Question

I just wanted to ask if changes for .txt files should look like this?

Image
Originally created by @OpeOginni on GitHub (Nov 5, 2025). ### Question I just wanted to ask if changes for `.txt` files should look like this? <img width="983" height="406" alt="Image" src="https://github.com/user-attachments/assets/d66d2bff-2a1f-4335-977c-b9cd3ca04442" />
yindo added the opentuidiscussion labels 2026-02-16 17:36:27 -05:00
Author
Owner

@rekram1-node commented on GitHub (Nov 5, 2025):

Is the issue those "No newline at end of file" comments? Just clarifying since idk the original state of ur text file

@rekram1-node commented on GitHub (Nov 5, 2025): Is the issue those "No newline at end of file" comments? Just clarifying since idk the original state of ur text file
Author
Owner

@OpeOginni commented on GitHub (Nov 5, 2025):

No not really, just the fact it has no colors or nothing, just black and white makes it hard to read

@OpeOginni commented on GitHub (Nov 5, 2025): No not really, just the fact it has no colors or nothing, just black and white makes it hard to read
Author
Owner

@rekram1-node commented on GitHub (Nov 5, 2025):

oh so u want text highlighting for .txt edits then?

@rekram1-node commented on GitHub (Nov 5, 2025): oh so u want text highlighting for .txt edits then?
Author
Owner

@OpeOginni commented on GitHub (Nov 5, 2025):

Yes sir, thats sort of what I am going with, if there is a need

@OpeOginni commented on GitHub (Nov 5, 2025): Yes sir, thats sort of what I am going with, if there is a need
Author
Owner

@rekram1-node commented on GitHub (Nov 5, 2025):

im gonna reword the issue to make it more clear, tbh im not sure what makes sense for a text file, i feel like most editors keep it 1 color.

Here is the file that'd need an edit tho i think: https://github.com/sst/opencode/blob/dev/packages/opencode/parsers-config.ts

@rekram1-node commented on GitHub (Nov 5, 2025): im gonna reword the issue to make it more clear, tbh im not sure what makes sense for a text file, i feel like most editors keep it 1 color. Here is the file that'd need an edit tho i think: https://github.com/sst/opencode/blob/dev/packages/opencode/parsers-config.ts
Author
Owner

@fabOnReact commented on GitHub (Dec 5, 2025):

@rekram1-node I'm experiencing the same issue with .less and .vim files.
When editing these file types, the diff view syntax highlighting does not work.

Screenshot attached showing the issue with a .vim file:

Image

This seems to be a general issue with file types that don't have built-in syntax highlighting support.

I can repro this also with the ghosty terminal. Thanks for the support.

Image
@fabOnReact commented on GitHub (Dec 5, 2025): @rekram1-node I'm experiencing the same issue with .less and .vim files. When editing these file types, the diff view syntax highlighting does not work. Screenshot attached showing the issue with a .vim file: <img width="2144" height="2322" alt="Image" src="https://github.com/user-attachments/assets/c97a5136-e26d-47fa-953a-561ff9db780e" /> This seems to be a general issue with file types that don't have built-in syntax highlighting support. I can repro this also with the ghosty terminal. Thanks for the support. <img width="2912" height="2322" alt="Image" src="https://github.com/user-attachments/assets/503d0d4d-a4e7-4485-9431-3b4f52c571d4" />
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2609