Skip to content

Commit

Permalink
Remove server side document selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
vinistock committed Jan 17, 2025
1 parent d7cecb6 commit d467dcc
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 16 deletions.
2 changes: 1 addition & 1 deletion lib/ruby_lsp/requests/code_actions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class << self
sig { returns(Interface::CodeActionRegistrationOptions) }
def provider
Interface::CodeActionRegistrationOptions.new(
document_selector: [Interface::DocumentFilter.new(language: "ruby")],
document_selector: nil,
resolve_provider: true,
)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/ruby_lsp/requests/diagnostics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class << self
sig { returns(Interface::DiagnosticRegistrationOptions) }
def provider
Interface::DiagnosticRegistrationOptions.new(
document_selector: [Interface::DocumentFilter.new(language: "ruby")],
document_selector: nil,
inter_file_dependencies: false,
workspace_diagnostics: false,
)
Expand Down
8 changes: 2 additions & 6 deletions lib/ruby_lsp/requests/folding_ranges.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,9 @@ class FoldingRanges < Request
class << self
extend T::Sig

sig { returns(Interface::FoldingRangeRegistrationOptions) }
sig { returns(TrueClass) }
def provider
Interface::FoldingRangeRegistrationOptions.new(
document_selector: [
Interface::DocumentFilter.new(language: "ruby"),
],
)
true
end
end

Expand Down
8 changes: 2 additions & 6 deletions lib/ruby_lsp/requests/formatting.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,9 @@ class Error < StandardError; end
class << self
extend T::Sig

sig { returns(Interface::DocumentFormattingRegistrationOptions) }
sig { returns(TrueClass) }
def provider
Interface::DocumentFormattingRegistrationOptions.new(
document_selector: [
Interface::DocumentFilter.new(language: "ruby"),
],
)
true
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/ruby_lsp/requests/on_type_formatting.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class << self
sig { returns(Interface::DocumentOnTypeFormattingRegistrationOptions) }
def provider
Interface::DocumentOnTypeFormattingRegistrationOptions.new(
document_selector: [Interface::DocumentFilter.new(language: "ruby")],
document_selector: nil,
first_trigger_character: "{",
more_trigger_character: ["\n", "|", "d"],
)
Expand Down
2 changes: 1 addition & 1 deletion lib/ruby_lsp/requests/semantic_highlighting.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class << self
sig { returns(Interface::SemanticTokensRegistrationOptions) }
def provider
Interface::SemanticTokensRegistrationOptions.new(
document_selector: [{ language: "ruby" }, { language: "erb" }],
document_selector: nil,
legend: Interface::SemanticTokensLegend.new(
token_types: ResponseBuilders::SemanticHighlighting::TOKEN_TYPES.keys,
token_modifiers: ResponseBuilders::SemanticHighlighting::TOKEN_MODIFIERS.keys,
Expand Down

0 comments on commit d467dcc

Please sign in to comment.