This module is still in a VEEERY young state and works only (partially, let's rather say barely workking) for the C programming language! So be prepared for a lot of bugs if you're trying it out! If you want to know a little bit more, then you can read this issue-message.
TreeSetter is a
nvim-treesitter-module
which adds semicolons (;
), commas (,
) and double points (:
) automatically
for you, if you hit enter at the end of a line!
As you can see from in the key-screen-bar
screenkey I almost never pressed the
;
key. I just needed to write the line of code, what I wanted and pressed the
<CR>
key. The semicolon was added automatically.
With vim-plug:
Plug 'TornaxO7/tree-setter'
Add this into your treesitter
-settings:
require('nvim-treesitter.configs').setup {
-- your other modules ...
tree_setter = {
enable = true
},
-- your other modules ...
}
Take a look into the CONTRIBUTING.md file for that ;)
The problem is, that treesitter gives different results if the syntax is wrong which makes it really hard to write the queries. So we have to wait until it stabilizes that.