autolist.nvim icon indicating copy to clipboard operation
autolist.nvim copied to clipboard

Feat Request : Auto list for programming languages

Open LamprosPitsillos opened this issue 3 years ago • 1 comments

[Draft]

It's a bit annoying trying to write out a map or a list in programming languages and this plug-in looks capable of helping. I am not sure this can be done with snipets (as it can go on infinitely) but still felt it was worth a conversation over.

Ex.

int nums[]={|};
int nums[]={1,|};
int nums[]={1,2,|};
// It adds a comma and moves the cursor ready to insert another item
map = {|} 
map = {1:|}
map = {1:"hello",|}
# It adds : and , as necessary to make inserting elements super easy and fast
nums = [|]
nums = [1,|]

Treesitter can be used to only activate this functionality when in the appropriate nodes (@lists or something..).

LamprosPitsillos avatar Oct 10 '22 11:10 LamprosPitsillos

Hmm, I’m a bit busy atm, might come back to this one.

gaoDean avatar Oct 12 '22 20:10 gaoDean