starkware-libs / cairo

Cairo is the first Turing-complete language for creating provable programs for general computation.
Apache License 2.0
1.47k stars 450 forks source link

Insert right paren after cursor when completing funciton/method calls #5935

Open mkaput opened 5 days ago

mkaput commented 5 days ago

Currently, LS is completing functions/methods like this:

// before
x.<caret>

// after
x.foo(<caret>

Change this to work as following:

// before
x.<caret>

// after
x.foo(<caret>)

Code to update:

https://github.com/starkware-libs/cairo/blob/cdaceb909ccf0644b7e385669d2c48417ceb90d4/crates/cairo-lang-language-server/src/ide/completion/completions.rs#L285

kaksv commented 3 days ago

Is this issue still open?

mkaput commented 3 days ago

There is #5956 in review that attempts to implement this

kaksv commented 3 days ago

Alright i had created a PR but let me look into something else.