fix: nix-shell LSP

This commit is contained in:
Maciej Jur 2024-06-28 18:18:25 +02:00
parent 0e15adaa6c
commit 724162277c
Signed by: kamov
GPG key ID: 191CBFF5F72ECAFD
4 changed files with 10 additions and 6 deletions

View file

@ -4,11 +4,14 @@ pkgs.mkShell {
buildInputs = with pkgs; [
cargo
clippy
rustfmt
rust-analyzer
pagefind
esbuild
nodePackages.pnpm
pagefind
python3
rust-analyzer
rustc
rustfmt
];
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
}

View file

@ -106,7 +106,7 @@ impl Content for md::Slide {
content: T,
_: Outline,
_: &'s Sack,
bib: Option<Vec<String>>,
_bib: Option<Vec<String>>,
) -> impl Renderable + 'html
where
'f: 'html,

View file

@ -33,7 +33,7 @@ static KATEX_B: Lazy<katex::Opts> = Lazy::new(||
.unwrap()
);
static LOCALE: Lazy<Vec<Locale>> = Lazy::new(|| hayagriva::archive::locales());
static LOCALE: Lazy<Vec<Locale>> = Lazy::new(hayagriva::archive::locales);
static STYLE: Lazy<IndependentStyle> = Lazy::new(||
match ArchivedStyle::InstituteOfPhysicsNumeric.get() {
@ -203,6 +203,7 @@ fn set_heading_ids(events: &mut [Event]) -> Outline {
Outline(out)
}
fn make_math(event: Event) -> Event {
match event {
Event::InlineMath(math) => Event::InlineHtml(katex::render_with_opts(&math, &*KATEX_I).unwrap().into()),

View file

@ -82,7 +82,7 @@ pub fn watch() -> Result<()> {
let thread_i = new_thread_ws_incoming(server, client.clone());
let (tx_reload, thread_o) = new_thread_ws_reload(client.clone());
while let Ok(ev) = rx.recv().unwrap() {
while let Ok(_ev) = rx.recv().unwrap() {
build_styles();
tx_reload.send(()).unwrap();
}