From 1619c737a9521c53e04f9a978566fccab60d9ff7 Mon Sep 17 00:00:00 2001 From: janabhumi Date: Wed, 31 Aug 2022 11:57:34 +0300 Subject: [PATCH] home/nvim: add more configs for coc-rust-analyzer --- home/home.nix | 4 ++-- home/progs/nvim/coc_settings.nix | 5 +++++ home/progs/nvim/default.nix | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/home/home.nix b/home/home.nix index 48736bd..64fe90b 100644 --- a/home/home.nix +++ b/home/home.nix @@ -31,8 +31,8 @@ in fd # a simple, fast and user-friendly alternative to find bat # a cat clone with syntax highlighting and git integration - # formatters - nixpkgs-fmt # for nix + # nix + nixpkgs-fmt # browser librewolf # a fork of firefox, focused on privacy, security and freedom diff --git a/home/progs/nvim/coc_settings.nix b/home/progs/nvim/coc_settings.nix index 1bcfc4b..ef43ff9 100644 --- a/home/progs/nvim/coc_settings.nix +++ b/home/progs/nvim/coc_settings.nix @@ -15,5 +15,10 @@ }; # Rust + "rust-analyzer.server.path" = "rust-analyzer"; + "rust-analyzer.updates.prompt" = false; + "rust-analyzer.updates.checkOnStartup" = false; + "rust-analyzer.checkOnSave.enable" = true; "rust-analyzer.checkOnSave.command" = "clippy"; + "rust-analyzer.cargo.autoreload" = true; } diff --git a/home/progs/nvim/default.nix b/home/progs/nvim/default.nix index da521ae..27128c9 100644 --- a/home/progs/nvim/default.nix +++ b/home/progs/nvim/default.nix @@ -38,6 +38,7 @@ let additionalPackages = lspPackages ++ fzfToolsPackages; vimConfig = builtins.readFile ./config.vim; + cocConfig = import ./coc_settings.nix; in { options.progs.nvim = { @@ -65,7 +66,7 @@ in vimAlias = true; coc = { enable = true; - settings = import ./coc_settings.nix; + settings = cocConfig; }; };