REditorSupport / languageserver

An implementation of the Language Server Protocol for R
Other
580 stars 93 forks source link

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

Open fountainer opened 2 years ago

fountainer commented 2 years ago

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?

eitsupi commented 2 years ago

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

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

fountainer commented 2 years ago

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
ivanhigueram commented 1 year ago

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?