home,vscode: cleanup

This commit is contained in:
Guanran Wang 2023-11-17 20:00:28 +08:00
parent cb4dc0815d
commit 164edd02cc
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8
2 changed files with 38 additions and 34 deletions

View file

@ -15,44 +15,42 @@
when = "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion"; when = "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion";
} }
{ {
"key" = "shift+tab"; key = "shift+tab";
"command" = "selectPrevSuggestion"; command = "selectPrevSuggestion";
"when" = "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion"; when = "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion";
} }
]; ];
userSettings = { userSettings = {
"diffEditor.ignoreTrimWhitespace" = false; diffEditor.ignoreTrimWhitespace = false;
"editor.cursorBlinking" = "smooth"; editor.cursorBlinking = "smooth";
"editor.cursorSmoothCaretAnimation" = "on"; editor.cursorSmoothCaretAnimation = "on";
"editor.fontFamily" = lib.mkDefault "Monospace"; editor.fontFamily = lib.mkDefault "Monospace";
"editor.fontWeight" = 600; editor.fontWeight = 600;
"editor.tabSize" = 2; editor.tabSizem = 2;
"explorer.confirmDragAndDrop" = false; explorer.confirmDragAndDrop = false;
"explorer.confirmDelete" = false; explorer.confirmDelete = false;
"files.autoSave" = "onFocusChange"; files.autoSave = "onFocusChange";
"files.trimTrailingWhitespace" = true; files.trimTrailingWhitespace = true;
"files.trimFinalNewlines" = true; files.trimFinalNewlines = true;
"security.workspace.trust.enabled" = false; security.workspace.trust.enabled = false;
"telemetry.telemetryLevel" = "off"; telemetry.telemetryLevel = "off";
"terminal.external.osxExec" = "Alacritty.app"; terminal.external.osxExec = "Alacritty.app";
"terminal.integrated.cursorBlinking" = true; terminal.integrated.cursorBlinking = true;
"update.mode" = "none"; update.mode = "none";
"window.menuBarVisibility" = "toggle"; window.menuBarVisibility = "toggle";
"workbench.colorTheme" = "Tokyo Night"; workbench.colorTheme = "Tokyo Night";
"window.titleBarStyle" = "custom"; # workaround window.titleBarStyle = "custom"; # workaround
# Language specific
### Nix
"[nix]".editor.tabSize = 2;
# Extensions # Extensions
### GitLens ### GitLens
"gitlens.telemetry.enabled" = false; gitlens.telemetry.enabled = false;
}; };
extensions = with pkgs.vscode-extensions; [ extensions = with pkgs.vscode-extensions; [
### LSP
#ms-python.python
rust-lang.rust-analyzer
tamasfe.even-better-toml
#bungcip.better-toml
### QoL ### QoL
eamodio.gitlens eamodio.gitlens
esbenp.prettier-vscode esbenp.prettier-vscode

View file

@ -1,15 +1,21 @@
{pkgs, ...}: { {pkgs, ...}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
### LSP nil # LSP
nil alejandra # Formatter
]; ];
### VSCode ### VSCode
programs.vscode = { programs.vscode = {
userSettings = { userSettings = {
### Nix IDE # Extensions
"nix.enableLanguageServer" = true; ## Nix IDE
"nix.serverPath" = "${pkgs.nil}/bin/nil"; nix.enableLanguageServer = true;
### For "nixd" LSP
nix.serverPath = "nil";
nix.serverSettings.nil = {
formatting.command = ["alejandra"];
nix.flake.autoArchive = true;
};
}; };
extensions = with pkgs.vscode-extensions; [ extensions = with pkgs.vscode-extensions; [
jnoortheen.nix-ide jnoortheen.nix-ide