languageserver icon indicating copy to clipboard operation
languageserver copied to clipboard

lintr diagstic support in Docker / remote servers (just by file content)

Open LumaKernel opened this issue 6 months ago • 0 comments

I set up my r studio environment through Docker. You can find my setup here: https://github.com/LumaKernel/luma-r-env.

I'm now configuring r language server like with following:

lspconfig.r_language_server.setup {
  cmd = { 'docker', 'exec', '-i', 'luma-r', 'R', '--no-echo', '-e', 'languageserver::run()' },
}

(This is configured by lspconfig, but not the essential for this issue)

And I will get the error:

Image

Diagnostics:
Failed to run diagnostics: ! in callr subprocess.
Caused by error:
! Linter 'object_length_linter' failed in /Users/luma/foo.R: path[1]="/Users/luma/foo.R": No such file or directory

Yes, there's no such file in the container. Lintr seems invoked as like lintr('/Users/luma/foo.R') but in the server side.

Other features like hover on functions seem working.

LumaKernel avatar May 18 '25 17:05 LumaKernel