diff --git a/lib/ruby_lsp/global_state.rb b/lib/ruby_lsp/global_state.rb index fb6c2cab2..df0eee261 100644 --- a/lib/ruby_lsp/global_state.rb +++ b/lib/ruby_lsp/global_state.rb @@ -21,7 +21,7 @@ class GlobalState attr_reader :encoding sig { returns(T::Boolean) } - attr_reader :experimental_features, :top_level_bundle + attr_reader :top_level_bundle sig { returns(TypeInferrer) } attr_reader :type_inferrer @@ -40,7 +40,6 @@ def initialize @has_type_checker = T.let(true, T::Boolean) @index = T.let(RubyIndexer::Index.new, RubyIndexer::Index) @supported_formatters = T.let({}, T::Hash[String, Requests::Support::Formatter]) - @experimental_features = T.let(false, T::Boolean) @type_inferrer = T.let(TypeInferrer.new(@index), TypeInferrer) @addon_settings = T.let({}, T::Hash[String, T.untyped]) @top_level_bundle = T.let( @@ -131,7 +130,6 @@ def apply_options(options) end @index.configuration.encoding = @encoding - @experimental_features = options.dig(:initializationOptions, :experimentalFeaturesEnabled) || false @client_capabilities.apply_client_capabilities(options[:capabilities]) if options[:capabilities] addon_settings = options.dig(:initializationOptions, :addonSettings) diff --git a/test/global_state_test.rb b/test/global_state_test.rb index c28fa8b18..02dc0ee66 100644 --- a/test/global_state_test.rb +++ b/test/global_state_test.rb @@ -188,17 +188,6 @@ def test_linter_auto_detection_with_rubocop_as_transitive_dependency assert_includes(state.instance_variable_get(:@linters), "rubocop") end - def test_apply_options_sets_experimental_features - state = GlobalState.new - refute_predicate(state, :experimental_features) - - state.apply_options({ - initializationOptions: { experimentalFeaturesEnabled: true }, - }) - - assert_predicate(state, :experimental_features) - end - def test_type_checker_is_detected_based_on_transitive_sorbet_static state = GlobalState.new