1
0
Fork 0
forked from foxora/nix

actually fixed rust-analyzer this time

This commit is contained in:
foxora 2026-05-03 15:06:05 +01:00
parent 8a44655415
commit 1776e1d58d
3 changed files with 80 additions and 15 deletions

View file

@ -1,10 +1,6 @@
# TODO: look into changing to this:
# https://github.com/BirdeeHub/nix-wrapper-modules
{
inputs,
upkgs,
...
}: let
{inputs, ...}: let
inherit
(inputs.nixcats)
utils
@ -62,11 +58,16 @@ in {
docs = [nix-doc]; # TODO: i forgot how to integrate this into neovim
};
rust = {
lsp = [cargo upkgs.rust-analyzer];
lsp = [
cargo
# !!!!!!!!! remember to change environment variable !!!!!!!!!!!!
# currently a regression: https://github.com/rust-lang/rust-analyzer/pull/22207
inputs.nixpkgs-rust.legacyPackages.${system}.rust-analyzer
];
# nightly rustfmt has nicer features :3
format = [(rustfmt.override {asNightly = true;})];
formatters = {
leptos = [leptosfmt];
leptos = [leptosfmt];
};
};
zig = {
@ -197,7 +198,7 @@ in {
rust.lsp = {
# it literally won't see the rust-analyzer provided to it
# if you don't use an envrionment variable to tell it
RUST_ANALYZER_CMD = "${upkgs.rust-analyzer}/bin/rust-analyzer";
RUST_ANALYZER_CMD = "${inputs.nixpkgs-rust.legacyPackages.${pkgs.system}.rust-analyzer}/bin/rust-analyzer";
};
elixir.lsp = {
ELIXIR_LS_CMD = "${pkgs.elixir-ls}/scripts/language_server.sh";