castwide / solargraph

A Ruby language server.
https://solargraph.org
MIT License
1.9k stars 156 forks source link

Faster server initialization #415

Closed castwide closed 3 years ago

castwide commented 3 years ago

The fast-initialize branch aims to improve startup speed by allowing the initialize message to complete without mapping the entire workspace. The mapping will occur in the background instead.

To do:

castwide commented 3 years ago

Two updates to the language server have been pushed to the master branch:

These changes will be included in the next versions of the gem and the VS Code extension.

castwide commented 3 years ago

Updates published in v0.41.0.

gencer commented 3 years ago

@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
castwide commented 3 years ago

@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.

gencer commented 3 years ago

@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. ❤

castwide commented 3 years ago

Fixed in 0.42.0.