Sha256: d9196dc321958a995bbc551e63a80cc0a0adea2b7de5a848b8d852ccf83f433c

Contents?: true

Size: 717 Bytes

Versions: 13

Compression:

Stored size: 717 Bytes

Contents

# frozen_string_literal: true

module ThemeCheck
  module LanguageServer
    class ClientCapabilities
      def initialize(capabilities)
        @capabilities = capabilities
      end

      def supports_work_done_progress?
        @capabilities.dig(:window, :workDoneProgress) || false
      end

      def supports_workspace_configuration?
        @capabilities.dig(:workspace, :configuration) || false
      end

      def supports_workspace_did_change_configuration_dynamic_registration?
        @capabilities.dig(:workspace, :didChangeConfiguration, :dynamicRegistration) || false
      end

      def initialization_option(key)
        @capabilities.dig(:initializationOptions, key)
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
theme-check-1.15.0 lib/theme_check/language_server/client_capabilities.rb
theme-check-1.14.0 lib/theme_check/language_server/client_capabilities.rb
theme-check-1.13.0 lib/theme_check/language_server/client_capabilities.rb
theme-check-1.12.1 lib/theme_check/language_server/client_capabilities.rb
theme-check-1.12.0 lib/theme_check/language_server/client_capabilities.rb
theme-check-1.11.0 lib/theme_check/language_server/client_capabilities.rb
theme-check-1.10.3 lib/theme_check/language_server/client_capabilities.rb
theme-check-1.10.2 lib/theme_check/language_server/client_capabilities.rb
theme-check-1.10.1 lib/theme_check/language_server/client_capabilities.rb
theme-check-1.10.0 lib/theme_check/language_server/client_capabilities.rb
theme-check-1.9.2 lib/theme_check/language_server/client_capabilities.rb
theme-check-1.9.1 lib/theme_check/language_server/client_capabilities.rb
theme-check-1.9.0 lib/theme_check/language_server/client_capabilities.rb