Comments (7)
Gem 0.17.4 with the fix for this issue is published.
from vscode-solargraph.
It should work with your own functions. This is what I get with a single file:
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.
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.
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.
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.
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.
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)
- 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.