Auto indent after inputing pipe and a return

cocoa1231
Tue, 16 Apr 2024 07:26:58 +0000
Tooling

I often end up chaining pipes as follows and in jupyter notebook at least, I have to input a tab after every pipe. Would it be possible somehow to tell the language server to indent after I input a pipe and return?

processed_string = open(filepath, "r") do io
    read(io) |>
        StringView |>
        v -> split(v, '\n') |>
        v -> filter(startswith("|"), v) |>
        v -> filter(x -> !startswith(x, "| ---"), v) |>
        s -> join(s, '\n') |>
        s -> replace(s, " | " => ',', "| " => "", " |" => "")
end

P.S I know Chain.jl exists, I just prefer doing it without needing to import Chain for every notebook.

1 post - 1 participant