Giter Club home page Giter Club logo

Comments (7)

castwide avatar castwide commented on May 23, 2024 1

Gem 0.17.4 with the fix for this issue is published.

from vscode-solargraph.

castwide avatar castwide commented on May 23, 2024

It should work with your own functions. This is what I get with a single file:

image

Support for require_relative is in progress, but Solargraph should automatically map other Ruby files in your workspace. Simple example: if you open a folder containing two files and one of them defines a class, you should get results for the class and its methods in the other file same as above.

from vscode-solargraph.

garyking avatar garyking commented on May 23, 2024

Thanks I can confirm everything you said regarding Classes auto-completion.

Does Solargraph only work for classes and not functions? This doesn't work:

def foo(bar)
end

foo()

There's no IntelliSense for foo().

Also does this project support "Go to symbol in workspace"? Or is that the responsibility of other VSC extensions?

from vscode-solargraph.

castwide avatar castwide commented on May 23, 2024

Does Solargraph only work for classes and not functions?

Yes, that's a known limitation. Methods defined in the global namespace don't get detected in the maps. There's a fix for it in the gem repo, so it should work correctly in gem version 0.17.4.

Also does this project support "Go to symbol in workspace"? Or is that the responsibility of other VSC extensions?

That's not supported yet, but I expect to add it. I'm in the process of modifying the gem to use the language server protocol and hope to implement as many of its features as possible. ("Go to Definition" and "Peek Definition" currently work.)

from vscode-solargraph.

garyking avatar garyking commented on May 23, 2024

Okay thanks. You don't know of any other VSCode extensions that provide "Go to symbol in file/workspace" for Ruby in VSC, would you? Just so I can use those for now. I'm new to VSC and surprised to find that this doesn't already exist for Ruby.

Also, I look forward to the 0.17.4 gem release.

from vscode-solargraph.

castwide avatar castwide commented on May 23, 2024

Sorry, I don't. Ruby debug support has been solid for a while thanks to the Ruby extension, but advanced language features are a more recent development.

from vscode-solargraph.

castwide avatar castwide commented on May 23, 2024

The latest versions of the gem and extension use the language server protocol and include support for "Go to symbol in file/workspace."

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.