1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] How do I change the formatter line length with neovim lsp dart?

Discussão em 'Mobile' iniciado por Stack, Outubro 3, 2024 às 12:32.

  1. Stack

    Stack Membro Participativo

    I'm running nvim using the built in LSP (via the superb AstroVim) to develop dart and flutter.

    Loving everything, except how the lsp formatting (which formats on save) is wrapping my lines at 80 characters.

    I can see how the dart command line formatter supports

    --line-length=<value>


    My question: how do I include that parameter to the lsp in the

    lua vim.lsp.buf.formatting()


    command in order to format at a longer line length.

    PS. yes I'm fully aware of the religious war over line length.

    PPS. I've tried this in my AstroVim user config, but it doesn't seem to work

    ["server-settings"] = {
    dartls = {
    settings = {
    ["line-length"] = 120
    }
    }
    }

    Continue reading...

Compartilhe esta Página