Comments (7)
-
What operating system are you using?
-
Does the file you're editing have a .rb extension?
-
What's the code in the file?
-
If you go to Help -> Toggle Developer Tools and open the Console, are there any error messages? Please copy/paste or take a screenshot if you can.
from vscode-solargraph.
-
Ubuntu 16.10.
-
Yep.
-
It's proprietary 😃 But it's a small-ish Sinatra controller. I'm not getting any completions even at the top-level, before the class definition.
-
No errors, just:
[Extension Host] Solargraph extension activated.
extensionHost.ts:335[Extension Host] The Solargraph gem is installed and working.
extensionHost.ts:335[Extension Host] Checking gem version
extensionHost.ts:335[Extension Host] Updating gem yardocs
extensionHost.ts:335[Extension Host] Starting the server
extensionHost.ts:335[Extension Host] [2017-08-29 23:01:56] INFO WEBrick 1.3.1
[2017-08-29 23:01:56] INFO ruby 2.3.4 (2017-03-30) [x86_64-linux]
extensionHost.ts:335[Extension Host] == Sinatra (v2.0.0) has taken the stage on 0 for development with backup from WEBrick
[2017-08-29 23:01:56] INFO WEBrick::HTTPServer#start: pid=19225 port=38409
extensionHost.ts:335[Extension Host] Preparing /home/dgutov/stash/project-name
extensionHost.ts:335[Extension Host] warning: parser/current is loading parser/ruby23, which recognizes
warning: 2.3.3-compliant syntax, but you are running 2.3.4.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
extensionHost.ts:335[Extension Host] Getting completion items using workspace /home/dgutov/stash/project-name
extensionHost.ts:335[Extension Host] Solargraph gem version is current
extensionHost.ts:335 [Extension Host] Getting completion items using workspace /home/dgutov/stash/project-name
extensionHost.ts:335 [Extension Host] Preparing /home/dgutov/stash/project-name
extensionHost.ts:335 [Extension Host]
2extensionHost.ts:335 [Extension Host] Getting completion items using workspace /home/dgutov/stash/project-name
(and nothing)
from vscode-solargraph.
I just had the OS do an OOM kill on a solargraph server process. That could be related.
from vscode-solargraph.
It might be choking on the size of the workspace, but I think it would have to be plenty big. I haven't run into serious issues up to about 10kloc.
One common cause I've encountered is unit tests. I had problems with RSpec suites on a couple of projects. I fixed it by having the gem avoid parsing anything in the spec/ folder by default. If you have tests in a folder with a different name, that might be where it's hanging.
You can try excluding unnecessary directories with a .solargraph.yml file. Let's say, for example, you want to skip a folder named test/. You can do the following:
-
Go to the command palette and run
Create a Solargraph config file
. (This is the same as runningsolargraph config
from the command line.) It'll create a .solargraph.yml file with default settings. -
Add the directory you want to exclude to .solargraph.yml so it looks something like this:
include: - ./**/*.rb exclude: - spec/**/* - test/**/* # <- Your new entry
- Go to the command palette and run
Restart Solargraph
.
(Side note: if you're editing a file in an excluded directory, Solargraph will still analyze that specific file while ignoring everything else.)
I still haven't figured out why test suites in particular are such a drag on performance.
from vscode-solargraph.
Thanks, that did it. I tried creating such a config previously, but we have a repo with multiple projects in one directory, and now I've opened just one of them as the workspace (and put the config inside it), completion at least does something.
It's very slow, though: after pressing Ctrl-Space, I have to wait like 1-4 seconds, depending on the context, before the menu shows up. It even takes about 1 second in a newly generated Rails project.
from vscode-solargraph.
Cool. That's a start.
I'm working on ways to improve responsiveness, especially on medium to large projects. That's primarily an issue with the gem, where most of the heavy lifting happens.
from vscode-solargraph.
Thanks. I'll close this, then.
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.