v0.6.0
Added
-
Block mode now supports all
tree-sittersupported languages by default: Queries
are only required for the Code Blocks Editor. -
node+npmdependency: Extension new requiresnodev16+, andnpm. -
tree-sitter-clidependency: Extension now requirestree-sitter-cli, and so
transitively requires eitheremscripten(preferred) ordocker. -
Tree viewer: View the syntax tree of the current file.
-
Block mode highlights can be toggled.
Fixed
-
Rapidly toggling block mode breaks extension.
-
Rapidly moving blocks is slow.
Changed
-
Block mode blocks: Instead of only using blocks, block mode now has
access to all nodes in the syntax tree. Blocks are now only used to automatically
expand a selection.Fine grained selection of nodes
Selection expansion to nearest block
-
Simplify language config:
- Parsers are now installed from NPM, instead of from GitHub.
- By default, the extension will try to use the
tree-sitter-<language>NPM package, so
many languages will not need to be configured at all. - Queries are an optional config, required only for the Code Blocks Editor (not for
Block Mode) to work. - Configuration is by
[languageId]instead of a massivelanguageSupportconfig.
-
Change Block Mode colors config:
codeBlocks.colors.enabled: Whether Block Mode should color selections or not. Defaults tofalse.codeBlocks.colors.sibling: CSS string for sibling selection background color. Defaults tovar(--vscode-editor-selectionHighlightBackground).codeBlocks.colors.parent: CSS string for parent selection background color. Defaults tovar(--vscode-editor-linkedEditingBackground).
Old config for Python and TSX
New config for Python and TSX
"[python]": { // single-node blocks are only for the Code Blocks Editor "codeBlocks.queries": [ "(class_definition) @item", "(function_definition) @item", "(decorated_definition) @item" ] }, // parser is configured inside each languageId's config "[typescriptreact]": { "codeBlocks.npmPackageName": "tree-sitter-typescript", "codeBlocks.parserName": "tree-sitter-tsx", "codeBlocks.subdirectory": "tsx", // queries are now optional "codeBlocks.queries": [ "( (comment)* @header . (class_declaration) @item)", "( (comment)* @header . (method_definition) @item)", "( (comment)* @header . (function_declaration) @item)", "( (comment)* @header . (export_statement) @item)", // single-node blocks are only for the Code Blocks Editor "(jsx_element) @item", "(jsx_self_closing_element) @item" ] }
Removed
-
Rust dependencies:
cargo,code-blocks-server, no longer required. -
Force moves: Were inconsistent (especially in indent-based languages) and rarely useful.
If they are missed, please comment on this issue, preferably with your use case.
Full Changelog: vscode-extension-v0.5.2...v0.6.0


