From 821a352c49baa80dedbb2c42f6eabc3660e79aef Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Thu, 5 Aug 2021 13:23:07 +0200 Subject: [PATCH] Annotate multiline strings with their language --- modules/fonts.nix | 2 +- modules/nix.nix | 2 +- modules/udev.nix | 2 +- users/simon/modules/misc.nix | 4 ++-- users/simon/modules/neovim/default.nix | 20 +++++++++++--------- users/simon/modules/sway/default.nix | 6 +++--- users/simon/modules/sway/mako.nix | 2 +- users/simon/modules/sway/waybar.nix | 4 ++-- users/simon/modules/tmux.nix | 2 +- users/simon/modules/vdirsyncer.nix | 6 +++--- users/simon/modules/zsh/default.nix | 2 +- 11 files changed, 27 insertions(+), 25 deletions(-) diff --git a/modules/fonts.nix b/modules/fonts.nix index 633d70b..5964e08 100644 --- a/modules/fonts.nix +++ b/modules/fonts.nix @@ -24,7 +24,7 @@ lib.mkIf config.sbruder.gui.enable { sansSerif = [ "Roboto" "Source Han Sans" ]; serif = [ "Georgia" "Source Han Serif" ]; }; - localConf = '' + localConf = /* xml */ '' diff --git a/modules/nix.nix b/modules/nix.nix index 813c4b2..27a259f 100644 --- a/modules/nix.nix +++ b/modules/nix.nix @@ -4,7 +4,7 @@ let overlaysCompat = pkgs.writeTextFile { name = "overlays-compat"; destination = "/overlays.nix"; - text = '' + text = /* nix */ '' self: super: with super.lib; let diff --git a/modules/udev.nix b/modules/udev.nix index a4b71b6..3bd0e1e 100644 --- a/modules/udev.nix +++ b/modules/udev.nix @@ -1,5 +1,5 @@ { - services.udev.extraRules = '' + services.udev.extraRules = /* udevrules */ '' # ST-Link SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748", \ MODE:="0666" diff --git a/users/simon/modules/misc.nix b/users/simon/modules/misc.nix index 7d870d4..e3cd473 100644 --- a/users/simon/modules/misc.nix +++ b/users/simon/modules/misc.nix @@ -14,7 +14,7 @@ too-many-instance-attributes ''; - ".gdbinit".text = '' + ".gdbinit".text = /* gdb */ '' # history set history save on set history filename ~/.gdb_history @@ -25,7 +25,7 @@ }; xdg.configFile = { - "pycodestyle".text = '' + "pycodestyle".text = /* ini */ '' [pycodestyle] ignore = E265 max-line-length = 120 diff --git a/users/simon/modules/neovim/default.nix b/users/simon/modules/neovim/default.nix index 70e1abf..9ed82e0 100644 --- a/users/simon/modules/neovim/default.nix +++ b/users/simon/modules/neovim/default.nix @@ -78,7 +78,7 @@ in programs.neovim = { enable = true; vimAlias = true; - extraConfig = '' + extraConfig = /* vim */ '' " Basic display set number set colorcolumn=80 @@ -182,7 +182,7 @@ in plugins = (with pkgs.vimPlugins; [ { plugin = deoplete-nvim; - config = '' + config = /* vim */ '' let g:deoplete#enable_at_startup = 1 ''; } @@ -190,7 +190,7 @@ in fzf-vim { plugin = nerdtree; - config = '' + config = /* vim */ '' map N :NERDTreeTabsToggle map n :NERDTreeFocusToggle ''; @@ -198,7 +198,7 @@ in nerdtree-git-plugin { plugin = rust-vim; - config = '' + config = /* vim */ '' let g:rustfmt_autosave_if_config_present = 1 let g:rust_fold = 1 map rt :RustTest @@ -206,11 +206,13 @@ in } { plugin = tagbar; - config = "nmap :TagbarToggle"; + config = /* vim */ '' + nmap :TagbarToggle + ''; } { plugin = ultisnips; - config = '' + config = /* vim */ '' let g:UltiSnipsSnippetDirectories = [ '${./UltiSnips}' ] let g:UltiSnipsExpandTrigger = '' let g:UltiSnipsJumpForwardTrigger = '' @@ -219,7 +221,7 @@ in } { plugin = vim-airline; - config = '' + config = /* vim */ '' let g:airline_powerline_fonts = 1 let g:airline_solarized_bg='dark' let g:airline_theme='solarized' @@ -236,7 +238,7 @@ in vim-toml { plugin = vimtex; - config = '' + config = /* vim */ '' let g:tex_flavor='latex' let g:vimtex_view_method='zathura' let g:tex_conceal='abdmg' @@ -260,7 +262,7 @@ in ] ++ (lib.optionals nixosConfig.sbruder.full [ { plugin = LanguageClient-neovim; - config = '' + config = /* vim */ '' let g:LanguageClient_serverCommands = { \ 'rust': ['${pkgs.rust-analyzer}/bin/rust-analyzer'], \ 'go': ['${pkgs.gopls}/bin/gopls'], diff --git a/users/simon/modules/sway/default.nix b/users/simon/modules/sway/default.nix index 5052688..92568b8 100644 --- a/users/simon/modules/sway/default.nix +++ b/users/simon/modules/sway/default.nix @@ -262,7 +262,7 @@ in xdg.configFile."swaynag/config".text = let # adding it to the header doesn’t work since the defaults overwrite it - commonConfig = '' + commonConfig = /* ini */ '' background=fdf6e3 border-bottom=eee8d5 border=eee8d5 @@ -270,7 +270,7 @@ in button-text=657b83 ''; in - '' + /* ini */ '' font=Monospace 12 [warning] @@ -283,7 +283,7 @@ in ''; # Start on tty1 - programs.zsh.initExtra = '' + programs.zsh.initExtra = /* sh */ '' if [[ -z $WAYLAND_DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then export XDG_SESSION_TYPE="wayland" # otherwise set to tty unset __HM_SESS_VARS_SOURCED __NIXOS_SET_ENVIRONMENT_DONE # otherwise sessionVariables are not updated diff --git a/users/simon/modules/sway/mako.nix b/users/simon/modules/sway/mako.nix index 1c88e54..08f0ecb 100644 --- a/users/simon/modules/sway/mako.nix +++ b/users/simon/modules/sway/mako.nix @@ -15,7 +15,7 @@ in defaultTimeout = 5000; - extraConfig = '' + extraConfig = /* ini */ '' [urgency=critical] text-color=#dc322f ignore-timeout=true diff --git a/users/simon/modules/sway/waybar.nix b/users/simon/modules/sway/waybar.nix index 0cd9a1d..9e265ad 100644 --- a/users/simon/modules/sway/waybar.nix +++ b/users/simon/modules/sway/waybar.nix @@ -80,7 +80,7 @@ in }; }; "custom/screencast" = { - exec = pkgs.writeScript "screencast-monitor" '' + exec = pkgs.writeScript "screencast-monitor" /* python */ '' #!${pkgs.python3}/bin/python3 import subprocess import sys @@ -226,7 +226,7 @@ in }; "custom/calendar" = { interval = 300; - exec = pkgs.writeScript "calendar" '' + exec = pkgs.writeScript "calendar" /* python */ '' #!${pkgs.python3}/bin/python3 import json import subprocess diff --git a/users/simon/modules/tmux.nix b/users/simon/modules/tmux.nix index a6b6ffc..82d9853 100644 --- a/users/simon/modules/tmux.nix +++ b/users/simon/modules/tmux.nix @@ -5,7 +5,7 @@ escapeTime = 0; aggressiveResize = true; baseIndex = 1; - extraConfig = '' + extraConfig = /* tmux */ '' # screen behaviour unbind C-b set -g prefix C-a diff --git a/users/simon/modules/vdirsyncer.nix b/users/simon/modules/vdirsyncer.nix index 5c8c59c..4d1dae8 100644 --- a/users/simon/modules/vdirsyncer.nix +++ b/users/simon/modules/vdirsyncer.nix @@ -10,7 +10,7 @@ in ]; xdg.configFile = { - "vdirsyncer/config".text = '' + "vdirsyncer/config".text = /* ini */ '' [general] status_path = "${config.xdg.configHome}/vdirsyncer/status/" @@ -49,7 +49,7 @@ in password.fetch = ["command", "sh", "-c", "pass sbruder.de/mail | head -n 1"] ''; - "khal/config".text = '' + "khal/config".text = /* toml */ '' [calendars] [[calendar_local]] @@ -68,7 +68,7 @@ in longdatetimeformat = %Y-%m-%d %H:%M ''; - "khard/khard.conf".text = '' + "khard/khard.conf".text = /* toml */ '' [addressbooks] [[personal]] path = ~/.contacts/${contactsUuid}/ diff --git a/users/simon/modules/zsh/default.nix b/users/simon/modules/zsh/default.nix index 2e74183..50bc92a 100644 --- a/users/simon/modules/zsh/default.nix +++ b/users/simon/modules/zsh/default.nix @@ -100,7 +100,7 @@ in (lib.mkBefore '' prompt off # collides with starship '') - (lib.mkAfter '' + (lib.mkAfter /* sh */ '' eval $(${pkgs.coreutils}/bin/dircolors -b ${dircolors-solarized}/dircolors.ansi-universal) # no sad smiley (starship shows exit status)