Implement a more robust way of locating rust-analyzer

When bundled, we will retrieve it out of the `Resources` folder.
Locally, we're expected to run `script/download-rust-analyzer` and
put `vendor/bin` in our $PATH.
This commit is contained in:
Antonio Scandurra 2021-10-25 11:02:35 +02:00
parent 715faaaceb
commit 59ed535cdf
13 changed files with 97 additions and 52 deletions

View file

@ -1,6 +1,6 @@
use super::CursorStyle;
use crate::{AnyAction, ClipboardItem};
use anyhow::Result;
use anyhow::{anyhow, Result};
use parking_lot::Mutex;
use pathfinder_geometry::vector::Vector2F;
use std::{
@ -148,6 +148,10 @@ impl super::Platform for Platform {
fn local_timezone(&self) -> UtcOffset {
UtcOffset::UTC
}
fn path_for_resource(&self, _name: Option<&str>, _extension: Option<&str>) -> Result<PathBuf> {
Err(anyhow!("app not running inside a bundle"))
}
}
impl Window {