Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 44 additions & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,15 +1,53 @@
# EditorConfig: https://EditorConfig.org
# EditorConfig configuration for this repository -- https://EditorConfig.org

# Top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file, utf-8 charset
[*]
indent_style = tab
tab_width = 8
charset = utf-8
insert_final_newline = true
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8

# Ignore diffs/patches
[*.{diff,patch}]
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset

[*.sh]
# Prefer space-indent for..
[*.{json,lock,md,pl,pm,py,rb,xml}]
indent_style = space

# Prefer tab-indent for..
[*.{nix,sh,bash}]
indent_style = tab

[*.{json,lock,md,nix,rb,sh}]
indent_size = 2

[*.lock]
indent_size = unset

[*.md]
trim_trailing_whitespace = true

# binaries
[*.nib]
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
charset = unset

[eggs.nix]
trim_trailing_whitespace = unset

# You can add file-specific configuration using:
#
# [path/to/file]
# end_of_line = unset
# indent_style = unset
# insert_final_newline = unset
# trim_trailing_whitespace = unset
# other config..
6 changes: 6 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh
# shellcheck shell=sh # POSIX

# This file is used to provide directory-oriented environment variables and integrations

use flake
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ tarballs/
*~
*.kate-swp
*.kdev4

# Direnv
.direnv/
19 changes: 19 additions & 0 deletions .shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
shell=sh # Enforce POSIX sh

# name: avoid-nullary-conditions
# desc: Suggest explicitly using -n in `[ $var ]`
# example: [ "$var" ]
# fix: [ -n "$var" ]
enable=avoid-nullary-conditions

# name: check-extra-masked-returns
# desc: Check for additional cases where exit codes are masked
# example: rm -r "$(get_chroot_dir)/home"
# fix: set -e; dir="$(get_chroot_dir)"; rm -r "$dir/home"
enable=check-extra-masked-returns

# name: check-set-e-suppressed
# desc: Notify when set -e is suppressed during function invocation
# example: set -e; func() { cp *.txt ~/backup; rm *.txt; }; func && echo ok
# fix: set -e; func() { cp *.txt ~/backup; rm *.txt; }; func; echo ok
enable=check-set-e-suppressed
134 changes: 134 additions & 0 deletions default.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
{
"folders": [
{ "path": "." },
{ "path": "vendor/impermanence" },
],

"settings": {
// Enable liguratures
"editor.fontLigatures": true,
"editor.fontFamily": "'Fira Code'",
"terminal.integrated.fontFamily": "'Fira Code'",

// FIXME(Krey): This should automatically use javacsript, fix this upstream
"files.associations": {
"*.es": "javascript"
},

"editor.renderWhitespace": "all",
"terminal.integrated.scrollback": 20000,
"nix.enableLanguageServer": true,
"nix.serverPath": "nil",
"nix.serverSettings": {
// settings for 'nil' Language Server
"nil": {
"formatting": {
"command": ["nixpkgs-fmt"]
}
}
},
"bracket-pair-colorizer-2.excludedLanguages": [
"nix" // Does weird and confusing coloring, seems not compatible
],
"editor.wordWrap": "on", // Enforce word-wrapped coding style
"terminal.integrated.defaultProfile.linux": "bash", // Use bash by default
"terminal.integrated.env.linux": {
"EDITOR": "nano", // To open git things in codium
},

// Gtt
"git.autofetch": true,

// Code-eol
"code-eol.highlightExtraWhitespace": true,
"code-eol.newlineCharacter": "↵",
"code-eol.crlfCharacter": "↓",

// Task tree
"todo-tree.general.tags": [
"FIXME",
"TODO",
"DOCS",
"HACK",
"REVIEW",
"DNM", // Do Not Merge
"DNC", // Do Not Contribute
"DNR" // Do Not Release
],
// NOTE: Icons has to be valid octicon (https://primer.style/foundations/icons/)
"todo-tree.highlights.customHighlight": {
// FIXME(Krey): Test
"FIXME": {
"foreground": "#ff8000",
"icon": "tag",
"fontWeight": "bold"
},
// TODO(Krey): Test
"TODO": {
"foreground": "#00ffea",
"icon": "tasklist",
"fontWeight": "bold"
},
// DOCS(Krey): Test
"DOCS": {
"foreground": "#ffffff",
"background": "#2f00ff",
"icon": "repo",
"fontWeight": "bold"
},
// HACK(Krey): Test
"HACK": {
"foreground": "#ffffff",
"background": "#ff4d00",
"icon": "repo",
"fontWeight": "bold"
},
// REVIEW(Krey): Test
"REVIEW": {
"foreground": "#ffffff",
"background": "#b300ff",
"icon": "code-review",
"fontWeight": "bold"
},
// DNM(Krey): Test
"DNM": {
"background": "#ff0000",
"foreground": "#ffffff",
"icon": "shield-x",
"fontWeight": "bold"
},
// DNR(Krey): Test
"DNR": {
"background": "#ff0000",
"foreground": "#ffffff",
"icon": "shield-x",
"fontWeight": "bold"
},
// DNC(Krey): Test
"DNC": {
"background": "#fffb00",
"foreground": "#000000",
"icon": "shield-x",
"fontWeight": "bold"
}
},
"todo-tree.regex.regex": "($TAGS)((\\-.*|)\\(.*\\)):", // ($TAGS)((\\-.*|)\\(.*\\)):
},

"extensions": {
"recommendations": [
"jnoortheen.nix-ide",
"oderwat.indent-rainbow",
"arrterian.nix-env-selector",
"medo64.render-crlf",
"aaron-bond.better-comments",
"mkhl.direnv",
"coenraads.bracket-pair-colorizer-2",
"editorconfig.editorconfig",
"pkief.material-icon-theme",
"markwylde.vscode-filesize",
"plorefice.devicetree",
"timonwong.shellcheck"
]
}
}
Loading