rossabaker / lsp-scala

Scala support for lsp-mode using metals
GNU General Public License v3.0
49 stars 6 forks source link

Add to Spacemacs #23

Open JesusMtnez opened 5 years ago

JesusMtnez commented 5 years ago

Enhance scala layer in Spacemacs so it offers the possibility to use lsp-scala.

kryptt commented 5 years ago

I started a pull request on the spacemacs project. you can checkout my kryptt/spacemacs:develop branch.

You can follow the pull request is syl20bnr/spacemacs#12234

JesusMtnez commented 5 years ago

Thank you @kryptt !! I'll try to take a look at it later :+1:

zetashift commented 5 years ago

Using the builtin lsp-mode in spacemacs what are the instructions to add metals to that layer? Current instructions on the homepage assume Emacs and my lisp-fu isn't that great, so I'm wondering how to add metals to spacemacs.

kryptt commented 5 years ago

@zetashift you can look at my pull request

https://github.com/syl20bnr/spacemacs/pull/12234/files#diff-8b6c1990e295462daba67a5dd3b1d17eR120

You just register lsp in the scala-mode hook

Basically lots of people are still using ensime, so I need to figure out how to unhook ensime when lsp-scala is selected before the PR gets merged..

zetashift commented 5 years ago

Oh cool thanks for the quick reply!

zheli commented 5 years ago

I have created a separate layer called scala-lsp based on @kryptt's pull request, this one removes the org dependency so Emacs will not install ensime at all.

https://github.com/zheli/scala-lsp

Still needs lots of tweaking.

zetashift commented 5 years ago

I can't seem to get it to work, my elisp-fu is too weak for this sadly. @zheli 's layer also isn't working, adding the scala-lsp line gives me the error unknown layer: scala-lsp in dotfile

zheli commented 5 years ago

@zetashift OK. I found out why it didn't work. (And I've updated the installation instructions in README )

Apparently you can't use github fetcher. So you need to manually clone my repository into a folder named scala-lsp and put it in ~/.emacs.d/private folder and add

dotspacemacs-configuration-layers
'(
  ....
  scala-lsp)