Vscode-r: Enable Real Time Lintr in Problems Tab

Created on 22 Feb 2020  路  4Comments  路  Source: Ikuyadeu/vscode-R

Until recently I was using R Tools, which was showing Lintr results pretty much in real time within VS Code鈥檚 Problem.

However, when using the current exension the lintr is not working anymore. The entry "r.lintr.enable": true is now an unknown configuration setting.

Yet, linting through R using lintr::lint("test.r") works fine.

Is there anything else I need to set?

language server

All 4 comments

Linting is provided by languageserver on document open, change and save. Please make sure you have vscode-r-lsp and languageserver installed, and make sure you enabled r.lsp.diagnostics in VSCode settings (which is on by default).

You could customize the linting according to https://github.com/REditorSupport/languageserver#linters.

We may need a major improvement of README to make clear the setup of multiple parts including vscode-R, vscode-r-lsp, languageserver, and radian on Windows, Linux/macOS so that it is easier for user to have the full experience these parts combined has to offer.

Hey renkun-ken,
thanks for clarification! Indeed updating the doc would greatly benefit new users. I successfully performed the following steps to enable linting:

  1. Install R package install.packages("languageserver")
  2. Install VS Code R LSP Client
  3. Add this to (workspace) settings: "r.lsp.path": "C:\\Program Files\\R\\[R VERSION]\\bin\\x64\\R.exe"
  4. Restart VS Code
  5. Profit

Closing now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bdeshon picture bdeshon  路  3Comments

maxheld83 picture maxheld83  路  4Comments

gcambray picture gcambray  路  4Comments

michaelHL picture michaelHL  路  5Comments

tdeenes picture tdeenes  路  5Comments