Skip to content

Use tree-sitter queries for smart indentation #685

Open
@pokey

Description

@pokey

We could use indentation queries to allow us to know what indentation to use when inserting new lines. For example, if we know how to indent inside vs after something, we could distinguish between "move state air after funk bat" vs "move state air to end of funk bat", with the latter keeping indentation of body but the former dedenting. Important in Python. We could also do our own "pour line", etc.

See nvim-tree-sitter indentation queries (eg rust), and the helix (see PR, Python example, and docs).

We can determine how large an indentation should be by reading editor.options.tabSize

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions