Remove debug statements
This commit is contained in:
parent
3e8b230567
commit
8931218dc6
7 changed files with 6 additions and 22 deletions
|
@ -394,14 +394,11 @@ impl LanguageRegistry {
|
||||||
.read()
|
.read()
|
||||||
.iter()
|
.iter()
|
||||||
.find(|language| {
|
.find(|language| {
|
||||||
language.config.path_suffixes.iter().any(|suffix| {
|
language
|
||||||
if path_suffixes.contains(&Some(suffix.as_str())) {
|
.config
|
||||||
dbg!(format!("found {}", suffix));
|
.path_suffixes
|
||||||
true
|
.iter()
|
||||||
} else {
|
.any(|suffix| path_suffixes.contains(&Some(suffix.as_str())))
|
||||||
false
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
.cloned()
|
.cloned()
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,8 +92,6 @@ mod tests {
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
"eko\n"
|
"eko\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
// dbg!("{}", runtime.call(&plugin.and_back, 1).await.unwrap());
|
|
||||||
}
|
}
|
||||||
.block_on()
|
.block_on()
|
||||||
}
|
}
|
||||||
|
|
|
@ -232,7 +232,6 @@ impl PluginBuilder {
|
||||||
/// Initializes a [`Plugin`] from a given compiled Wasm module.
|
/// Initializes a [`Plugin`] from a given compiled Wasm module.
|
||||||
/// Both binary (`.wasm`) and text (`.wat`) module formats are supported.
|
/// Both binary (`.wasm`) and text (`.wat`) module formats are supported.
|
||||||
pub async fn init<T: AsRef<[u8]>>(self, precompiled: bool, module: T) -> Result<Plugin, Error> {
|
pub async fn init<T: AsRef<[u8]>>(self, precompiled: bool, module: T) -> Result<Plugin, Error> {
|
||||||
dbg!("initializing plugin");
|
|
||||||
Plugin::init(precompiled, module.as_ref().to_vec(), self).await
|
Plugin::init(precompiled, module.as_ref().to_vec(), self).await
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -302,7 +301,6 @@ impl Plugin {
|
||||||
module: Vec<u8>,
|
module: Vec<u8>,
|
||||||
plugin: PluginBuilder,
|
plugin: PluginBuilder,
|
||||||
) -> Result<Self, Error> {
|
) -> Result<Self, Error> {
|
||||||
dbg!("Initializing new plugin");
|
|
||||||
// initialize the WebAssembly System Interface context
|
// initialize the WebAssembly System Interface context
|
||||||
let engine = plugin.engine;
|
let engine = plugin.engine;
|
||||||
let mut linker = plugin.linker;
|
let mut linker = plugin.linker;
|
||||||
|
|
|
@ -2041,7 +2041,6 @@ impl Project {
|
||||||
}
|
}
|
||||||
|
|
||||||
for buffer in buffers_without_language {
|
for buffer in buffers_without_language {
|
||||||
dbg!("notified that new language was added");
|
|
||||||
project.assign_language_to_buffer(&buffer, cx);
|
project.assign_language_to_buffer(&buffer, cx);
|
||||||
project.register_buffer_with_language_server(&buffer, cx);
|
project.register_buffer_with_language_server(&buffer, cx);
|
||||||
dbg!(buffer.read(cx).language().map(|x| x.name()));
|
dbg!(buffer.read(cx).language().map(|x| x.name()));
|
||||||
|
@ -2057,7 +2056,6 @@ impl Project {
|
||||||
buffer: &ModelHandle<Buffer>,
|
buffer: &ModelHandle<Buffer>,
|
||||||
cx: &mut ModelContext<Self>,
|
cx: &mut ModelContext<Self>,
|
||||||
) -> Option<()> {
|
) -> Option<()> {
|
||||||
dbg!("assigning language to buffer");
|
|
||||||
// If the buffer has a language, set it and start the language server if we haven't already.
|
// If the buffer has a language, set it and start the language server if we haven't already.
|
||||||
let full_path = buffer.read(cx).file()?.full_path(cx);
|
let full_path = buffer.read(cx).file()?.full_path(cx);
|
||||||
let language = self.languages.select_language(&full_path)?;
|
let language = self.languages.select_language(&full_path)?;
|
||||||
|
@ -2081,7 +2079,6 @@ impl Project {
|
||||||
language: Arc<Language>,
|
language: Arc<Language>,
|
||||||
cx: &mut ModelContext<Self>,
|
cx: &mut ModelContext<Self>,
|
||||||
) {
|
) {
|
||||||
dbg!(format!("starting lsp for {:?}", language.name()));
|
|
||||||
if !cx
|
if !cx
|
||||||
.global::<Settings>()
|
.global::<Settings>()
|
||||||
.enable_language_server(Some(&language.name()))
|
.enable_language_server(Some(&language.name()))
|
||||||
|
@ -2347,8 +2344,6 @@ impl Project {
|
||||||
|
|
||||||
server_id
|
server_id
|
||||||
});
|
});
|
||||||
|
|
||||||
dbg!("Done starting lsp");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns a list of all of the worktrees which no longer have a language server and the root path
|
// Returns a list of all of the worktrees which no longer have a language server and the root path
|
||||||
|
@ -3279,7 +3274,6 @@ impl Project {
|
||||||
position: T,
|
position: T,
|
||||||
cx: &mut ModelContext<Self>,
|
cx: &mut ModelContext<Self>,
|
||||||
) -> Task<Result<Vec<DocumentHighlight>>> {
|
) -> Task<Result<Vec<DocumentHighlight>>> {
|
||||||
// dbg!("getting highlights");
|
|
||||||
let position = position.to_point_utf16(buffer.read(cx));
|
let position = position.to_point_utf16(buffer.read(cx));
|
||||||
self.request_lsp(buffer.clone(), GetDocumentHighlights { position }, cx)
|
self.request_lsp(buffer.clone(), GetDocumentHighlights { position }, cx)
|
||||||
}
|
}
|
||||||
|
|
|
@ -226,7 +226,6 @@ fn main() {
|
||||||
let languages = languages.clone();
|
let languages = languages.clone();
|
||||||
|cx| async move {
|
|cx| async move {
|
||||||
// init_languages.await;
|
// init_languages.await;
|
||||||
dbg!("not all languages initialized, but starting setting highlighting");
|
|
||||||
cx.read(|cx| {
|
cx.read(|cx| {
|
||||||
languages.set_theme(cx.global::<Settings>().theme.editor.syntax.clone())
|
languages.set_theme(cx.global::<Settings>().theme.editor.syntax.clone())
|
||||||
});
|
});
|
||||||
|
|
|
@ -82,7 +82,6 @@ pub fn cached_server_binary(container_dir: PathBuf) -> Option<PathBuf> {
|
||||||
let last_version_dir = last_version_dir?;
|
let last_version_dir = last_version_dir?;
|
||||||
let bin_path = last_version_dir.join(BIN_PATH);
|
let bin_path = last_version_dir.join(BIN_PATH);
|
||||||
if bin_path.exists() {
|
if bin_path.exists() {
|
||||||
dbg!(&bin_path);
|
|
||||||
Some(bin_path)
|
Some(bin_path)
|
||||||
} else {
|
} else {
|
||||||
println!("no binary found");
|
println!("no binary found");
|
||||||
|
|
|
@ -75,9 +75,8 @@ fn command_async(command: String) -> Option<Vec<u8>>;
|
||||||
|
|
||||||
#[export]
|
#[export]
|
||||||
pub fn echo_async(message: String) -> String {
|
pub fn echo_async(message: String) -> String {
|
||||||
let command = dbg!(format!("echo {}", message));
|
let command = format!("echo {}", message);
|
||||||
let result = command_async(command);
|
let result = command_async(command);
|
||||||
dbg!(&result);
|
|
||||||
let result = result.expect("Could not run command");
|
let result = result.expect("Could not run command");
|
||||||
String::from_utf8_lossy(&result).to_string()
|
String::from_utf8_lossy(&result).to_string()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue