Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"language" attribute of the "TextArea" widget is not working #4356

Closed
Kalebe16 opened this issue Mar 29, 2024 · 1 comment
Closed

"language" attribute of the "TextArea" widget is not working #4356

Kalebe16 opened this issue Mar 29, 2024 · 1 comment

Comments

@Kalebe16
Copy link

Kalebe16 commented Mar 29, 2024

This is my code(I copied from the official documentation):

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")



if __name__ == "__main__":
    app = TextAreaExample()
    app.run()

Command used

image

This is the result

image

Extra observations

  • My operating system: Ubuntu
  • My terminal emulator: Tabby(I also tested it on the standard Ubuntu terminal)
  • My python package manager: pip
  • My python version: 3.12.1
  • I am using an isolated virtual environment
@TomJGooding
Copy link
Contributor

TomJGooding commented Mar 29, 2024

This is explained at the top of the TextArea docs: https://textual.textualize.io/widgets/text_area/#syntax-highlighting-dependencies

@Textualize Textualize deleted a comment from github-actions bot Mar 29, 2024
@Textualize Textualize locked and limited conversation to collaborators Mar 29, 2024
@davep davep converted this issue into discussion #4358 Mar 29, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants