chore: Fix several style lints (#17488)
It's not comprehensive enough to start linting on `style` group, but hey, it's a start. Release Notes: - N/A
This commit is contained in:
parent
93249fc82b
commit
e6c1c51b37
361 changed files with 3530 additions and 3587 deletions
|
@ -88,7 +88,7 @@ impl RubyLsp {
|
|||
pub fn label_for_symbol(&self, symbol: Symbol) -> Option<CodeLabel> {
|
||||
let name = &symbol.name;
|
||||
|
||||
return match symbol.kind {
|
||||
match symbol.kind {
|
||||
SymbolKind::Method => {
|
||||
let code = format!("def {name}; end");
|
||||
let filter_range = 0..name.len();
|
||||
|
@ -123,6 +123,6 @@ impl RubyLsp {
|
|||
})
|
||||
}
|
||||
_ => None,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,15 +29,15 @@ impl zed::Extension for RubyExtension {
|
|||
) -> Result<zed::Command> {
|
||||
match language_server_id.as_ref() {
|
||||
Solargraph::LANGUAGE_SERVER_ID => {
|
||||
let solargraph = self.solargraph.get_or_insert_with(|| Solargraph::new());
|
||||
let solargraph = self.solargraph.get_or_insert_with(Solargraph::new);
|
||||
solargraph.language_server_command(language_server_id, worktree)
|
||||
}
|
||||
RubyLsp::LANGUAGE_SERVER_ID => {
|
||||
let ruby_lsp = self.ruby_lsp.get_or_insert_with(|| RubyLsp::new());
|
||||
let ruby_lsp = self.ruby_lsp.get_or_insert_with(RubyLsp::new);
|
||||
ruby_lsp.language_server_command(language_server_id, worktree)
|
||||
}
|
||||
Rubocop::LANGUAGE_SERVER_ID => {
|
||||
let rubocop = self.rubocop.get_or_insert_with(|| Rubocop::new());
|
||||
let rubocop = self.rubocop.get_or_insert_with(Rubocop::new);
|
||||
rubocop.language_server_command(language_server_id, worktree)
|
||||
}
|
||||
language_server_id => Err(format!("unknown language server: {language_server_id}")),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue