You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The file structure basically is the .lintr file and test.R in a folder.
lintr::lint_dir() does not return any problems. But when use the languageserver in Neovim, the whitespace_linter complains. Do I need to set further options?
Reacted by Maik Thalmann, Watal M. Iwasaki, Egor, etaslicukur, Ege Can Taşlıçukur, Steffen, Someone894, Jakub Bujnowicz, YunSu, 4rcadia and 1 more
I downgraded to lintr v3.2.0 and this fixed the issue.
It might not be related to @grimmjulian issue as it was published before the lintr release. In any case, I'm posting my fix here in case it can help other people.
Reacted by Watal M. Iwasaki, Wihan, 天然純真, Egor, Tom Spargo, Jakub Bujnowicz, Chun-Jie Liu and yifan2wang
I noticed the same behavior today on a new project, despite having used the combination of languageserver with VSCode for a few years now.今天我在一个新项目中也发现了同样的问题,尽管我已经使用 languageserver 和 VSCode 的组合好几年了。
I downgraded to lintr v3.2.0 and this fixed the issue.我将 lintr 降级到 v3.2.0,问题就解决了。
It might not be related to @grimmjulian issue as it was published before the lintr release. In any case, I'm posting my fix here in case it can help other people.这可能与此问题无关,因为它是在 lintr 发布_之前_发布的。无论如何,我在这里发布我的修复方法,希望能对其他人有所帮助。
The same problem, and downgrade can solve. I have reported this to lintr, but I don't know this is a problem of lintr or languageserver, but it will always be solved.
I downgraded to lintr v3.2.0 and this fixed the issue.
It might not be related to @grimmjulian issue as it was published before the lintr release. In any case, I'm posting my fix here in case it can help other people.
The core change is that the latest version of lintr no longer automatically reads settings when calling lintr::lint(). To restore the previous behavior, you need to explicitly set parse_settings = TRUE. Since languageserver uses dynamic linting without specifying this parameter, it ignores all user-defined settings and falls back to defaults.
Until languageserver is updated, the only workaround is to downgrade lintr to version 3.2.0.
lint() no longer picks up settings automatically in ad hoc invocations like lint("text\n") or lint(text = "str"). You should set parse_settings=TRUE to force settings to be read. Emacs ESS users may need to update to a recent version, e.g. ESS>20251003.
Another workaround is now available thanks to @pascal-sauer#706: pak::pak("REditorSupport/languageserver#706"), with which we can enjoy the other features of the latest lintr 3.3.
Reacted by Harry Watson, Steffen, Gong Zhiwen and Chun-Jie Liu
After installing this PR build, the language server correctly picks up the .lintr configuration and the dynamic linting behaves as expected. Thanks again for the fix in #706!
When installing r-languageserver with ":MasonInstall" inside Neovim, the package "languageserver" and all of its dependencies are installed in an isolated library; you can find it somewhere in:
To resolve the problem, we have to install the fix for the "languageserver" package inside the library that Mason created, meaning we have to update the specific "languageserver" that Mason interacts with.
The fix that worked for me was
1. We need to first set the path to the library that Mason created and uses for the LSP in Neovim. R will use this path to install the fix, so we will not install the fix in the usual place R installs its packages; we will rather install the fix in the correct directory for Mason to read.
2. You can set the path to the Mason LSP library by doing the following:
RLS_LIB_PATH="~/.local/share/nvim/mason/packages/r-languageserver/build"
3. Create a new vanilla R session and install the fix in #706:
R --vanilla -e "remotes::install_github('REditorSupport/languageserver@pull/706/head', lib='${RLS_LIB_PATH}', force=TRUE)"
4. This will tell R to install the fix in the correct isolated library that Mason utilizes.
5. You can also check the "lintr" version that Mason installed doing:
R --vanilla -e "print(utils::packageVersion('lintr', lib.loc = '${RLS_LIB_PATH}'))"
> print(utils::packageVersion('lintr', lib.loc = '/home/msales/.local/share/nvim/mason/packages/r-languageserver/build'))
[1] ‘3.3.0.1’
Because there does not seem to be any traction on the pull request, here is an ugly approach to overload lintr::lint and restore previous parse_settings value.
It's quite unclear from lintr changelog the reason behind this breaking change in the first place, but it seems to be related to emacs users, so it should be safe as in no bad side effects for all other users.
Warning
Do not use the above code in a "production" setting.
Activity
CharlesBordet commentedon Dec 1, 2025
I noticed the same behavior today on a new project, despite having used the combination of
languageserverwith VSCode for a few years now.I noticed that the
lintrpackage had been upgraded a few days ago: https://github.com/r-lib/lintr/releases/tag/v3.3.0-1I downgraded to
lintrv3.2.0 and this fixed the issue.It might not be related to @grimmjulian issue as it was published before the
lintrrelease. In any case, I'm posting my fix here in case it can help other people.Yousa-Mirage commentedon Dec 2, 2025
The same problem, and downgrade can solve. I have reported this to
lintr, but I don't know this is a problem oflintrorlanguageserver, but it will always be solved.andyluooo commentedon Dec 3, 2025
The core change is that the latest version of
lintrno longer automatically reads settings when callinglintr::lint(). To restore the previous behavior, you need to explicitly setparse_settings = TRUE. Sincelanguageserveruses dynamic linting without specifying this parameter, it ignores all user-defined settings and falls back to defaults.Until
languageserveris updated, the only workaround is to downgradelintrto version 3.2.0.heavywatal commentedon Dec 4, 2025
Another workaround is now available thanks to @pascal-sauer #706:
pak::pak("REditorSupport/languageserver#706"), with which we can enjoy the other features of the latest lintr 3.3.jpasquier commentedon Dec 4, 2025
Just tested the workaround and can confirm it works for me as well.
After installing this PR build, the language server correctly picks up the
.lintrconfiguration and the dynamic linting behaves as expected. Thanks again for the fix in #706!moises-sls commentedon Dec 14, 2025
I was facing the same problem when using the r-languageserver in Neovim, and the fix in #706 solved it.
It was not as simple as downgrading the "lintr" version or using
in the R terminal.
When installing r-languageserver with ":MasonInstall" inside Neovim, the package "languageserver" and all of its dependencies are installed in an isolated library; you can find it somewhere in:
To resolve the problem, we have to install the fix for the "languageserver" package inside the library that Mason created, meaning we have to update the specific "languageserver" that Mason interacts with.
The fix that worked for me was
Hope this will help someone else.
mcanouil commentedon Jan 29, 2026
Because there does not seem to be any traction on the pull request, here is an ugly approach to overload
lintr::lintand restore previousparse_settingsvalue.Place in your
.RprofileIt's quite unclear from
lintrchangelog the reason behind this breaking change in the first place, but it seems to be related to emacs users, so it should be safe as in no bad side effects for all other users.Warning
Do not use the above code in a "production" setting.
renkun-ken commentedon Feb 6, 2026
Closing via #706