Giter Site home page Giter Site logo

Comments (17)

castwide avatar castwide commented on July 17, 2024 2

@svoop The master branch now includes two important updates:

  • It uses the latest version of solargraph-utils, which improves automatic environment detection.
  • It adds a commandPath configuration option.

I expect to publish the package in the next few days.

from atom-solargraph.

FunkyloverOne avatar FunkyloverOne commented on July 17, 2024 1

@castwide I can confirm that I've finally succeeded! :D

I had to start Atom from terminal though.
Currently linter-rubocop and linter-reek are working somehow even without having to start Atom from terminal, I have no idea how they are doing it.

Yet what we have now is a good start indeed! Thank you!

from atom-solargraph.

castwide avatar castwide commented on July 17, 2024

Try updating the gem first. Today I published version 0.17.1. It resolves an issue with infinite recursion loops in some workspace environments.

Since you're getting messages about required paths in the console, I assume you're using it on an existing project. Sometimes it can take a while to process the maps on very large projects. Rails apps are especially susceptible to this. After the initial mapping, requests should become much faster.

Make sure you're capitalizing String to get class method suggestions. Results are case-sensitive.

If you still have problems, please let me know your OS, the versions of the Solargraph gem and the Atom package, and any errors you see in the console.

from atom-solargraph.

castwide avatar castwide commented on July 17, 2024

Version 0.2.0 of the package fixes an issue with project directories that might resolve your problem. There's also a new version of the gem, so be sure to gem update solargraph.

from atom-solargraph.

FunkyloverOne avatar FunkyloverOne commented on July 17, 2024

@castwide how to verify it's running? I'm running this in terminal - solargraph socket, and receive
Solargraph is listening PORT=7658 PID=13393
Then I run atom, also from terminal, ruby versions are same (2.5.0), package installed & enabled, but I can't see it's working. I'm tunning everything from my project folder, and I'm also having file .solargraph.yml in my project folder with the following content:

plugins:
  - runtime

from atom-solargraph.

castwide avatar castwide commented on July 17, 2024

@FunkyloverOne The Atom package is a little behind insofar as recent updates to the gem. Among other things, it still uses the old web API for integration instead of the language server protocol. I'm in the process of updating the package to use LSP.

Plugins are still experimental and prone to bugs, so you might need to remove them from .solargraph.yml.

You don't need to run solargraph socket for Atom, although it shouldn't affect anything. The package starts its own server process when it gets activated.

Unfortunately, other problems are likely to persist until the package is updated. Related issue: #5

from atom-solargraph.

castwide avatar castwide commented on July 17, 2024

It occurred to me that you might be able to get it to work with an earlier version of the gem, so I tested a few of them and was able to get results with v0.17.4.

Installing the gem:

gem uninstall solargraph
gem install solargraph -v 0.17.4

Results in Atom:

image

You still might encounter issues that have been resolved in the latest gem. I'll update #5 when the package is able to use it.

from atom-solargraph.

michielboekhoff avatar michielboekhoff commented on July 17, 2024

@castwide this tool is awesome! Got it working today using the master branch. For anyone else struggling to get this running, I ran apm install https://github.com/castwide/atom-solargraph.git from the command line and it works with the latest version of the gem.

from atom-solargraph.

castwide avatar castwide commented on July 17, 2024

Thanks, @michielboekhoff! The master branch currently uses the language server protocol as mentioned in #5. I have a few more changes and tests to run before I publish the Atom package, but it should be close to ready.

from atom-solargraph.

castwide avatar castwide commented on July 17, 2024

Version 0.3.0 with LSP support is published.

from atom-solargraph.

FunkyloverOne avatar FunkyloverOne commented on July 17, 2024

@castwide For me version 0.3.0 still doesn't seem to work at all... I got my ruby installed via ruby-install+chruby, and stuff like linter-rubocop and linter-reek is working.
Doesn't seem to work with solargaprh v0.17.4 neither.

In atom console I got this error:

Uncaught (in promise) /bin/bash: solargraph: command not found

Screenshot

I guess I know how to fix it - you simply got to provide configuration parameter for solargraph executable path, just like linter-rubocop and linter-reek are doing.

from atom-solargraph.

FunkyloverOne avatar FunkyloverOne commented on July 17, 2024

Hey @castwide I see that you already have a commandPath config param in your solargraph-utils here:
https://github.com/castwide/solargraph-utils/blob/b3f73eef3a35264ad5d36a82a4a9dd4f8e913690/src/Configuration.ts#L9

So it's only needed to add such config to this package and pass it to SocketProvider

from atom-solargraph.

castwide avatar castwide commented on July 17, 2024

@FunkyloverOne That should work, yes. I'll work on an update to atom-solargraph. I'm also in the process of an update to solargraph-utils that should help fix some other issues related to starting the server process.

from atom-solargraph.

svoop avatar svoop commented on July 17, 2024

@castwide Any news on this? It'd be very cool to use solargraph together with chruby.

PS: As a workaround, symlinking the solargraph binary into the PATH helps. In my case, I do something along the lines of ln -s ~/.gem/ruby/2.6.1/bin/solargraph /usr/local/bin/.

from atom-solargraph.

FunkyloverOne avatar FunkyloverOne commented on July 17, 2024

Hey @castwide, here's what does the trick for reek and rubocop I believe:
steelbrain/atom-linter#62

from atom-solargraph.

castwide avatar castwide commented on July 17, 2024

Thanks, @FunkyloverOne. That looks promising. Since the current version of atom-solargraph seems like a step in the right direction for most users, I'll still release it this week, but I'll refer to that thread for possible improvements.

from atom-solargraph.

castwide avatar castwide commented on July 17, 2024

Version 0.4.0 is released with the commandPath configuration option.

from atom-solargraph.

Related Issues (17)

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.