-
Trying this example, literally copy & paste: https://textual.textualize.io/widgets/text_area/#loading-text from textual.app import App, ComposeResult
from textual.widgets import TextArea
TEXT = """\
def hello(name):
print("hello" + name)
def goodbye(name):
print("goodbye" + name)
"""
class TextAreaExample(App):
def compose(self) -> ComposeResult:
yield TextArea.code_editor(TEXT, language="python")
app = TextAreaExample()
if __name__ == "__main__":
app.run() But the syntax highlighting isn't working: I have installed the Could it be that the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
https://textual.textualize.io/widgets/text_area/#syntax-highlighting-dependencies That |
Beta Was this translation helpful? Give feedback.
Yes, however, it looks like there are no Conda packages for
textual[syntax]
.I went this workaround, which works nicely. Inside my Conda environment file:
This way,
textual
is installed via pip, but its requirements are installed via Conda (at least those which do not come on top due to the syntax highlighting support).