Giter Club home page Giter Club logo

Comments (15)

patilarpith avatar patilarpith commented on May 25, 2024 1

That helped. Thanks

from vscode-solargraph.

jacquescrocker avatar jacquescrocker commented on May 25, 2024

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.

castwide avatar castwide commented on May 25, 2024

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.

castwide avatar castwide commented on May 25, 2024

Version 0.16.0 is published. solargraph.diagnostics defaults to false and the README includes documentation for diagnostics/linting.

from vscode-solargraph.

castwide avatar castwide commented on May 25, 2024

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.

castwide avatar castwide commented on May 25, 2024

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.

jtokoph avatar jtokoph commented on May 25, 2024

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.

jtokoph avatar jtokoph commented on May 25, 2024

Forgive the error in my previous comment. I meant to say formatting is still happening even when "solargraph.formatting": false

from vscode-solargraph.

castwide avatar castwide commented on May 25, 2024

@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.

castwide avatar castwide commented on May 25, 2024

Extension 0.17.0 and gem 0.21.0 fix the problem synchronizing the solargraph.formatting setting.

from vscode-solargraph.

patilarpith avatar patilarpith commented on May 25, 2024

@castwide Where is the solargraph.diagnostics setting placed? Is it part of .solargraph.yml ?

from vscode-solargraph.

castwide avatar castwide commented on May 25, 2024

@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.

patilarpith avatar patilarpith commented on May 25, 2024

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.

castwide avatar castwide commented on May 25, 2024

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.

castwide avatar castwide commented on May 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.