filNaj / tree-setter

A treesitter-module which will place equals, semicolons, commas and double points automatically for you!
122 stars 6 forks source link

code structure is broken when triggering the addition of colons #11

Closed Mythos-404 closed 1 year ago

Mythos-404 commented 1 year ago

Example code

fn main() {
    println!("{}", fib(10))
}

fn fib(n: u64) -> u64 {
    fn iter(next: u64, prev: u64, num: u64) -> u64 {
        match num {
            0 | 1 => next,
            _ => iter(prev, prev + next, num - 1),
        }
    }
    iter(0, 1, n)
}

Context

code structure is broken when triggering the addition of colons tree-setter

filNaj commented 1 year ago

The plugin isn't stable for rust yet. Hopefully it will be soon.

Mythos-404 commented 1 year ago

I've turned off semicolon completion in the rust language, rust's semicolons were too uncertain But I'm happy with it in other languages.