Rust: Difference between revisions
imported>Jtojnar m do not use pkgconfig alias |
imported>Michcioperz Fix neovim completion (relevant dirs were moved out of src since 2017) |
||
Line 1: | Line 1: | ||
This article is about the [rust programming language](https://www.rust-lang.org). | |||
This article is about the [https://www.rust-lang.org | |||
== Rust Nightlies == | == Rust Nightlies == | ||
Either use [https://nixos.org/nixpkgs/manual/#using-the-rust-nightlies-overlay | Either use [rust overlay](https://nixos.org/nixpkgs/manual/#using-the-rust-nightlies-overlay) or rustup to get install rust nightlies. | ||
== Neovim Completion == | == Neovim Completion == | ||
Line 22: | Line 20: | ||
inherit (rustc.src) name; | inherit (rustc.src) name; | ||
phases = ["unpackPhase" "installPhase"]; | phases = ["unpackPhase" "installPhase"]; | ||
installPhase = | installPhase = ''cp -r library $out''; | ||
}}' | }}' | ||
''; | ''; | ||
Line 32: | Line 30: | ||
}) | }) | ||
</syntaxHighlight> | </syntaxHighlight> | ||
Revision as of 10:59, 23 January 2021
This article is about the [rust programming language](https://www.rust-lang.org).
Rust Nightlies
Either use [rust overlay](https://nixos.org/nixpkgs/manual/#using-the-rust-nightlies-overlay) or rustup to get install rust nightlies.
Neovim Completion
Racer completion can be configured using the following snippet:
(neovim.override {
configure = {
customRC = ''
if filereadable($HOME . "/.vimrc")
source ~/.vimrc
endif
let $RUST_SRC_PATH = '${stdenv.mkDerivation {
inherit (rustc) src;
inherit (rustc.src) name;
phases = ["unpackPhase" "installPhase"];
installPhase = ''cp -r library $out'';
}}'
'';
packages.nixbundle.start = with vimPlugins; [
nvim-completion-manager
nvim-cm-racer
];
};
})