reddit / emacs

How to set up LSP mode for R

cddesjar · 2022-06-24 17:30
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 a [Reddit thread](https://www.reddit.com/r/emacs/comments/uyvlgn/using_lspmode_with_r/) but the 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.
AndreaSomePostfix · 2022-06-24 18:59
mmm can you try (use-package dash) ​ That error means that the -compose function is undefined and it should come from https://github.com/magnars/dash.el
velbunadur · 2022-06-24 20:35
[This thread](https://www.reddit.com/r/emacs/comments/uyvlgn/using_lspmode_with_r) may help
yyoncho · 2022-06-24 20:39
Update your dash version - this breaking change in dash library is chasing us for like 2 years
cddesjar · 2022-06-25 11:46
This was it! Updated dash and it solved my problem. Thanks!