thelio76: vscode config

This commit is contained in:
Alex 2024-08-04 18:03:09 -04:00
parent 5780a111ae
commit 201721ff72
5 changed files with 62 additions and 20 deletions

View File

@ -3,13 +3,7 @@
programs.bash = {
enable = true;
bashrcExtra = ''
function nxr () {
set -u
local pkg="$1"
shift
nix-shell -p "$pkg" --run "$pkg $@"
set +u
}
${builtins.readFile ./nxr.sh}
eval "$(direnv hook bash)"
'';

25
config/apps/bash/nxr.sh Normal file
View File

@ -0,0 +1,25 @@
function nxr() {
set -u
local pkg=""
local bin=""
local count=0
# for var in "$@"
# do
# if [ "$var" == "--" ]; then
# shift "$count"
# fi
# done
local pkg="$1"
local bin="$2"
if [ -z "$bin" ]; then
bin="$pkgs"
fi
shift
nix-shell -p "$pkg" --run "$bin $@"
set +u
}

View File

@ -1,26 +1,44 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
shfmt # for shell-format extension
];
programs.vscode = {
enable = true;
mutableExtensionsDir = false;
extensions = with pkgs.vscode-extensions; [
eamodio.gitlens
jnoortheen.nix-ide
scalameta.metals
kamikillerto.vscode-colorize
esbenp.prettier-vscode
file-icons.file-icons
foxundermoon.shell-format
jnoortheen.nix-ide
kamikillerto.vscode-colorize
scalameta.metals
timonwong.shellcheck
];
userSettings = {
"security.workspace.trust.untrustedFiles" = "open";
"workbench.colorTheme" = "Default Dark Modern";
"workbench.iconTheme" = "file-icons";
"files.autoSave" = "afterDelay";
"editor.formatOnSave" = true;
"nix.formatterPath" = "nixpkgs-fmt";
"[css,html,javascript,javascriptreact,json,less,markdown,scss,sass,typescript,typescriptreact,vue,vue-html,yaml]" = {
"editor.defaultFormatter" = "esbenp.prettier-vscode";
};
"[bats,dockerfile,hosts,ignore,jvmoptions,properties,shellscript]" = {
"editor.defaultFormatter" = "foxundermoon.shell-format";
};
"colorize.languages" = [
"javascript"
"nix"
];
"editor.formatOnSave" = true;
"editor.wordWrap" = "on";
"files.autoSave" = "afterDelay";
"files.watcherExclude" = {
"**/.bloop" = true;
"**/.metals" = true;
"**/.ammonite" = true;
};
"nix.formatterPath" = "nixpkgs-fmt";
"security.workspace.trust.untrustedFiles" = "open";
"workbench.colorTheme" = "Default Dark Modern";
"workbench.iconTheme" = "file-icons";
};
};
}

View File

@ -3,6 +3,13 @@
services.sxhkd = {
enable = true;
keybindings = {
"super + space" = ''
rofi -show-icons \
-show combi -modes combi \
-combi-modes "window,drun,run" \
-monitor $(bspc query --monitors -m focused --names)
'';
"super + Return" = "kitty";
#
@ -76,8 +83,6 @@
# move a floating window
"super + {Left,Down,Up,Right}" =
" bspc node -v {-20 0,0 20,0 -20,20 0}";
"Super_L; @Super_L" = "rofi -show drun -show-icons -monitor $(bspc query --monitors -m focused --names)";
};
};
}

View File

@ -9,7 +9,7 @@
imports = [
../../modules/bspwm
../../apps/bash.nix
../../apps/bash
../../apps/firefox.nix
../../apps/git.nix
../../apps/kitty.nix