AckslD / nvim-trevJ.lua

Nvim-plugin for doing the opposite of join-line (J) of arguments, powered by treesitter
MIT License
170 stars 10 forks source link

feat(python): add list/dict-comprehensions and generator expressions #24

Closed AckslD closed 2 years ago

AckslD commented 2 years ago

from eg:

y = [i * j for i in range(3) for j in range(2) if i == 0]
y = (i for i in range(3) if i == 0)
y = tuple(i for i in range(3) if i == 0)
y = {i: i for i in range(3) if i == 0}

to

y = [
    i * j
    for i in range(3)
    for j in range(2)
    if i == 0
]
y = (
    i
    for i in range(3)
    if i == 0
)
y = tuple(
    i
    for i in range(3)
    if i == 0
)
y = {
    i: i
    for i in range(3)
    if i == 0
}