languageserver icon indicating copy to clipboard operation
languageserver copied to clipboard

`languageserver` doesn't use`.lintr` file?

Open fountainer opened this issue 2 years ago • 3 comments

I want to disable the commented code linter. I have a .lintr file in the home directory with the following code:

linters: linters_with_defaults(
    commented_code_linter = NULL
  )

However, languageserver still gives diagnostics about commented code. However, manually calling lint(filepath = "myfilename.R") yields the expected results.

The version information is as follows: lintr: ‘2.0.1.9000’, languageserver:‘0.3.13’. I use doom-emacs withEglot (2b87b06) on Mac. I searched the Internet and didn't find a solution. Is there something I missed?

fountainer avatar Jun 09 '22 11:06 fountainer

Do you check https://lintr.r-lib.org/articles/lintr.html#the--lintr-file ?

read.dcf("~/.lintr") works?

eitsupi avatar Jun 09 '22 12:06 eitsupi

Do you check https://lintr.r-lib.org/articles/lintr.html#the--lintr-file ?

read.dcf("~/.lintr") works?

This is the result of read.dcf("~/.lintr"). image

fountainer avatar Jun 09 '22 12:06 fountainer

I have the same problem! R seems to be parsing the lintr configuration file correctly, but somehow languageserver is not picking up the new configuration. I have tried to change the .lintr configuration file on both my workspace and my home directory with equal results. There's something I am missing here?

ivanhigueram avatar Mar 14 '23 04:03 ivanhigueram