save
This commit is contained in:
parent
230ef10f59
commit
3f9d5ff1cc
@ -316,7 +316,7 @@ pub fn sync_fast(
|
|||||||
let uri = Url::from_file_path(path.to_string()).unwrap();
|
let uri = Url::from_file_path(path.to_string()).unwrap();
|
||||||
let file_id = backend.server.srcs.get_id(&uri);
|
let file_id = backend.server.srcs.get_id(&uri);
|
||||||
if let Some(file) = backend.server.srcs.get_file(file_id) {
|
if let Some(file) = backend.server.srcs.get_file(file_id) {
|
||||||
let _ = file.read().unwrap();
|
let _unused = file.read().unwrap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,10 +187,6 @@ impl LanguageServer for Backend {
|
|||||||
});
|
});
|
||||||
|
|
||||||
let root_uri = ¶ms.root_uri;
|
let root_uri = ¶ms.root_uri;
|
||||||
if root_uri.is_none() {
|
|
||||||
self.client.show_message(MessageType::ERROR, "LSP 启动失败,原因: 没有找到启动的 workspaceFolder").await;
|
|
||||||
return Ok(InitializeResult::default());
|
|
||||||
}
|
|
||||||
|
|
||||||
let mut configure = self.server.conf.write().unwrap();
|
let mut configure = self.server.conf.write().unwrap();
|
||||||
configure.workspace_folder = root_uri.clone();
|
configure.workspace_folder = root_uri.clone();
|
||||||
|
@ -192,8 +192,7 @@ fn find_src_paths(dirs: &[PathBuf]) -> Vec<PathBuf> {
|
|||||||
if entry.file_type().is_file() && entry.path().extension().is_some() {
|
if entry.file_type().is_file() && entry.path().extension().is_some() {
|
||||||
let extension = entry.path().extension().unwrap();
|
let extension = entry.path().extension().unwrap();
|
||||||
|
|
||||||
if extension == "sv" || extension == "svh" || extension == "v" || extension == "vh"
|
if extension == "sv" || extension == "svh" || extension == "v" || extension == "vh" {
|
||||||
{
|
|
||||||
let entry_path = entry.path().to_path_buf();
|
let entry_path = entry.path().to_path_buf();
|
||||||
if !paths.contains(&entry_path) {
|
if !paths.contains(&entry_path) {
|
||||||
paths.push(entry_path);
|
paths.push(entry_path);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user