Closed castwide closed 3 years ago
Two updates to the language server have been pushed to the master branch:
initialize
method without needing to map the workspace first. This keeps clients from assuming the server timed out when mapping is a long-running process. After initialization, the workspace gets mapped in the backgroundwindow/workDoneProgress
will receive progress reports on the mapping process. Screenshot from VS Code:
These changes will be included in the next versions of the gem and the VS Code extension.
Updates published in v0.41.0.
@castwide I'm not sure If my issue is due to this change or something else but I lost almost entire bundled gem autocompletion.
For example, Let say I have a Rails app that contains many gems. Name it. Like; octokit
, sanitize
, semantic_logger
or puma
and unicorn
...
None of them showes up on autocomplete list:
Octokit:: # <- Not even Octokit found
Sani # <- should see Sanitizer in list.
# or
Pum # <- should also see Puma and its members.
Except few Rails
autocompletion, I almost lost every single gem from my workspace when they are installed. Please note that, files in my workspace are working.
Tried solargraph clear
and also bundle
but still no autocomplete for any of my gems. I also have this .solargraph.yml
in my root:
include:
- '**/*.rb'
exclude:
- spec/**/*
- test/**/*
- vendor/**/*
- '.bundle/**/*'
require:
- rails/all
- actioncable
- actionmailer
- actionpack
- actionview
- activejob
- activemodel
- activerecord
- activestorage
- activesupport
- grape
- grape-entity
- sentry
- sequel
- countries
- doorkeeper
- devise
- bunny
- stronger_parameters
- secure_random
- faker
- twilio
- octokit
- capistrano
- pathname
- uuid4
- iyzipay
- zammad_api
- ruby_identicon
- dnsruby
- rugged
- jwt
- omniauth
- redis
- rack-attack
- sequel-devise
- sidekiq
- countries
- nexmo
- prawn
- letter_avatar
- uri
- rethinkdb
- rails_semantic_logger
- semantic_logger
domains: []
reporters:
- rubocop
- require_not_found
plugins:
# - solargraph-rails
- runtime
max_files: 0
@gencer Confirmed. The maps aren't picking up your .solargraph.yml configuration. If you add the line require 'octokit'
to one of your Ruby files, it should start working.
I'll fix the problem in the next release.
@castwide Thank you for your fast reply. Yes, requiring any gem in rb
file directly (like you said) works on my end too.
Awaiting for the next release. ❤
Fixed in 0.42.0.
The
fast-initialize
branch aims to improve startup speed by allowing theinitialize
message to complete without mapping the entire workspace. The mapping will occur in the background instead.To do:
FileNotFoundError
when trying to access files that have not been mapped yet