dart-lang/dart-vim-plugin

update readme to discuss configuring LSP support

devoncarew opened this issue · 7 comments

The readme in this repo is pointed by by the VIM reference from https://www.dartlang.org/tools. We should update this to mention how to configure LSP support.

Have we nailed down the command line to invoke the analysis server in LSP mode?

If we want our readme to stay agnostic towards particular plugins we could point out the options and give the command to start the server.

If we want our readme to be opinionated about using vim-lsc we could either add some logic in here to detect that it's being used and automatically configure the server, or put that into a separate plugin like vim-lsc-dart.

Have we nailed down the command line to invoke the analysis server in LSP mode?

Yes, just dart <snapshot path> --lsp.

If we want our readme to stay agnostic towards particular plugins we could point out the options and give the command to start the server.

If we want our readme to be opinionated about using vim-lsc we could either add some logic in here to detect that it's being used and automatically configure the server, or put that into a separate plugin like vim-lsc-dart.

Yeah, I don't have VIM plugins familiarity here, so suspect you're the best person to answer this :)

so suspect you're the best person to answer this :)

I'm also the most biased so I've been trying to avoid being too prescriptive 😉

I'm probably as unbiased as it gets (I don't use code completion all, and I get my analysis on the command line using flutter analyze --watch) and I'm fully in favour of the readme mentioning LSP as I expect that's exactly what a sizeable subset (probably the majority) of our users want.

Users who prefer something more off-the-beaten path are almost certainly capable of wiring it up themselves. I think it's very valuable to provide a recommended setup.

I'm fully in favour of the readme mentioning LSP

The question is whether we should be general and point out that there are multiple plugin options and users should go look up how to configure them, or whether we should pick vim-lsc as our recommended plugin and describe specifically how to configure it, or even do it automatically if we detect that the plugin is present.

Right -- I think it's fine to recommend an end-to-end default solution in the readme file, but I'd definitely prefer that the code remain entirely opinion-free.

As I say, the goal of suggesting a default is really just providing people with an easy-to-follow guide to get a really nice default setup. Anyone who wants to deviate from that is entirely free to do so, but I expect those who do want to do their own thing mostly already know what they want and can figure out how to set it up.

TL;DR I don't think we necessarily have to list all the alternatives, just a reasonable default to get people who'd like a quick setup off on the right foot.

I'm interested in distributing dartsdk as flatpak extensions, the lsp support baked in will help a lot with dart support for ide's distributed using flatpak. e.g gnome-builder , visual studio code etc