mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-21 19:25:13 +02:00
nvim-lsp: Add settings for rust-analyzer (#113)
* nvim-lsp: Add settings for rust-analyzer Because the settings are quite complex they are auto-generated. This commit adds the script creating it & the generated options. * Update flake.nix Co-authored-by: Pedro Alves <pta2002@users.noreply.github.com>
This commit is contained in:
parent
5b84bbb513
commit
2f2f724f6a
5 changed files with 1846 additions and 2 deletions
43
flake.nix
43
flake.nix
|
@ -35,10 +35,49 @@
|
|||
(system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
extractRustAnalyzer = { stdenv, pkgs }: stdenv.mkDerivation {
|
||||
pname = "extract_rust_analyzer";
|
||||
version = "master";
|
||||
|
||||
dontUnpack = true;
|
||||
dontBuild = true;
|
||||
|
||||
buildInputs = [ pkgs.python3 ];
|
||||
|
||||
installPhase = ''
|
||||
ls -la
|
||||
mkdir -p $out/bin
|
||||
cp ${./helpers/extract_rust_analyzer.py} $out/bin/extract_rust_analyzer.py
|
||||
'';
|
||||
};
|
||||
extractRustAnalyzerPkg = pkgs.callPackage extractRustAnalyzer { };
|
||||
in
|
||||
{
|
||||
packages.docs = pkgs.callPackage (import ./docs.nix) {
|
||||
modules = nixvimModules;
|
||||
packages = {
|
||||
docs = pkgs.callPackage (import ./docs.nix) {
|
||||
modules = nixvimModules;
|
||||
};
|
||||
runUpdates = pkgs.callPackage
|
||||
({ pkgs, stdenv }: stdenv.mkDerivation {
|
||||
pname = "run-updates";
|
||||
version = pkgs.rust-analyzer.version;
|
||||
|
||||
src = pkgs.rust-analyzer.src;
|
||||
|
||||
nativeBuildInputs = with pkgs; [extractRustAnalyzerPkg alejandra nixpkgs-fmt];
|
||||
|
||||
buildPhase = ''
|
||||
extract_rust_analyzer.py editors/code/package.json |
|
||||
alejandra --quiet |
|
||||
nixpkgs-fmt > rust-analyzer-config.nix
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share
|
||||
cp rust-analyzer-config.nix $out/share
|
||||
'';
|
||||
})
|
||||
{ };
|
||||
};
|
||||
legacyPackages = rec {
|
||||
makeNixvimWithModule = import ./wrappers/standalone.nix pkgs modules;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue