Skip to content
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

No syntax highlighting for match-case statements #141

Closed
asxlvm opened this issue Dec 6, 2021 · 3 comments
Closed

No syntax highlighting for match-case statements #141

asxlvm opened this issue Dec 6, 2021 · 3 comments

Comments

@asxlvm
Copy link

asxlvm commented Dec 6, 2021

I've got coc-pyright and Treesitter installed, just installed the Python language in Treesitter because I thought I'd get match-case statement syntax highlighting but I didn't, it made changes, but not to match-case statements.
IMG_20211206_231436

@theHamsta
Copy link
Contributor

theHamsta commented Dec 6, 2021

Duplicate of #116 ? You can test my PR, if you want #140. Just change then SHA in nvim-treesitter/lockfile.json to the SHA of the branch in the PR and run TSUpdate. There's also an open PR at nvim-treesitter to highlight match/case

@doolio
Copy link

doolio commented Sep 27, 2022

This is also the case for me (using python 3.9.2 and python-lsp-server if that matters). Highlighting and indentation (though is this provided by tree-sitter?) not working as expected.

match subject:  # match keyword highlighted
    case <pattern_1>:  # case keyword highlighted; not indented as expected
        <action_1>  # not indented as expected
    case <pattern_2>:  # case keyword NOT highlighted; not indented as expected
        <action_2>  # not indented as expected
    case <pattern_3>:  # case keyword NOT highlighted; not indented as expected
        <action_3>  # not indented as expected
    case _:  # case keyword NOT highlighted; not indented as expected
        <action_wildcard>  # not indented as expected

@SadCheeto
Copy link

SadCheeto commented Mar 20, 2023

I am running into the same problem - I was wondering if there was a reason behind this branch not getting merged into main? Is there any update on this?

@amaanq amaanq closed this as completed Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants