Comments (15)
That helped. Thanks
from vscode-solargraph.
Also, the VSCode project page makes no mention of linting anywhere on it. I had to find the git repo to discover Solargraph was triggering all the green lines.
from vscode-solargraph.
The project page will be updated with the repo's current README in the next release.
Default to false
is reasonable. The configuration should probably allow for cherry-picking other capabilities as well.
from vscode-solargraph.
Version 0.16.0 is published. solargraph.diagnostics
defaults to false and the README includes documentation for diagnostics/linting.
from vscode-solargraph.
This feature is liable to change. I expect configuration of diagnostics reporters to move to the .solargraph.yml file. More information: castwide/solargraph#42
This means the solargraph.diagnostics
configuration will probably be deprecated. The default setting will still be to disable RuboCop.
If this causes problems or anyone has other suggestions, please let me know.
from vscode-solargraph.
I've decided to keep the solargraph.diagnostics
configuration. It gives users the ability to decide whether to display diagnostics in their editor, which is a separate issue from which diagnostics rules are assigned to the project. Example: a project might use RuboCop to enforce its style guidelines, but a user should be able to opt out of notifications about it.
To that end, the solargraph.diagnostics
options will be true
or false
. Default will still be false
. Selection of reporters, including RuboCop, will still be a function of the .solargraph.yml file.
from vscode-solargraph.
It seems like with the latest vscode and solargraph, when "editor.formatOnSave": true
is set, this extension runs rubocop even if "solargraph.diagnostics": false
. Is there a different way to disable solargraph diagnostics? I'm not up to speed on vscode language extensions and language servers, but I couldn't see where this setting is even being used.
from vscode-solargraph.
Forgive the error in my previous comment. I meant to say formatting is still happening even when "solargraph.formatting": false
from vscode-solargraph.
@jtokoph Confirmed. The server didn't take the solargraph.formatting
setting into account when dynamically registering capabilities, so it stayed on by default. I've fixed it in the gem's master branch. The updated gem is scheduled for release by May 7.
from vscode-solargraph.
Extension 0.17.0 and gem 0.21.0 fix the problem synchronizing the solargraph.formatting
setting.
from vscode-solargraph.
@castwide Where is the solargraph.diagnostics
setting placed? Is it part of .solargraph.yml ?
from vscode-solargraph.
@patilarpith It's a user/workspace preference setting in VS Code (or a value that can be sent via the workspace/didChangeConfiguration
method with any language client).
You can use the .solargraph.yml file to select which reporters a project uses for diagnostics, e.g.:
reporters:
- rubocop
from vscode-solargraph.
Didn't realise I was on a different repo. Followed the link from castwide/solargraph
So I've setup reporters in .solargraph.yml in the workspace root folder. Still, I'm unable to see diagnostics notification upon calling didChange.
Is enabling diagnostics require to be done via initialization params?
from vscode-solargraph.
Yes, you should be able to set it in the initialize
method's initializationOptions
params, in which case you would omit the solargraph
key. Example:
{
"initializationOptions": {
"diagnostics": true
}
}
from vscode-solargraph.
Default solargraph.diagnostics
settings and updates via dynamic registration should work now. If anyone still experiences problems, please open a new issue.
from vscode-solargraph.
Related Issues (20)
- Error: spawn solargraph ENOENT
- Error in diagnostics: RuboCop returned invalid data HOT 2
- Poll: is vscode-solargraph reliable/performant for medium-size Rails apps? HOT 2
- Rename Symbol Not Working
- autoformat in vs code deleting comments HOT 2
- Allow Setting the Port of externalServer to a String HOT 1
- Can not read properties of undefined HOT 2
- RuboCop --auto-correct is deprecated; use --autocorrect instead HOT 2
- Conflicting VS Code keybindings to search Ruby documentation HOT 1
- Document query was stuck in Rails project. HOT 1
- No Intellisense for Gems installed in custom home path HOT 1
- Completion menu only shows "Loading..." until I restart Solargraph HOT 3
- Request textDocument/documentHighlight failed. HOT 3
- Logging support unknown langId to enable trace setting
- solargraph not updating on changes HOT 1
- Logo in Visual Studio Marketplace HOT 3
- string arrays as default keyword arguments throws coloring off HOT 2
- It doesn't seem to be working: what theme should I use with Solargraph? HOT 1
- Request textDocument/definition failed when clicking on require HOT 2
- Compatibility with Ruby LSP?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-solargraph.