Never type an equals = or a semicolon ; again!
TreeSetter is an nvim-treesitter-module which automatically adds an equals sign (=) and semicolons (;) at the appropriate place whenever you hit enter (for ;) or the space bar (for =). This will help you to not look at your keyboard and type faster. The insertion of commas (,) and double points (:) is under development.
This plugin is a fork of TornaxO7/tree-setter, but the original repo is incomplete and has been archived.
Note: The plugin should work well most of the time, however since it's still very young, it is very possible that it has some bugs.
Languages: It supports many languages. Go inside the queries folder to see if your language is supported.
Simply press on the space bar to insert an equals sign (=) at the appropriate place e.g. after a variable declaration int x = 1; or x = 1. For Java and C, press enter at the end of the line to insert a semicolon (;).
TypeScript demo:
Java:
Vim-plug:
Plug 'filNaj/tree-setter'Packer:
use 'filNaj/tree-setter'Add tree_setter (and not tree_sitter !) into your treesitter settings:
require('nvim-treesitter.configs').setup {
-- your other modules ...
tree_setter = {
enable = true
},
-- your other modules ...
}TREESETTER IS SEEKING CONTRIBUTORS TO HELP ADVANCE THE PROJECT'S GROWTH.
Take a look into the CONTRIBUTING.md file for that ;) Credit to TornaxO7.
- Add colon
:automatically, e.g. for switch cases. - Add commas
,automatically, e.g. for lists or dictionaries.

