infrastructure/nixos/common/hm-modules/vscode.nix

80 lines
2.6 KiB
Nix
Raw Normal View History

2023-04-25 10:04:50 +02:00
{ config, pkgs, lib, ... }:
with lib;
let cfg = config.programs.v.vscode;
in {
options.programs.v.vscode = { enable = mkEnableOption "vscode"; };
config = mkIf cfg.enable {
programs.vscode = {
enable = true;
package = pkgs.vscode;
userSettings = {
"ltex.language" = "en-GB";
"latex-workshop.linting.chktex.enabled" = true;
"latex-workshop.latex.clean.subfolder.enabled" = true;
"latex-workshop.latex.outDir" = "%TMPDIR%/%RELATIVE_DOC%";
"editor.fontFamily" =
"'DejaVuSansMono Nerd Font', 'monospace', monospace";
"keyboard.dispatch" = "keyCode";
"rust-analyzer.server.path" = "${pkgs.rust-analyzer}/bin/rust-analyzer";
2023-12-20 14:01:11 +01:00
"rust-analyzer.check.extraArgs" = ["--profile" "rust-analyzer"];
"rust-analyzer.check.command" = "clippy";
2023-04-25 10:04:50 +02:00
"terminal.integrated.defaultProfile.linux" = "zsh";
"nix.enableLanguageServer" = true; # Enable LSP.
"nix.serverPath" = "${pkgs.nil}/bin/nil";
"[nix]" = { "editor.defaultFormatter" = "brettm12345.nixfmt-vscode"; };
2023-05-02 10:05:49 +02:00
"[python]" = { "editor.formatOnType" = true; };
2023-04-25 10:04:50 +02:00
"debug.allowBreakpointsEverywhere" = true;
2023-12-20 14:01:11 +01:00
"C_Cpp.clang_format_fallbackStyle" =
"{ BasedOnStyle: Google, IndentWidth: 4, ColumnLimit: 0}";
"crates.compatibleDecorator" = "";
2023-12-04 11:03:32 +01:00
"crates.errorDecorator" = "";
"crates.incompatibleDecorator" = "🛇";
2023-04-25 10:04:50 +02:00
# Don't index unecessary things
"files.exclude" = {
"**/.vscode" = true;
"**/.git" = true;
"**/.svn" = true;
"**/.hg" = true;
"**/.deps" = true;
"**/CVS" = true;
"**/.DS_Store" = true;
"/bin" = true;
"/boot" = true;
"/cdrom" = true;
"/dev" = true;
"/proc" = true;
"/etc" = true;
"/nix" = true;
};
};
extensions = with pkgs.vscode-extensions;
with pkgs.v.vscode-extensions; [
brettm12345.nixfmt-vscode
codezombiech.gitignore
editorconfig.editorconfig
foxundermoon.shell-format
james-yu.latex-workshop
jnoortheen.nix-ide
matklad.rust-analyzer
mkhl.direnv
ms-vscode-remote.remote-ssh
ms-vscode.cpptools
platformio.platformio-ide
redhat.vscode-yaml
2023-11-22 11:38:37 +01:00
redhat.vscode-xml
2023-04-25 10:04:50 +02:00
tamasfe.even-better-toml
valentjn.vscode-ltex
vscodevim.vim
vadimcn.vscode-lldb
xaver.clang-format
sumneko.lua
2023-11-22 11:38:37 +01:00
davidlday.languagetool-linter
2023-12-04 11:03:32 +01:00
serayuzgur.crates
2023-12-24 10:52:36 +01:00
skellock.just
2023-04-25 10:04:50 +02:00
];
};
};
}