Giter Club home page Giter Club logo

Comments (3)

WToorenburghIntiveo avatar WToorenburghIntiveo commented on May 25, 2024 1

Right, so for whatever reason, when I tried to install the ruby-debug-ide and debase gems for doing debugging in VSCode, it broke Solargraph. It started throwing that Windows eventmachine compile issue. I reinstalled ruby, installed the debugging gems first, then installed eventmachine using the workaround, and installed Solargraph last. Things seem to work now, with snappy suggestions and linting. I'm really not sure where along the line my ruby install go so bunged up. Thanks for your time!

from vscode-solargraph.

castwide avatar castwide commented on May 25, 2024

The --port 0 argument in the command line is normal. It tells the process to run on the first available port it can find. The extension reads the Solargraph is listening message to identify the port for the client connection. This way, multiple instances of VSCode can run their own language servers without port conflicts.

For the completion problems:

  • When Solargraph starts, you should see two messages in the status bar at the lower left: Solargraph is starting the language server... and Solargraph is ready.
  • I assume you have a folder open, since you have a .solargraph.yml file. Is it a multi-root workspace?
  • Does your project have a vendor directory? If so, you probably want to exclude vendor/**/* in the config.
  • Are you editing a file with an .rb extension?
  • Are there any syntax errors in the file? (Solargraph is usually capable of correcting for errors, especially while you're actively editing the file, but there are exceptions.)

For the RuboCop problem, try adding the following to your .solargraph.yml file:

reporters:
- rubocop

The diagnostics features are in the process of an update, and I neglected to document some of the changes. I'll put documentation on the roadmap.

from vscode-solargraph.

WToorenburghIntiveo avatar WToorenburghIntiveo commented on May 25, 2024

Good to know about the argument! For some reason, I thought I had seen it have a port listed in the past. I verified that the server was listening on the port listed in VSCode using Process Explorer.

  • The Solargraph starting messages do indeed appear when I launch VSCode.
  • Correct! I just have a single folder opened.
  • No, my project does not have a vendor directory.
  • I don't seem to be getting suggestions or autocompletes on either files saved with an .rb extension, or unsaved files with the language set using the Change Language Mode... command.
  • I don't believe there are, no.

Adding the reporters setting seems to have Rubocop working!

If this helps, I tried comparing curl results between the server VSCode started, and one started manually using solargraph server:
solargraph-server-responses

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.