Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Create setup wizard for lsp-mode #1813

Closed
yyoncho opened this issue Jun 16, 2020 · 9 comments
Closed

[Feature] Create setup wizard for lsp-mode #1813

yyoncho opened this issue Jun 16, 2020 · 9 comments

Comments

@yyoncho
Copy link
Member

yyoncho commented Jun 16, 2020

The wizard will be on by default and it will target the users that do not use
preconfigured frameworks(e. g. spacemacs).

Here are some thoughts/ideas about it.

  1. The wizard could be either turned off or have a status which is like run the wizard again if lsp-mode gets a new feature. ATM when we add a new feature we
    have 2 options. Either to have it on by default which will irritate the users
    that don't like it or not enable it by default which will pretty much make the
    feature undiscoverable. With the proposed approach, when a new feature is added,
    lsp-mode will show a dialog like "Do you want to enable semantic highlights by
    default?".

  2. The wizard will list features of lsp-mode and ask the user to select whether
    to keep them on or off.

  3. The wizard will ask the user whether he wants to install packages like lsp-treemacs, helm-lsp, lsp-ivy.

  4. The wizard will ask if the user wants to install extenal client
    configurations like lsp-dart, lsp-java.

  5. The wizard will install also the major mode if the major mode is not present

  6. The wizard will have the option to skip it on the first step.

@ericdallo
Copy link
Member

A really good idea of feature.
How can we persist that the user chose to opt-in some features? Would we need to check each feature checking if it's enabled via defcustom or if it was persisted on user emacs-dir via wizard?

@yyoncho
Copy link
Member Author

yyoncho commented Jun 16, 2020

How can we persist that the user chose to opt-in some features?

A potential solution is: each of the questions has id/key. We keep a variable, something like lsp-wizard-answered-questions. On M-x lsp startup, we check if all questions are answered. If not - we show the wizard. After we set the values we do (custom-save-all) which will write the changed settings in user's config.

@kurnevsky
Copy link
Member

kurnevsky commented Jun 17, 2020

Sounds like it can be a separate generic package not tied up with lsp-mode.

@Compro-Prasad
Copy link
Contributor

Compro-Prasad commented Jun 23, 2020

Sounds like it can be a separate generic package not tied up with lsp-mode.

It does need to be with default lsp-mode package so that people coming from VS Code don't find it unpleasing of it doing so less. Sure, its kind of against the customizing facility provided by Emacs but it will definitely boost user experience. If the core functionality is really complex then it can be formed into a different package which lsp-mode can use as a dependency.

The first question should be: Do you want suggestions from lsp-mode? . If a person answers no, lsp-mode won't interrupt in any way unless invoked for a specific functionality. Else, it will start asking other questions and put up a default setup ready for the user automatically.

@sivark
Copy link

sivark commented Jul 2, 2020

One possible solution is to create a new wrapper package called lsp-mode-magic (also a pun on wizard) whose role would be to 1. Ensure the lsp-mode package is made available 2. Set configuation for lsp-mode.

It shouldn't matter for lsp-mode how the configuration is generated, and state related to {opt-in/opt-out, when to nudge, etc.} can be nicely isolated outside the lsp-mode package. That way, "experts" who choose lsp-mode (or opinionated emacs distributions which preconfigure lsp for users) need not worry about being bothered by a wizard, and newbies who want to bootstrap can happily start with the magic package.

@yyoncho
Copy link
Member Author

yyoncho commented Jul 2, 2020

@sivark this is definitely one way to do it but I tend to be against introducing a new package basically with the same concern as the concern behind this issue - people do not read/re-read the readme. I have seen stale artefacts in users' configs that are from 2-3 years ago. There are a lot of people that even don't update their packages and they do update them only if they have lost their emacs.d for some reason.

I believe that this wizard might be useful even for expert users or at least I wish that other packages that I use but I don't want to study in details have such a wizard. But in any case, we should have the option "Skip and dont ask me again" which hopefully will solve the issue with the expert users or at least they won't complain about that a lot.

@shackra
Copy link
Contributor

shackra commented Sep 1, 2020

3\. The wizard will ask the user whether he wants to install packages like lsp-treemacs, helm-lsp, lsp-ivy.

how is going this to be done? it seems that we are doing wild assumptions here, for instance, if the user is actually using something like straight.el the sentence for installing lsp-treemacs should be part explicitly of the initialization of the Emacs' user configuration

@nbfalcon
Copy link
Member

This could be done using the customize interface, so that we don't have to tie lsp-mode to that feature. However, I don't see why new users couldn't just use a framework instead?

@yyoncho
Copy link
Member Author

yyoncho commented Oct 17, 2021

I am marking this as rejected. ATM it does not seem realisting to have it fixed. lsp-gitpod will fill some of the gaps.

@yyoncho yyoncho closed this as completed Oct 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants