idt/installers/
vscode_langservers.rs

1use std::path::Path;
2
3use crate::Installer;
4
5pub struct VsCodeLangServers<'a> {
6    pub dev_tools_dir: &'a Path,
7    pub bin_dir: &'a Path,
8}
9
10impl Installer for VsCodeLangServers<'_> {
11    fn bin_name(&self) -> &'static str {
12        "vscode-langservers-extracted"
13    }
14
15    fn install(&self) -> color_eyre::Result<()> {
16        let target_dir = crate::downloaders::npm::run(self.dev_tools_dir, self.bin_name(), &[self.bin_name()])?;
17
18        ytil_sys::file::ln_sf_files_in_dir(target_dir, (&self.bin_dir).into())?;
19        ytil_sys::file::chmod_x_files_in_dir(self.bin_dir)?;
20
21        Ok(())
22    }
23
24    // NOTE: skip because it's a shitshow...
25    fn check_args(&self) -> Option<&[&str]> {
26        None
27    }
28}