Stream: t-compiler/wg-rls-2.0

Topic: emacs and rust-mode integration


nikomatsakis (Dec 06 2019 at 20:54, on Zulip):

So I've been tweaking my rust-mode configuration but i'm hitting some problems integrating rust-analyzer that I don't quite understand. For some reason, it seems like M-x lsp now wants to run rls instead of rust-analyzer. @Florian Diebold maybe you have some clue why?

This is my .emacs file right now:

(defun niko-rust-mode-hook ()
  (camelCase-mode 1)
  (lsp)
  )

(defun niko-setup-rust-mode ()
    (straight-use-package
     '(rust-mode :type git :host github :repo "rust-lang/rust-mode"))
    (add-hook 'rust-mode-hook 'niko-rust-mode-hook)
    (require 'rust-mode)
    (require 'ra-emacs-lsp)
    )
(niko-setup-rust-mode)
nikomatsakis (Dec 06 2019 at 20:54, on Zulip):

feel free to tell me some more elegant way to do things...

nikomatsakis (Dec 06 2019 at 20:54, on Zulip):

If I run things with C-u M-x lsp and select rust-analyzer, everything seems to work ok

Florian Diebold (Dec 06 2019 at 20:55, on Zulip):

actually I think I just encountered the same problem after I upgraded lsp-mode -- try (setq lsp-rust-server 'rust-analyzer) during setup

Florian Diebold (Dec 06 2019 at 20:56, on Zulip):

lsp-mode now comes with RA support

nikomatsakis (Dec 06 2019 at 20:56, on Zulip):

do I no longer need ra-emacs-lsp?

nikomatsakis (Dec 06 2019 at 20:56, on Zulip):

ah well I guess it has other keybindings

nikomatsakis (Dec 06 2019 at 20:56, on Zulip):

though tbh I always forget to use those

Florian Diebold (Dec 06 2019 at 20:56, on Zulip):

I guess not, though I don't know whether they integrated everything

nikomatsakis (Dec 06 2019 at 20:57, on Zulip):

well, that seems to work anyway

nikomatsakis (Dec 06 2019 at 20:57, on Zulip):

I had some other weird problem I don't understand

nikomatsakis (Dec 06 2019 at 20:57, on Zulip):

where I had a chalk-2 directory

nikomatsakis (Dec 06 2019 at 20:57, on Zulip):

and lsp kept looking for ~/versioned/chalk

nikomatsakis (Dec 06 2019 at 20:57, on Zulip):

I eventually just renamed the directory :P

nikomatsakis (Dec 06 2019 at 20:57, on Zulip):

I have no idea where it was getting that from...

nikomatsakis (Dec 06 2019 at 20:57, on Zulip):

but I guess that's not related to rust-analyzer

Florian Diebold (Dec 06 2019 at 20:57, on Zulip):

huh, yeah that's weird

nikomatsakis (Dec 06 2019 at 20:58, on Zulip):

I think maybe when I did git clone I called it chalk and then renamed it to chalk-2? not sure

nikomatsakis (Dec 06 2019 at 20:58, on Zulip):

chalk-1 seems to work ok :)

mark-i-m (Dec 15 2019 at 02:59, on Zulip):

Perhaps the bug is in the use of emacs rather than vim? (:P)

matklad (Dec 15 2019 at 08:58, on Zulip):

You mean evil mode, right?

mark-i-m (Dec 18 2019 at 22:02, on Zulip):

No, I mean emacs is the bug

Last update: Jan 21 2020 at 09:20UTC