Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove server side document selectors #3074

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading