-
I installed helix with [[language]]
name = "rust"
[language.config]
checkOnSave = { command = "clippy" } But nothing happens.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Can you explain what you are trying to do? You should be able to open a rust project like the helix codebase and use rust-analyzer features like going to definitions or references and seeing diagnostics. You can also check the log file to see if there are any errors from opening a rust file https://github.com/helix-editor/helix/wiki/FAQ#access-the-log-file |
Beta Was this translation helpful? Give feedback.
-
It looks like this solves the problem: (rustChannel.rust.override { extensions = ["rust-src" "rust-analysis"]; }) Here is a full example of a let
moz_overlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz);
pkgs = import <nixpkgs> { overlays = [ moz_overlay ]; };
rustChannel = pkgs.rustChannelOf {
channel = "stable";
};
rust = (rustChannel.rust.override {
targets = [
"wasm32-unknown-unknown" # required for the web-app
];
extensions = ["rust-src" "rust-analysis"];
});
# required for the desktop app
runtime_deps = with pkgs; [
libGL
] ++ (with pkgs.xorg; [
libX11
libXcursor
libXrandr
libXi
]);
in
with pkgs;
mkShell {
buildInputs = [
rust
pkgconfig
# required for the web-app
sassc
# required for the desktop
freetype
expat
fontconfig
];
LD_LIBRARY_PATH = "${lib.makeLibraryPath runtime_deps}";
} |
Beta Was this translation helpful? Give feedback.
It looks like this solves the problem:
Here is a full example of a
shell.nix
: