Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How configure lspce for R? #37

Open
maikol-solis opened this issue Apr 19, 2024 · 2 comments
Open

How configure lspce for R? #37

maikol-solis opened this issue Apr 19, 2024 · 2 comments

Comments

@maikol-solis
Copy link

maikol-solis commented Apr 19, 2024

I tried to use this client with R unsuccessfully.

I added this to my config

(add-to-list 'lspce-server-programs '("ess-r" "R --slave -e languageserver::run()" nil))

But I got these messages

[lspce] [WARN] 2024-04-19 13:33:34.957 Can not get root-uri or lsp-type of current buffer.
[lspce] [WARN] 2024-04-19 13:33:34.960 Failed to connect to lsp server.

What have I done wrong?

Thanks for your help.

@zbelial
Copy link
Owner

zbelial commented Apr 22, 2024

Hi @maikol-solis
I have never written any R code. But you can use M-: (lspce--root-uri) and M-: (lspce--lsp-type) from a R buffer to check which one returns null. (There two warnings were reported from lspce--buffer-enable-lsp)

Another thing noteworthy is the first element in each record of lspce-server-programs should be the same with what lspce--lsp-type returns for current buffer, so maybe you should change your config for R (I mean the "ess-r", but as I said, I have never written any R code, and I don't know what major mode you used for R, I may be wrong here)

@zbelial
Copy link
Owner

zbelial commented Apr 22, 2024

I just searched how to use Emacs to write R code, and I think you use ess(so the major mode for R is ess-r-mode), right? If so, then I think your config is right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants