How to set up LSP mode for Emacs with R

455 Views Asked by At

I am struggling to set up lsp-mode with Emacs for R. I have installed languageserver in R and have ESS installed.

When I launch an R script, I get the following message:

File mode specification error: (void-function -compose)

In my init.el I have the following:

(use-package lsp-mode
  :init
  (setq lsp-keymap-prefix "C-c l")
  :hook ((ess-r-mode . lsp)
     (lsp-mode . lsp-enable-which-key-integration))
  :commands lsp)

I am stumped as to what I'm doing wrong. Googling this problem brought me to this Reddit thread but their solution at the end doesn't help me.

I have been following along System Crafters' video to try and set up the LSP, but alas to no avail.

I am hoping to set this up with which-key,lsp-ui, and company-mode. So, any help is welcomed.

1

There are 1 best solutions below

0
cdd On

Turns out I just needed to update the dash package. The configuration was fine, but the dash package was outdated.