Move your code blocks around!
This extension allows you to move your code as blocks, in any language*.
Rust (technically just
The next time you open a file in the same language, everything will already be setup.
If you open a file in a new language, the appropriate tree sitter grammar will be downloaded and compiled again.
TypeScript + JSX
Code blocks moving function attributes and documentation
Code blocks not moving blocks between scopes
To support a language, tree-sitter querys are required to resolve blocks. This involves some manual labour for each language, but not much.
Also, to use a language, a tree-sitter grammar is required. There are many grammars already written, but to use them they need to be compiled. The extension will automatically download and compile the grammar for you, but it needs to know some metadata about each grammar.
For now, these are the default configured languages:
Adding a language
To add support for a language yourself, you'll need to:
Here is an example of the configuration for Python:
For figuring out how to write the queries, use the Tree-sitter playground.