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
How could I downgrade it? I clinck Install another version.., but no reaction. By the way, I used macOS and Linux, so it's probably not a Windows-specific issue.
@ManuelHentschel@qizhengyang2017 Would you like to install the latest development version of languageserver, enable r.lsp.debug in vscode settings and take a look at the log of "R Language Server" channel in vscode output pane?
On languageserver startup, it should receive settings from vscode-R language client like the following:
However, I can disable the linter using options(languageserver.diagnostics = FALSE). This does not show up in the log (i.e. it still shows "diagnostics": true, but disables the linter.
@ManuelHentschel From your languageserver log, it looks like it did receive r.lsp.diagnostics: false but it still publishes diagnostics on document open/save/modify?
Same problem here for MacOS. Also, I'm wondering if there is a way to disable all styling linters but keep the syntax errors.
You could modify your global ~/.lintr or workspace {workspaceFolder}/.lintr to specify linters to be used. If you want to get notified by parse-errors only, you might want to put the following in your lintr config:
Even trough r.lsp.diagnostics has been disabled, in the workspace setting r.lsp.diagnostics default is true.
Do you mean VS Code workspace settings in {workspaceFolder}/.vscode/settings.json? If you don't have this file, then VS Code will follow the global settings.
Actually unticking the "enable diagnostics" setting works but the diagnostics appear again when VS code is restarted (and I have to check / uncheck the setting again to make them disappear).
Activity
ManuelHentschel commentedon Sep 13, 2022
I have the same issue, see also #1191 (comment) ff.
As a workaround you can disable diagnostics by putting
options(languageserver.diagnostics = FALSE)in your .Rprofile.renkun-ken commentedon Sep 13, 2022
Cannot reproduce it on macOS and Linux. Maybe it is a Windows-specific issue regarding vscode-languageclient v8.0.2?
ManuelHentschel commentedon Sep 13, 2022
That seems to be correct, downgrading to vscode-R v2.5.2 solves the issue for me.
qizhengyang2017 commentedon Sep 13, 2022
How could I downgrade it? I clinck

Install another version.., but no reaction. By the way, I used macOS and Linux, so it's probably not a Windows-specific issue.qizhengyang2017 commentedon Sep 13, 2022
Sorry, I see the pup-up box.
renkun-ken commentedon Sep 13, 2022
@ManuelHentschel @qizhengyang2017 Would you like to install the latest development version of languageserver, enable
r.lsp.debugin vscode settings and take a look at the log of "R Language Server" channel in vscode output pane?On languageserver startup, it should receive settings from vscode-R language client like the following:
If you disable
r.lsp.diagnostics, languageserver should also receive a notification of changed configuration in the same format:Could you confirm whether the languageserver shows such log?
ManuelHentschel commentedon Sep 14, 2022
With diagnostics enabled I get
With diagnostics disabled I get
In both cases I get the following linter message in an empty file:
Trailing blank lines are superfluous.
[{ "resource": "XXXXXX/temp/test.R", "owner": "_generated_diagnostic_collection_name_#0", "severity": 2, "message": "Trailing blank lines are superfluous.", "source": "trailing_blank_lines_linter", "startLineNumber": 1, "startColumn": 1, "endLineNumber": 1, "endColumn": 2 }](namespaces from the log)
"namespaces": { "processx": "3.5.2", "compiler": "4.1.0", "R6": "2.5.1", "graphics": "4.1.0", "parallel": "4.1.0", "tools": "4.1.0", "collections": "0.3.5", "utils": "4.1.0", "grDevices": "4.1.0", "stats": "4.1.0", "datasets": "4.1.0", "xml2": "1.3.2", "stringi": "1.7.5", "callr": "3.7.0", "methods": "4.1.0", "jsonlite": "1.7.3", "ps": "1.6.0", "base": "4.1.0", "languageserver": "0.3.13" },However, I can disable the linter using
options(languageserver.diagnostics = FALSE). This does not show up in the log (i.e. it still shows"diagnostics": true, but disables the linter.albert-ying commentedon Sep 19, 2022
Same problem here for MacOS. Also, I'm wondering if there is a way to disable all styling linters but keep the syntax errors.
kongdd commentedon Sep 20, 2022
Even trough
r.lsp.diagnosticshas been disabled, in the workspace settingr.lsp.diagnosticsdefault is true.dstmu commentedon Oct 2, 2022
Same here on MacOS. v.2.5.3.
renkun-ken commentedon Oct 3, 2022
@ManuelHentschel From your languageserver log, it looks like it did receive
r.lsp.diagnostics: falsebut it still publishes diagnostics on document open/save/modify?renkun-ken commentedon Oct 3, 2022
You could modify your global
~/.lintror workspace{workspaceFolder}/.lintrto specify linters to be used. If you want to get notified by parse-errors only, you might want to put the following in your lintr config:renkun-ken commentedon Oct 3, 2022
Do you mean VS Code workspace settings in
{workspaceFolder}/.vscode/settings.json? If you don't have this file, then VS Code will follow the global settings.renkun-ken commentedon Oct 3, 2022
Would you like to confirm that languageserver does receive the settings update to disable diagnostics by taking a look at #1196 (comment)?
vsabarly commentedon Oct 12, 2022
Hi, same issue on MacOS v2.6.0.
With the latest development version of languageserver, it seems that it does receive the setting:
Actually unticking the "enable diagnostics" setting works but the diagnostics appear again when VS code is restarted (and I have to check / uncheck the setting again to make them disappear).
mihaiconstantin commentedon Oct 13, 2022
It seems related to REditorSupport/languageserver#570. So far, I've been following @renkun-ken's suggestion in #1196 (comment) or using
v2.5.2as workarounds.renkun-ken commentedon Oct 13, 2022
Now I can reproduce the problem. Let me take a closer look. Looks like the diagnostics are triggered before the settings are received.
renkun-ken commentedon Oct 13, 2022
Should be fixed via REditorSupport/languageserver#577.
mihaiconstantin commentedon Oct 13, 2022
Thanks, @renkun-ken! I checked via
remotes::install_github("renkun-ken/languageserver@drop-diagnostics")and it works as expected!dstmu commentedon Oct 13, 2022
Same here.
@drop-diagnosticsfixes the issue. Thank you!vsabarly commentedon Oct 13, 2022
Thanks a lot!