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

Use tree-sitter queries for smart indentation #685

Open
pokey opened this issue May 20, 2022 · 0 comments
Open

Use tree-sitter queries for smart indentation #685

pokey opened this issue May 20, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@pokey
Copy link
Member

pokey commented May 20, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant