Remove optional path argument when getting settings

This commit is contained in:
Max Brunsfeld 2023-05-17 15:05:20 -07:00
parent 1f0e79ee9d
commit 2d5f03e148
35 changed files with 84 additions and 113 deletions

View file

@ -318,7 +318,7 @@ impl Copilot {
fn enable_or_disable_copilot(&mut self, cx: &mut ModelContext<Copilot>) {
let http = self.http.clone();
let node_runtime = self.node_runtime.clone();
if all_language_settings(None, cx).copilot_enabled(None, None) {
if all_language_settings(cx).copilot_enabled(None, None) {
if matches!(self.server, CopilotServer::Disabled) {
let start_task = cx
.spawn({
@ -786,7 +786,6 @@ impl Copilot {
let uri = registered_buffer.uri.clone();
let position = position.to_point_utf16(buffer);
let settings = language_settings(
None,
buffer.language_at(position).map(|l| l.name()).as_deref(),
cx,
);