我在 vscode 中使用 R,当一行超过 80 个字符时,它会抛出一个带有波浪线的注释:Lines should not more than 80 characters。 line_length_linter。但是我没有在 lint 中找到 R 来更改它。此外,在setting.json中,虽然我在互联网上搜索它,但我不知道参数配置的名称。 enter image description here
最佳答案
刚遇到同样的问题。我找到了一个 workaround suggested for Atom IDE它也适用于 VSCode。
在您的项目文件夹中创建一个 .lintr 文件并添加以下一行:
linters: with_defaults(line_length_linter=line_length_linter(100))
有关更多配置选项,请查看 lintr package documentation .
关于visual-studio-code - 关于line length linter 80 characters的一个问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67481802/