Skip to content

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

@LumaKernel

Description

@LumaKernel

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions