-
Code highlighting: Hello, I looked at the demo of the text editor and part of the code app, and found that the lang field of the BUF cannot be syntax highlighted, can you write a shortened example? If there's a way to customize the keyword highlight color, I'd like to highlight this debugger script https://github.com/HyperDbg/scripts/blob/master/windows%2FNetwork%2Fprocess-specific-connections-ip-port.ds |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 13 replies
-
Have you tried setting the |
Beta Was this translation helpful? Give feedback.
-
Tried it
…---Original---
From: ***@***.***>
Date: Thu, Feb 15, 2024 23:43 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [cogentcore/core] Code highlighting (Discussion #880)
Have you tried setting the texteditor.Buf.Hi.Lang?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hello, it might be too cumbersome to make a disassembly display widget, is it feasible to add keyword highlighting to each cell of the table? Can you write a demo, thanks |
Beta Was this translation helpful? Give feedback.
-
Thank you for your pointers, I'll take the time to try this idea
…---Original---
From: ***@***.***>
Date: Sun, Feb 18, 2024 09:24 AM
To: ***@***.***>;
Cc: ***@***.***>;"State ***@***.***>;
Subject: Re: [cogentcore/core] Code highlighting (Discussion #880)
I would recommend using a text editor for this, and you can set the language to anything supported by https://github.com/alecthomas/chroma, or you could write your own lexer if none of those work. I can help you if you need.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
Apologies for the issue; there was a problem with the file opening logic in the text editor. It should be fixed now if you pull to the latest version; it should automatically highlight both the Go code and the debug script.