Hello.

I have been using both Neovim and Emacs on and off for about 2 years now, only really getting into both projects around 8 months ago.

After Emacs broke on NixOS (not sure whose fault it was), I didn’t want to see Emacs for a while, so I used Neovim and sort of forgot about Emacs, but now that flatpaks broke for me on Fedora a few days ago, and I decided to switch to PopOS where Neovim is a version or two older than the minimum for some plugins. I tried to make it work and failed so I’m back on Emacs.

I even managed to find a fix for an issue I had with the Dashboard Logo.

But I’ve grown used to the way Neovim does things with Mason, just compiling all language servers automagically.

In short, I couldn’t find a way to do that in Emacs and seeing as AI couldn’t help me in these endeavours, I decided the best place to ask for help would be here.

I need a way to easily install Language Servers, integrate them with LSP and Auto-Complete mode, and have Emacs or an Emacs package compile and/or install these language servers automatically with no further effort required on my part.

Thank you.

  • TunaCowboy@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    2 months ago

    You can just compile emacs and/or neovim yourself rather than installing a whole new distro to get different versions.

    As far as lsp-mode goes, a bunch of language servers will already auto install, you can add support for ones that don’t or script it yourself in the shell of your choice or elisp.

    eglot is an alternative to lsp-mode that takes a more hands off approach.

    Enabling lsp for a specific language is pretty much just:

    (add-hook '<LANG>-mode-hook 'lsp)

    If you’re using use-package:

    :hook (<LANG>-mode . lsp)

    eglot can be substituted for lsp.

  • samc@feddit.uk
    link
    fedilink
    English
    arrow-up
    3
    ·
    2 months ago

    To add some more context:

    Eglot is part of Emacs now, so it comes preinstalled. It’s good at finding lsp servers, but won’t help you to install them. Definitely the option if you want to keep things simple and can live with the need to manually install servers. (Also a quick note, the hook you should use to auto activate eglot is eglot-ensure, rather than just eglot.

  • sith@lemmy.zip
    link
    fedilink
    English
    arrow-up
    1
    ·
    28 days ago

    If you’re still into declarative and immutable distributions, I would recommend trying Guix. Emacs works pretty well. You can let Guix or Emacs handle installation of Emacs packages. And as others have already mentioned, eglot is now part of Emacs. Use that instead of emacs-lsp.