Skip to content

Commit f93d2bf

Browse files
committed
rust treesitter and clippy
Signed-off-by: Pui Yong Qing <[email protected]> rust nightly Signed-off-by: Pui Yong Qing <[email protected]> clean up Signed-off-by: Pui Yong Qing <[email protected]>
1 parent 9b33012 commit f93d2bf

File tree

6 files changed

+38
-39
lines changed

6 files changed

+38
-39
lines changed

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
url = "github:oxalica/rust-overlay";
77
inputs.nixpkgs.follows = "nixpkgs";
88
};
9+
910
yazi = {
1011
url = "github:sxyazi/yazi";
1112
inputs.nixpkgs.follows = "nixpkgs";
@@ -140,18 +141,6 @@
140141
username
141142
host
142143
flake_dir
143-
mysecrets
144-
agenix
145-
nh
146-
hyprland
147-
swww
148-
chaotic
149-
nur
150-
lix
151-
lix-module
152-
yazi
153-
nix-index-database
154-
rust-overlay
155144
;
156145
profile = "amd";
157146
firmware = import inputs.mt7921e-firmware {

modules/core/packages.nix

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,15 @@
105105
pkg-config # Wrapper Script For Allowing Packages To Get Info On Others
106106
playerctl # Allows Changing Media Volume Through Scripts
107107
ripgrep # Improved Grep
108-
(rust-bin.stable.latest.default.override {
109-
extensions = [
110-
"rust-analyzer"
111-
"rust-src"
112-
];
113-
})
108+
(rust-bin.selectLatestNightlyWith (
109+
toolchain:
110+
toolchain.default.override {
111+
extensions = [
112+
"rust-analyzer"
113+
"rust-src"
114+
];
115+
}
116+
))
114117
socat # Needed For Screenshots
115118
sox # audio support for FFMPEG
116119
inputs.swww.packages.${pkgs.system}.swww

modules/home/nvf.nix

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -199,21 +199,30 @@
199199
typst.enable = true;
200200
rust = {
201201
enable = true;
202+
treesitter.enable = true;
202203
lsp = {
203204
enable = true;
204-
package = pkgs.rust-bin.stable.latest.default.override {
205-
extensions = [
206-
"rust-analyzer"
207-
"rust-src"
208-
];
209-
};
205+
package = pkgs.rust-bin.selectLatestNightlyWith (
206+
toolchain:
207+
toolchain.default.override {
208+
extensions = [
209+
"rust-analyzer"
210+
"rust-src"
211+
];
212+
}
213+
);
210214
opts = ''
211215
['rust-analyzer'] = {
212-
cargo = {allFeature = true},
213-
checkOnSave = true,
214-
procMacro = {
215-
enable = true,
216-
},
216+
cargo = {allFeature = true},
217+
checkOnSave = true,
218+
check = {
219+
enable = true,
220+
command = 'clippy',
221+
features = 'all',
222+
},
223+
procMacro = {
224+
enable = true,
225+
},
217226
},
218227
'';
219228
};

modules/home/vscode.nix

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{ pkgs, ... }:
22
{
3-
nixpkgs.config.allowUnfree = true;
4-
53
programs.vscode = {
64
enable = false;
75
profiles = {

overlay/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ firmware, rust-overlay, ... }:
1+
{ firmware, inputs, ... }:
22
{
33
nixpkgs.overlays = [
44
(_final: prev: {
@@ -54,6 +54,6 @@
5454
Posible upstream related commit: https://gitlab.com/kernel-firmware/linux-firmware/-/commit/4573c02ca0caf001c5ce5dbb62015d588258588b
5555
*/
5656
})
57-
rust-overlay.overlays.default
57+
inputs.rust-overlay.overlays.default
5858
];
5959
}

0 commit comments

Comments
 (0)