Skip to content

((++SOMEVAR)) is not recognized as a usage of the SOMEVAR variable #510

Open
@Popkornium18

Description

@Popkornium18
declare -i SOMEVAR=0

# Hover and get references do not work with these statements
((++SOMEVAR))
((SOMEVAR++))
((SOMEVAR ++))

# But this works fine
((++ SOMEVAR))

Syntax-highlighting is also broken unless the fourth statement is used. Not sure if this means that it is a treesitter grammar issue and not a bashls issue.

Unfortunately shfmt also changes ((++ SOMEVAR)) to ((++SOMEVAR)).

Metadata

Metadata

Assignees

No one assigned

    Labels

    grammar bugIssues related to the bash grammar

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions