-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add flake, precommit, editorconfig and etc
- Loading branch information
Showing
10 changed files
with
243 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.{json,yaml,yml}] | ||
indent_size = 2 | ||
|
||
[Makefile] | ||
indent_style = tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use flake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
hooks: | ||
- id: check-merge-conflict | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
- id: trailing-whitespace | ||
|
||
- repo: local | ||
hooks: | ||
- id: rustfmt | ||
name: rustfmt | ||
language: system | ||
types_or: [rust] | ||
entry: rustfmt | ||
|
||
- repo: local | ||
hooks: | ||
- id: toml | ||
name: toml | ||
language: system | ||
types_or: [rust] | ||
entry: taplo format | ||
|
||
- repo: local | ||
hooks: | ||
- id: clang-format | ||
name: clang-format | ||
language: system | ||
types_or: [c, c++, cuda] | ||
entry: clang-format -i --style=file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[formatting] | ||
align_entries = true | ||
inline_table_expand = true | ||
array_auto_collapse = false | ||
array_auto_expand = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,19 @@ | ||
[package] | ||
name = "nix_vscode" | ||
name = "nix4vscode" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
serde = { version = "1.0.188", features = ["derive", "alloc", "rc"] } | ||
serde_json = "1.0.105" | ||
toml = "0.7.6" | ||
tokio = { version = "1.32.0", features = ["full"] } | ||
log = "0.4.20" | ||
tracing = "0.1.37" | ||
serde = { version = "1.0.188", features = ["derive", "alloc", "rc"] } | ||
serde_json = "1.0.105" | ||
toml = "0.7.6" | ||
tokio = { version = "1.32.0", features = ["full"] } | ||
log = "0.4.20" | ||
tracing = "0.1.37" | ||
tracing-subscriber = { version = "0.3.17", features = ["env-filter", "std"] } | ||
semver = "1.0.18" | ||
bitflags = { version = "2.4.0", features = ["serde", "std"] } | ||
reqwest = { version = "0.11.20", default_features = false, features = [ | ||
"rustls-tls", | ||
"gzip", | ||
] } | ||
minijinja = "1.0.7" | ||
clap = { version = "4.4.2", features = ["derive"] } | ||
futures = "0.3.28" | ||
semver = "1.0.18" | ||
bitflags = { version = "2.4.0", features = ["serde", "std"] } | ||
reqwest = { version = "0.11.20", default_features = false, features = ["rustls-tls", "gzip"] } | ||
minijinja = "1.0.7" | ||
clap = { version = "4.4.2", features = ["derive"] } | ||
futures = "0.3.28" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
description = "Develop environment for nix4vscode"; | ||
inputs = { | ||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; | ||
flake-utils = { | ||
url = "github:numtide/flake-utils"; | ||
}; | ||
rust-overlay = { | ||
url = "github:oxalica/rust-overlay"; | ||
inputs.nixpkgs.follows = "nixpkgs"; | ||
}; | ||
}; | ||
outputs = { self, nixpkgs, flake-utils, rust-overlay }: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
pkgs = import nixpkgs { | ||
inherit system; | ||
config.allowUnfree = true; | ||
overlays = [ | ||
(import rust-overlay) | ||
]; | ||
}; | ||
|
||
in | ||
{ | ||
devShell = pkgs.mkShell { | ||
buildInputs = [ | ||
pkgs.iconv | ||
pkgs.taplo | ||
( | ||
pkgs.rust-bin.nightly."2023-07-28".default | ||
) | ||
]; | ||
shellHook = '' | ||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${pkgs.iconv.out}/lib | ||
''; | ||
}; | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
edition = "2021" | ||
hard_tabs = false | ||
force_explicit_abi = true | ||
max_width = 100 | ||
merge_derives = true | ||
newline_style = "Auto" | ||
remove_nested_parens = true | ||
reorder_imports = true | ||
reorder_modules = true | ||
tab_spaces = 4 | ||
use_field_init_shorthand = true | ||
use_small_heuristics = "Default" | ||
use_try_shorthand = false | ||
format_code_in_doc_comments = true | ||
imports_granularity = "Crate" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// empty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters