Skip to content

Commit 268c781

Browse files
committed
Refactor EmmyLua imports and qualify LspSettings
1 parent a9331a3 commit 268c781

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/emmylua.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
use std::fs;
2-
use zed::lsp::CompletionKind;
3-
use zed::{CodeLabel, CodeLabelSpan, LanguageServerId};
4-
use zed_extension_api::settings::LspSettings;
5-
use zed_extension_api::{self as zed, Command, Result};
2+
use zed::{CodeLabel, CodeLabelSpan, LanguageServerId, Result, lsp::CompletionKind};
3+
use zed_extension_api::{self as zed};
64

75
struct EmmyLuaExtension {
86
cached_binary_path: Option<String>,
@@ -14,7 +12,7 @@ impl EmmyLuaExtension {
1412
language_server_id: &LanguageServerId,
1513
worktree: &zed::Worktree,
1614
) -> Result<String> {
17-
if let Ok(lsp_settings) = LspSettings::for_worktree("emmylua", worktree) {
15+
if let Ok(lsp_settings) = zed::settings::LspSettings::for_worktree("emmylua", worktree) {
1816
if let Some(binary) = lsp_settings.binary {
1917
if let Some(path) = binary.path {
2018
return Ok(path);
@@ -137,7 +135,7 @@ impl zed::Extension for EmmyLuaExtension {
137135
let mut env = worktree.shell_env();
138136
let mut args = Default::default();
139137

140-
if let Ok(lsp_settings) = LspSettings::for_worktree("emmylua", worktree) {
138+
if let Ok(lsp_settings) = zed::settings::LspSettings::for_worktree("emmylua", worktree) {
141139
if let Some(binary) = lsp_settings.binary {
142140
if let Some(binary_arguments) = binary.arguments {
143141
args = binary_arguments;

0 commit comments

Comments
 (0)