Configuration for my NixOS based systems and Home Manager
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

initial commit

Noah Pederson 9abf9fd7

+1665
+2
.gitignore
··· 1 + hardware-configuration.nix 2 + noah-password
+197
aerc/aerc.conf
··· 1 + # 2 + # aerc main configuration 3 + 4 + [ui] 5 + index-columns = date<*,name<17,flags>4,subject<* 6 + column-date = {{.DateAutoFormat .Date.Local}} 7 + column-name = {{index (.From | names) 0}} 8 + column-flags = {{.Flags | join ""}} 9 + column-subject = {{.ThreadPrefix}}{{.Subject}} 10 + 11 + # 12 + # See time.Time#Format at https://godoc.org/time#Time.Format 13 + # 14 + # Default: 2006-01-02 03:04 PM (ISO 8601 + 12 hour time) 15 + timestamp-format=2006-01-02 03:04 PM 16 + 17 + # 18 + # Width of the sidebar, including the border. 19 + # 20 + # Default: 20 21 + sidebar-width=20 22 + 23 + # 24 + # Message to display when viewing an empty folder. 25 + # 26 + # Default: (no messages) 27 + empty-message=(no messages) 28 + 29 + # Message to display when no folders exists or are all filtered 30 + # 31 + # Default: (no folders) 32 + empty-dirlist=(no folders) 33 + 34 + # Enable mouse events in the ui, e.g. clicking and scrolling with the mousewheel 35 + # 36 + # Default: false 37 + mouse-enabled=false 38 + 39 + # 40 + # Ring the bell when new messages are received 41 + # 42 + # Default: true 43 + new-message-bell=true 44 + 45 + # Marker to show before a pinned tab's name. 46 + # 47 + # Default: ` 48 + pinned-tab-marker='`' 49 + 50 + dirlist-left = {{.Folder}} 51 + dirlist-right = {{if .Unread}}{{humanReadable .Unread}}/{{end}}{{if .Exists}}{{humanReadable .Exists}}{{end}} 52 + 53 + # List of space-separated criteria to sort the messages by, see *sort* 54 + # command in *aerc*(1) for reference. Prefixing a criterion with "-r " 55 + # reverses that criterion. 56 + # 57 + # Example: "from -r date" 58 + # 59 + # Default: "" 60 + sort=from -r date 61 + 62 + # Moves to next message when the current message is deleted 63 + # 64 + # Default: true 65 + next-message-on-delete=true 66 + 67 + # The directories where the stylesets are stored. It takes a colon-separated 68 + # list of directories. 69 + # 70 + # default: /usr/local/share/aerc/stylesets/ 71 + stylesets-dirs=/usr/local/share/aerc/stylesets/ 72 + 73 + # Sets the styleset to use for the aerc ui elements. 74 + # 75 + # Default: default 76 + styleset-name=default 77 + 78 + [viewer] 79 + # 80 + # Specifies the pager to use when displaying emails. Note that some filters 81 + # may add ANSI codes to add color to rendered emails, so you may want to use a 82 + # pager which supports ANSI codes. 83 + # 84 + # Default: less -R 85 + pager=less -R 86 + 87 + # 88 + # If an email offers several versions (multipart), you can configure which 89 + # mimetype to prefer. For example, this can be used to prefer plaintext over 90 + # html emails. 91 + # 92 + # Default: text/plain,text/html 93 + alternatives=text/plain,text/html 94 + 95 + # 96 + # Default setting to determine whether to show full headers or only parsed 97 + # ones in message viewer. 98 + # 99 + # Default: false 100 + show-headers=false 101 + 102 + # 103 + # Layout of headers when viewing a message. To display multiple headers in the 104 + # same row, separate them with a pipe, e.g. "From|To". Rows will be hidden if 105 + # none of their specified headers are present in the message. 106 + # 107 + # Default: From|To,Cc|Bcc,Date,Subject 108 + header-layout=From|To,Cc|Bcc,Date,Subject 109 + 110 + # Whether to always show the mimetype of an email, even when it is just a single part 111 + # 112 + # Default: false 113 + always-show-mime=false 114 + 115 + # How long to wait after the last input before auto-completion is triggered. 116 + # 117 + # Default: 250ms 118 + completion-delay=250ms 119 + 120 + # 121 + # Global switch for completion popovers 122 + # 123 + # Default: true 124 + completion-popovers=true 125 + 126 + [compose] 127 + # 128 + # Specifies the command to run the editor with. It will be shown in an embedded 129 + # terminal, though it may also launch a graphical window if the environment 130 + # supports it. Defaults to $EDITOR, or vi. 131 + editor= 132 + 133 + # 134 + # Default header fields to display when composing a message. To display 135 + # multiple headers in the same row, separate them with a pipe, e.g. "To|From". 136 + # 137 + # Default: To|From,Subject 138 + header-layout=To|From,Subject 139 + 140 + # 141 + # Specifies the command to be used to tab-complete email addresses. Any 142 + # occurrence of "%s" in the address-book-cmd will be replaced with what the 143 + # user has typed so far. 144 + # 145 + # The command must output the completions to standard output, one completion 146 + # per line. Each line must be tab-delimited, with an email address occurring as 147 + # the first field. Only the email address field is required. The second field, 148 + # if present, will be treated as the contact name. Additional fields are 149 + # ignored. 150 + address-book-cmd= 151 + 152 + [filters] 153 + # 154 + # Filters allow you to pipe an email body through a shell command to render 155 + # certain emails differently, e.g. highlighting them with ANSI escape codes. 156 + # 157 + # The first filter which matches the email's mimetype will be used, so order 158 + # them from most to least specific. 159 + # 160 + # You can also match on non-mimetypes, by prefixing with the header to match 161 + # against (non-case-sensitive) and a comma, e.g. subject,text will match a 162 + # subject which contains "text". Use header,~regex to match against a regex. 163 + subject,~^\[PATCH=awk -f /usr/lib/aerc/filters/hldiff 164 + #text/html=/usr/local/share/aerc/filters/html 165 + text/*=awk -f /usr/lib/aerc/filters/plaintext 166 + #image/*=catimg -w $(tput cols) - 167 + 168 + [triggers] 169 + # 170 + # Triggers specify commands to execute when certain events occur. 171 + # 172 + # Example: 173 + # new-email=exec notify-send "New email from %n" "%s" 174 + 175 + # 176 + # Executed when a new email arrives in the selected folder 177 + new-email= 178 + 179 + [templates] 180 + # Templates are used to populate email bodies automatically. 181 + # 182 + 183 + # The directories where the templates are stored. It takes a colon-separated 184 + # list of directories. 185 + # 186 + # default: /usr/local/share/aerc/templates/ 187 + template-dirs=/usr/local/share/aerc/templates/ 188 + 189 + # The template to be used for quoted replies. 190 + # 191 + # default: quoted_reply 192 + quoted-reply=quoted_reply 193 + 194 + # The template to be used for forward as body. 195 + # 196 + # default: forward_as_body 197 + forwards=forward_as_body
+101
aerc/binds.conf
··· 1 + # Binds are of the form <key sequence> = <command to run> 2 + # To use '=' in a key sequence, substitute it with "Eq": "<Ctrl+Eq>" 3 + # If you wish to bind #, you can wrap the key sequence in quotes: "#" = quit 4 + <C-p> = :prev-tab<Enter> 5 + <C-n> = :next-tab<Enter> 6 + <C-t> = :term<Enter> 7 + 8 + [messages] 9 + q = :quit<Enter> 10 + 11 + j = :next<Enter> 12 + <Down> = :next<Enter> 13 + <C-d> = :next 50%<Enter> 14 + <C-f> = :next 100%<Enter> 15 + <PgDn> = :next -s 100%<Enter> 16 + 17 + k = :prev<Enter> 18 + <Up> = :prev<Enter> 19 + <C-u> = :prev 50%<Enter> 20 + <C-b> = :prev 100%<Enter> 21 + <PgUp> = :prev -s 100%<Enter> 22 + g = :select 0<Enter> 23 + G = :select -1<Enter> 24 + 25 + J = :next-folder<Enter> 26 + K = :prev-folder<Enter> 27 + 28 + <Enter> = :view<Enter> 29 + d = :confirm 'Really delete this message?' ':delete-message<Enter>'<Enter> 30 + #D = :delete<Enter> 31 + D = :move Trash <Enter> 32 + A = :archive flat<Enter> 33 + 34 + C = :compose<Enter> 35 + 36 + rr = :reply -a<Enter> 37 + rq = :reply -aq<Enter> 38 + Rr = :reply<Enter> 39 + Rq = :reply -q<Enter> 40 + 41 + Rd = :read<Enter> 42 + 43 + c = :cf<space> 44 + $ = :term<space> 45 + ! = :term<space> 46 + | = :pipe<space> 47 + 48 + / = :search<space> 49 + n = :next-result<Enter> 50 + N = :prev-result<Enter> 51 + 52 + [view] 53 + q = :close<Enter> 54 + | = :pipe<space> 55 + D = :move Trash <Enter> 56 + S = :save<space> 57 + A = :archive flat<Enter> 58 + 59 + f = :forward<Enter> 60 + rr = :reply -a<Enter> 61 + rq = :reply -aq<Enter> 62 + Rr = :reply<Enter> 63 + Rq = :reply -q<Enter> 64 + 65 + H = :toggle-headers<Enter> 66 + <C-k> = :prev-part<Enter> 67 + <C-j> = :next-part<Enter> 68 + J = :next<Enter> 69 + K = :prev<Enter> 70 + 71 + [compose] 72 + # Keybindings used when the embedded terminal is not selected in the compose 73 + # view 74 + $ex = <C-x> 75 + <C-k> = :prev-field<Enter> 76 + <C-j> = :next-field<Enter> 77 + <tab> = :next-field<Enter> 78 + 79 + [compose::editor] 80 + # Keybindings used when the embedded terminal is selected in the compose view 81 + $noinherit = true 82 + $ex = <C-x> 83 + <C-k> = :prev-field<Enter> 84 + <C-j> = :next-field<Enter> 85 + <C-p> = :prev-tab<Enter> 86 + <C-n> = :next-tab<Enter> 87 + 88 + [compose::review] 89 + # Keybindings used when reviewing a message to be sent 90 + y = :send<Enter> 91 + n = :abort<Enter> 92 + q = :abort<Enter> 93 + e = :edit<Enter> 94 + a = :attach<Enter> 95 + 96 + [terminal] 97 + $noinherit = true 98 + $ex = <C-x> 99 + 100 + <C-p> = :prev-tab<Enter> 101 + <C-n> = :next-tab<Enter>
+219
configuration.nix
··· 1 + # Edit this configuration file to define what should be installed on 2 + ## your system. Help is available in the configuration.nix(5) man page, on 3 + # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). 4 + 5 + { config, lib, pkgs, ... }: 6 + 7 + { 8 + imports = 9 + [ # Include the results of the hardware scan. 10 + ./hardware-configuration.nix 11 + <home-manager/nixos> 12 + ]; 13 + 14 + 15 + # Use the systemd-boot EFI boot loader. 16 + boot.loader.systemd-boot.enable = true; 17 + boot.loader.efi.canTouchEfiVariables = true; 18 + 19 + # networking.hostName = "nixos"; # Define your hostname. 20 + # Pick only one of the below networking options. 21 + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. 22 + # networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. 23 + 24 + # Set your time zone. 25 + time.timeZone = "America/Chicago"; 26 + 27 + # Configure network proxy if necessary 28 + # networking.proxy.default = "http://user:password@proxy:port/"; 29 + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; 30 + 31 + # Select internationalisation properties. 32 + i18n.defaultLocale = "en_US.UTF-8"; 33 + # console = { 34 + # font = "Lat2-Terminus16"; 35 + # keyMap = "us"; 36 + # useXkbConfig = true; # use xkb.options in tty. 37 + # }; 38 + 39 + # Networking 40 + 41 + networking.hostName = "odin"; 42 + # I like systemd-networkd 43 + systemd.network.enable = true; 44 + networking.useNetworkd = true; 45 + # TODO: static IP @ 192.168.1.2 46 + 47 + # Enable the X11 windowing system. 48 + services.xserver.enable = true; 49 + 50 + 51 + 52 + 53 + # Configure keymap in X11 54 + # services.xserver.xkb.layout = "us"; 55 + # services.xserver.xkb.options = "eurosign:e,caps:escape"; 56 + 57 + # Enable CUPS to print documents. 58 + # services.printing.enable = true; 59 + 60 + # Enable sound. 61 + security.rtkit.enable = true; 62 + services.pipewire = { 63 + enable = true; 64 + alsa.enable = true; 65 + pulse.enable = true; 66 + }; 67 + 68 + # Graphics and parallel compute configuration 69 + hardware.opengl.extraPackages = [ 70 + # TODO: figure out why this doesn't work 71 + # Looks like it requires unfree 72 + # rocmPackages.clr.icd 73 + pkgs.amdvlk 74 + pkgs.libva 75 + ]; 76 + 77 + # Enable touchpad support (enabled default in most desktopManager). 78 + # services.xserver.libinput.enable = true; 79 + 80 + # Define a user account. Don't forget to set a password with ‘passwd’. 81 + users.users.noah = { 82 + isNormalUser = true; 83 + shell = pkg.fish 84 + extraGroups = [ "wheel" "video" ]; # Enable ‘sudo’ for the user. 85 + hashedPasswordFile = "./noah-password" 86 + openssh.authorizedKeys.keys = [ 87 + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDnp/AcaPipgw4+HnqpYioG+DgheOWBYDOnVkXi42PC0R1FMc+bm4wVP8TA9DAWczaWmllqlA8N2/LSleaqp+46r980VgqmeYEem5aHJuR+Cq/Mg2Z2wcp9VT8njH72wIPIUOXAv+dnPnCe4yvoasgvhwZZCDE4BFTIImuTxrEFPg5ayvkr7b/mUg9LbxaVSjK7fk082pqlShizIKAVcgIIa0lCFSMUs1V/eLi5D11moVcxJU/QoEBh+6Qn5BVM0taPFA4Gbi+288LobQ8RcgRBXKpP03Dt+onYuZQ3KzFjd6USi/d4M+pByrWFcpBJfMXuXJLuwsSF7SfxsuqjjlDt Portable" 88 + ]; 89 + }; 90 + # I manage my home with home-manager 91 + # Don't store packages in ~/.nix-profile, use /etc/profiles so we can build-vm 92 + home-manager.useUserPackages = true; 93 + # No more NIX_PATH, use system pkgs 94 + home-manager.useGlobalPkgs = true; 95 + 96 + home-manager.users.noah = import ./noah-home.nix ; 97 + 98 + # List packages installed in system profile. To search, run: 99 + # $ nix search wget 100 + environment.systemPackages = with pkgs; [ 101 + neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. 102 + pkgs.appimage-run 103 + wget 104 + kitty 105 + w3m 106 + fishPlugins.fzf-fish 107 + fzf 108 + ]; 109 + 110 + # Fonts 111 + fonts.packages = with pkgs; [ 112 + fira-code 113 + fira-code-symbols 114 + noto-fonts 115 + noto-fonts-cjk 116 + noto-fonts-emoji 117 + noto-fonts-extra 118 + ]; 119 + 120 + # Fix dynamically linked libraries for unpackaged binaries 121 + programs.nix-ld = { 122 + enable = true; 123 + libraries = with pkgs; [ 124 + # Add missing dynamic libraries for unpackaged programs HERE 125 + # NOT in environment.systemPackages 126 + 127 + ]; 128 + }; 129 + 130 + # Some programs need SUID wrappers, can be configured further or are 131 + # started in user sessions. 132 + # programs.mtr.enable = true; 133 + programs.gnupg.agent = { 134 + enable = true; 135 + enableSSHSupport = true; 136 + }; 137 + 138 + # List services that you want to enable: 139 + 140 + # Enable the OpenSSH daemon. 141 + services.openssh.enable = true; 142 + 143 + # Open ports in the firewall. 144 + # networking.firewall.allowedTCPPorts = [ ... ]; 145 + # networking.firewall.allowedUDPPorts = [ ... ]; 146 + # Or disable the firewall altogether. 147 + # TODO: allow some ports 148 + networking.firewall.enable = true; 149 + 150 + # Copy the NixOS configuration file and link it from the resulting system 151 + # (/run/current-system/configuration.nix). This is useful in case you 152 + # accidentally delete configuration.nix. 153 + system.copySystemConfiguration = true; 154 + 155 + # This option is for enabling the bolt daemon for managing Thunderbolt/USB4 Devices. 156 + services.hardware.bolt.enable = true; 157 + 158 + # Polkit is a dependency of Sway. It's responsible for handling security policies 159 + security.polkit.enable = true; 160 + 161 + # Enable the sway window manager 162 + programs.sway = { 163 + enable = true; 164 + wrapperFeatures.gtk = true; 165 + }; 166 + # Use greetd as the displaymanager 167 + #services.xserver.displayManager.greetd.enable = true; 168 + services.xserver.displayManager.lightdm.enable = false; 169 + xdg.portal = { 170 + enable = true; 171 + wlr.enable = true; 172 + extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; 173 + }; 174 + 175 + # Declarative only optoins. 176 + # I don't want to allow ad-hoc modifying users on the system. 177 + # Users must be declared either as part of a package or in this file. 178 + users.mutableUsers = false; 179 + 180 + 181 + # Automatic system upgrades 182 + system.autoUpgrade = { 183 + enable = true; 184 + dates = "09:00"; 185 + randomizedDelaySec = "45min"; 186 + }; 187 + 188 + # Unfree packages need to be whitelisted here 189 + 190 + nixpkgs.config.allowUnfreePredicate = pkg: 191 + builtins.elem (lib.getName pkg) [ 192 + "discord" 193 + "spotify" 194 + "obsidian" 195 + "tailscale" 196 + ]; 197 + # Logseq uses an ancient version of Electron, so we enable that 198 + nixpkgs.config.permittedInsecurePackages = [ "electron-25.9.0" ]; 199 + 200 + # This option defines the first version of NixOS you have installed on this particular machine, 201 + # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. 202 + # 203 + # Most users should NEVER change this value after the initial install, for any reason, 204 + # even if you've upgraded your system to a new NixOS release. 205 + # 206 + # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, 207 + # so changing it will NOT upgrade your system. 208 + # 209 + # This value being lower than the current NixOS release does NOT mean your system is 210 + # out of date, out of support, or vulnerable. 211 + # 212 + # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, 213 + # and migrated your data accordingly. 214 + # 215 + # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . 216 + system.stateVersion = "23.11"; # Did you read the comment? 217 + 218 + } 219 +
+188
noah-home.nix
··· 1 + { lib, pkgs, ...}: { 2 + home.packages = with pkgs; [ 3 + # main tool 4 + firefox-devedition 5 + direnv 6 + fish 7 + tree 8 + btop 9 + htop 10 + pavucontrol 11 + podman 12 + logseq 13 + element-desktop 14 + rsync 15 + unzip 16 + fd 17 + ripgrep 18 + catgirl 19 + netcat 20 + stunnel 21 + aerc 22 + fzf 23 + 24 + # Dev tools 25 + git 26 + gcc 27 + go 28 + gnumake 29 + babashka 30 + ccls 31 + clojure 32 + cmake 33 + ctags 34 + kotlin 35 + nodejs 36 + node2nix 37 + opam 38 + rustup 39 + zig 40 + luarocks 41 + leiningen 42 + libressl 43 + erlang 44 + elixir 45 + ghc 46 + 47 + # Unfree 48 + obsidian 49 + discord 50 + spotify 51 + tailscale 52 + 53 + ]; 54 + programs.fish.enable = true; 55 + programs.neovim = { 56 + enable = true; 57 + defaultEditor = true; 58 + extraPackages = [ 59 + fzf 60 + ripgrep 61 + luarocks 62 + ]; 63 + }; 64 + programs.git = { 65 + enable = true; 66 + userName = "Noah Pederson"; 67 + userEmail = "noah@packetlost.dev"; 68 + }; 69 + programs.ssh.enable = true; 70 + programs.ssh.extraConfig = '' 71 + AddKeysToAgent yes 72 + ServerAliveInterval 60 73 + ControlMaster auto 74 + ControlPath ~/.ssh/master-%r@%h:%p 75 + 76 + Host home 77 + Hostname packetlostandfound.us 78 + User noah 79 + IdentityFile ~/.ssh/Portable 80 + IdentitiesOnly yes 81 + 82 + Host git.sr.ht 83 + HostName git.sr.ht 84 + User git 85 + IdentityFile ~/.ssh/Portable 86 + 87 + Host github.com 88 + HostName github.com 89 + User git 90 + IdentityFile ~/.ssh/Portable 91 + 92 + Host komoe 93 + HostName 192.168.1.5 94 + User noah 95 + IdentityFile ~/.ssh/Portable 96 + ForwardAgent yes 97 + ProxyJump home 98 + 99 + Host sdf 100 + HostName tty.sdf.org 101 + User ngp 102 + IdentityFile ~/.ssh/Portable 103 + 104 + Host tildeclub 105 + HostName tilde.club 106 + User ngp 107 + IdentityFile ~/.ssh/Portable 108 + 109 + Host envs 110 + HostName envs.net 111 + User ngp 112 + IdentityFile ~/.ssh/Portable 113 + 114 + Host tildeteam 115 + HostName tilde.team 116 + User ngp 117 + IdentityFile ~/.ssh/Portable 118 + 119 + Host ctrl-c 120 + HostName ctrl-c.club 121 + User ngp 122 + IdentityFile ~/.ssh/Portable 123 + 124 + Host tildetown 125 + HostName tilde.town 126 + User ngp 127 + IdentityFile ~/.ssh/Portable 128 + 129 + Host yourtilde 130 + HostName yourtilde.com 131 + User ngp 132 + IdentityFile ~/.ssh/Portable 133 + 134 + Host hashbang 135 + HostName to1.hashbang.sh 136 + IdentitiesOnly yes 137 + User ngp 138 + IdentityFile ~/.ssh/Portable 139 + 140 + Host tiny 141 + HostName tiny.packetlost.dev 142 + User noah 143 + IdentityFile ~/.ssh/Portable 144 + 145 + Host tinybsd 146 + HostName tinybsd.packetlost.dev 147 + User noah 148 + IdentityFile ~/.ssh/Portable 149 + 150 + Host seedbox 151 + HostName lw914.usbx.me 152 + User ngp 153 + IdentityFile ~/.ssh/Portable 154 + 155 + Host saten 156 + HostName saten.packetlost.dev 157 + User noah 158 + IdentityFile ~/.ssh/Portable 159 + 160 + Host launchpad 161 + HostName git.launchpad.net 162 + User pedersonnoah 163 + IdentityFile ~/.ssh/Portable 164 + ''; 165 + services.gpg-agent = { 166 + enable = true; 167 + defaultCacheTtl = 1800; 168 + enableSshSupport = true; 169 + }; 170 + 171 + # Independent config files. 172 + xdg.configFile.nvim = { 173 + source = ./nvim; 174 + recursive = true; 175 + }; 176 + 177 + xdg.configFile.aerc = { 178 + source = ./aerc; 179 + recursive = true; 180 + }; 181 + 182 + xdg.configFile.sway = { 183 + source = ./sway; 184 + recursive = true; 185 + }; 186 + 187 + home.stateVersion = "23.11"; 188 + };
+2
nvim/after/ftplugin/scheme.lua
··· 1 + vim.opt.tabstop = 2 2 + vim.opt.shiftwidth = 2
+237
nvim/init.lua
··· 1 + -- Leader 2 + vim.g.mapleader = ";" 3 + vim.g.maplocalleader = "," 4 + -- These need to happend before we load plugins 5 + -- Load Plugins 6 + require("plugins") 7 + -- Color Scheme 8 + vim.cmd([[colorscheme tokyonight-storm]]) 9 + --vim.cmd([[colorscheme kanagawa]]) 10 + -- Config for Nord, which I usually use 11 + --vim.g.nord_italic = false 12 + --vim.g.nord_bold = false 13 + --vim.opt.background = "light" 14 + vim.opt.background = "dark" 15 + 16 + -- Formatting and vim config 17 + vim.opt.expandtab = true 18 + vim.opt.tabstop = 4 19 + vim.opt.shiftwidth = 4 20 + vim.opt.termguicolors = true 21 + vim.opt.cursorcolumn = true 22 + vim.opt.cursorline = true 23 + vim.opt.hidden = true 24 + vim.opt.colorcolumn = "120" 25 + vim.opt.spelllang = "en_us" 26 + vim.opt.number = false 27 + vim.opt.relativenumber = false 28 + -- I don't like word wrapping 29 + vim.opt.wrap = false 30 + vim.opt.mouse = vim.opt.mouse - "a" 31 + -- TODO: revisit this 32 + vim.opt.foldlevelstart = 20 33 + vim.opt.conceallevel = 3 34 + -- Show whitespace as dots 35 + vim.opt.lcs = vim.opt.lcs + "space:·" 36 + vim.opt.list = true 37 + vim.opt.textwidth = 88 38 + 39 + -- No sexp wrapping parens 40 + vim.g.sexp_enable_insert_mode_mappings = 1 41 + 42 + -- LuaLine Config 43 + require("lualine").setup( 44 + { 45 + options = { 46 + icons_enabled = true, 47 + theme = "auto" 48 + } 49 + } 50 + ) 51 + 52 + -- CTags 53 + vim.opt.tags = vim.opt.tags + vim.fn.expand("~/.local/tmp/ctags") + vim.fn.expand("~/repos/gerbil/src/TAGS") 54 + 55 + -- Conjure 56 + 57 + -- Gerbil Scheme 58 + local set_gerbil = function() 59 + vim.g["conjure#client#scheme#stdio#command"] = "gxi" 60 + vim.g["conjure#client#scheme#stdio#prompt_pattern"] = "%d*> " 61 + vim.g["conjure#client#scheme#stdio#value_prefix_pattern"] = false 62 + end 63 + set_gerbil() 64 + vim.api.nvim_create_user_command("ConjureGerbil", set_gerbil, {}) 65 + 66 + 67 + 68 + -- Chibi-scheme 69 + local set_chibi = function() 70 + vim.g["conjure#client#scheme#stdio#command"] = "chibi-scheme -R" 71 + vim.g["conjure#client#scheme#stdio#prompt_pattern"] = "=> $?" 72 + vim.g["conjure#client#scheme#stdio#value_prefix_pattern"] = true 73 + end 74 + vim.api.nvim_create_user_command("ConjureChibi", set_chibi, {}) 75 + -- Chicken Scheme 76 + local set_chicken = function() 77 + vim.g["conjure#client#scheme#stdio#command"] = "csi -quiet -:c" 78 + vim.g["conjure#client#scheme#stdio#prompt_pattern"] = "\n-#;%d-> " 79 + vim.g["conjure#client#scheme#stdio#value_prefix_pattern"] = true 80 + end 81 + vim.api.nvim_create_user_command("ConjureChicken", set_chicken, {}) 82 + 83 + -- Neoformat 84 + vim.g.neoformat_run_all_formatters = 1 85 + vim.g.neoformat_enabled_python = {"black", "docformatter", "isort"} 86 + vim.g.neoformat_python_black = { 87 + exe = "ruff", 88 + stdin = 1, 89 + args = {'format', '-q', '-'} 90 + } 91 + 92 + -- KEYMAPS 93 + 94 + local keymap = vim.api.nvim_set_keymap 95 + local noremap = {noremap = true} 96 + local silentnoremap = {noremap = true, silent = true} 97 + -- Easier breaking from edit modes 98 + keymap("n", ";;", "<Esc>", noremap) 99 + keymap("v", ";;", "<Esc>", noremap) 100 + keymap("i", ";;", "<Esc>", noremap) 101 + keymap("t", "<Esc>", "<C-\\><C-n>", noremap) 102 + -- Tab Navigation 103 + keymap("n", "<leader>tn", "<cmd>tabnew<CR>", noremap) 104 + keymap("n", "<leader>tc", "<cmd>tabclose<CR>", noremap) 105 + keymap("n", "<leader><tab>", "<cmd>tabnext<CR>", noremap) 106 + keymap("n", "<leader>tt", "<cmd>tabnext<CR>", noremap) 107 + 108 + -- buffer navigation 109 + keymap("n", "<leader>h", "<C-w>h", noremap) 110 + keymap("n", "<leader>j", "<C-w>j", noremap) 111 + keymap("n", "<leader>k", "<C-w>k", noremap) 112 + keymap("n", "<leader>l", "<C-w>l", noremap) 113 + keymap("n", "<leader>bn", "<cmd>bnext<CR>", noremap) 114 + keymap("n", "<leader>bp", "<cmd>bprev<CR>", noremap) 115 + -- close buffer and put previous into current window 116 + keymap("n", "<leader>bq", "<cmd>bp <BAR> bd #<CR>", noremap) 117 + -- list buffers 118 + keymap("n", "<leader>bl", "<cmd>ls<cr>", noremap) 119 + -- splits 120 + keymap("n", "<leader>vs", "<cmd>vsplit<cr>", noremap) 121 + keymap("n", "<leader>ss", "<cmd>split<cr>", noremap) 122 + keymap("n", "<leader>hs", "<cmd>split<cr>", noremap) 123 + 124 + -- Toggle Line Numbers 125 + keymap("n", "<leader>n", "<cmd>set number! number?<CR>", silentnoremap) 126 + 127 + -- Edit this file 128 + keymap("n", "<leader>ec", "<cmd>e $MYVIMRC<CR>", silentnoremap) 129 + keymap("n", "<leader>sc", "<cmd>source $MYVIMRC<CR>", silentnoremap) 130 + 131 + -- Clear highlights 132 + keymap("n", "<C-c>", "<cmd>noh<CR>", silentnoremap) 133 + 134 + -- Telescope shortcuts 135 + keymap("n", "<leader>ff", "<cmd>Telescope find_files<CR>", silentnoremap) 136 + keymap("n", "<leader>fg", "<cmd>Telescope live_grep<CR>", silentnoremap) 137 + keymap("n", "<leader>fb", "<cmd>Telescope buffers<CR>", silentnoremap) 138 + keymap("n", "<C-p>", "<cmd>Telescope buffers<CR>", silentnoremap) 139 + keymap("n", "<leader>fh", "<cmd>Telescope help_tags<CR>", silentnoremap) 140 + 141 + -- Remap arrow keys for page navigation 142 + keymap("n", "<Up>", "<C-y>", silentnoremap) 143 + keymap("n", "<Down>", "<C-e>", silentnoremap) 144 + keymap("n", "<Left>", "zh", silentnoremap) 145 + keymap("n", "<Right>", "zl", silentnoremap) 146 + 147 + -- LSP Documentation viewer 148 + keymap("n", "K", "<cmd>lua vim.lsp.buf.hover()<CR>", silentnoremap) 149 + 150 + -- Python Specific 151 + vim.g.python3_host_prog = vim.fn.expand("~/.envs/nvim/bin/python3") 152 + 153 + -- Set up Treesitter 154 + require("nvim-treesitter.configs").setup( 155 + { 156 + highlight = { 157 + enable = true, 158 + disable = {} 159 + }, 160 + indent = { 161 + enable = false, 162 + disable = {} 163 + }, 164 + ensure_installed = { 165 + "c", 166 + "cpp", 167 + "capnp", 168 + "cmake", 169 + "bash", 170 + "dockerfile", 171 + "diff", 172 + "devicetree", 173 + "dot", 174 + "ebnf", 175 + "elixir", 176 + "erlang", 177 + "clojure", 178 + "fortran", 179 + "go", 180 + "gomod", 181 + "gosum", 182 + "graphql", 183 + "git_config", 184 + "git_rebase", 185 + "gitcommit", 186 + "gitignore", 187 + "gleam", 188 + "julia", 189 + "fish", 190 + "toml", 191 + "haskell", 192 + "hare", 193 + "http", 194 + "html", 195 + "ini", 196 + "json", 197 + "jq", 198 + "latex", 199 + "llvm", 200 + "mermaid", 201 + "make", 202 + "meson", 203 + "ninja", 204 + "yaml", 205 + "python", 206 + "proto", 207 + "racket", 208 + "rst", 209 + "scala", 210 + "html", 211 + "tsx", 212 + "rust", 213 + "scheme", 214 + "fennel", 215 + "lua", 216 + "markdown", 217 + "markdown_inline", 218 + "sql", 219 + "thrift", 220 + "typescript", 221 + "verilog", 222 + "vim", 223 + "zig", 224 + "uxntal" 225 + } 226 + } 227 + ) 228 + 229 + -- Set up Which Key? 230 + require("which-key").setup({}) 231 + -- ######################## 232 + --# Require other configs # 233 + -- ######################## 234 + -- LSP 235 + require("lsp") 236 + -- Completion 237 + require("completion")
+3
nvim/lua/.luarc.json
··· 1 + { 2 + "workspace.checkThirdParty": false 3 + }
+72
nvim/lua/completion.lua
··· 1 + require("compe").setup( 2 + { 3 + enabled = true, 4 + autocomplete = true, 5 + debug = false, 6 + min_length = 1, 7 + preselect = "enable", 8 + throttle_time = 80, 9 + source_timeout = 200, 10 + resolve_timeout = 800, 11 + incomplete_delay = 400, 12 + max_abbr_width = 100, 13 + max_kind_width = 100, 14 + max_menu_width = 100, 15 + documentation = { 16 + border = {"", "", "", " ", "", "", "", " "}, -- the border option is the same as `|help nvim_open_win|` 17 + winhighlight = "NormalFloat:CompeDocumentation,FloatBorder:CompeDocumentationBorder", 18 + max_width = 120, 19 + min_width = 60, 20 + max_height = math.floor(vim.o.lines * 0.3), 21 + min_height = 1 22 + }, 23 + source = { 24 + path = true, 25 + buffer = true, 26 + calc = true, 27 + nvim_lsp = true, 28 + nvim_lua = true, 29 + vsnip = true, 30 + ultisnips = true, 31 + luasnip = true 32 + } 33 + } 34 + ) 35 + local t = function(str) 36 + return vim.api.nvim_replace_termcodes(str, true, true, true) 37 + end 38 + 39 + local check_back_space = function() 40 + local col = vim.fn.col(".") - 1 41 + return col == 0 or vim.fn.getline("."):sub(col, col):match("%s") ~= nil 42 + end 43 + 44 + -- Use (s-)tab to: 45 + --- move to prev/next item in completion menuone 46 + --- jump to prev/next snippet's placeholder 47 + _G.tab_complete = function() 48 + if vim.fn.pumvisible() == 1 then 49 + return t "<C-n>" 50 + elseif vim.fn["vsnip#available"](1) == 1 then 51 + return t "<Plug>(vsnip-expand-or-jump)" 52 + elseif check_back_space() then 53 + return t "<Tab>" 54 + else 55 + return vim.fn["compe#complete"]() 56 + end 57 + end 58 + _G.s_tab_complete = function() 59 + if vim.fn.pumvisible() == 1 then 60 + return t "<C-p>" 61 + elseif vim.fn["vsnip#jumpable"](-1) == 1 then 62 + return t "<Plug>(vsnip-jump-prev)" 63 + else 64 + -- If <S-Tab> is not working in your terminal, change it to <C-h> 65 + return t "<S-Tab>" 66 + end 67 + end 68 + 69 + vim.api.nvim_set_keymap("i", "<Tab>", "v:lua.tab_complete()", {expr = true}) 70 + vim.api.nvim_set_keymap("s", "<Tab>", "v:lua.tab_complete()", {expr = true}) 71 + vim.api.nvim_set_keymap("i", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true}) 72 + vim.api.nvim_set_keymap("s", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true})
+148
nvim/lua/lsp.lua
··· 1 + local nvim_lsp = require("lspconfig") 2 + --######################## 3 + --#### Set up LSPs #### 4 + --######################## 5 + -- 6 + -- TypeScript 7 + nvim_lsp.tsserver.setup { 8 + flags = { 9 + debounce_text_changes = 150 10 + } 11 + } 12 + 13 + -- Clojure 14 + nvim_lsp.clojure_lsp.setup{} 15 + 16 + local util = require("lspconfig.util") 17 + 18 + -- Rust 19 + nvim_lsp.rust_analyzer.setup({}) 20 + -- Python LSP 21 + nvim_lsp.pylsp.setup( 22 + { 23 + cmd = {"/home/noah/.envs/nvim/bin/pylsp"}, 24 + root_dir = function(fname) 25 + local root_files = { 26 + "pants.toml", 27 + "pyproject.toml", 28 + "setup.py", 29 + "setup.cfg", 30 + "Pipfile" 31 + } 32 + return util.find_git_ancestor(fname) or util.root_pattern(unpack(root_files))(fname) 33 + end 34 + } 35 + ) 36 + 37 + -- More Python, I like it strict 38 + nvim_lsp.pyright.setup{} 39 + nvim_lsp.ruff_lsp.setup{} 40 + 41 + --nvim_lsp.scheme_langserver.setup{} 42 + 43 + -- Golang 44 + nvim_lsp.gopls.setup{} 45 + -- Lots of things 46 + --nvim_lsp.diagnosticls.setup( 47 + -- { 48 + -- flags = { 49 + -- debounce_text_changes = 150 50 + -- } 51 + -- } 52 + --) 53 + -- JSON 54 + nvim_lsp.jsonls.setup{} 55 + nvim_lsp.jsonls.setup{} 56 + -- Vim 57 + nvim_lsp.vimls.setup{} 58 + 59 + nvim_lsp.bashls.setup{} 60 + nvim_lsp.ccls.setup{} 61 + nvim_lsp.asm_lsp.setup{} 62 + nvim_lsp.lua_ls.setup{ 63 + settings = { 64 + Lua = { 65 + runtime = { 66 + -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) 67 + version = "LuaJIT" 68 + }, 69 + diagnostics = { 70 + -- Get the language server to recognize the `vim` global 71 + globals = {"vim"} 72 + }, 73 + workspace = { 74 + -- Make the server aware of Neovim runtime files 75 + library = vim.api.nvim_get_runtime_file("", true) 76 + }, 77 + -- Do not send telemetry data containing a randomized but unique identifier 78 + telemetry = { 79 + enable = false 80 + } 81 + } 82 + } 83 + } 84 + nvim_lsp.fennel_ls.setup{} 85 + 86 + -- Whenever an LSP is attached to a buffer 87 + local on_attach = function(ev) 88 + --Enable completion triggered by <c-x><x-o> 89 + vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc' 90 + 91 + local opts = {noremap = true, silent = true, buffer = ev.buf} 92 + local protocol = require("vim.lsp.protocol") 93 + -- Mappings. 94 + -- See `:help vim.lsp.*` for documentation on any of the below functions 95 + vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts) 96 + vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts) 97 + vim.keymap.set("n", "K", vim.lsp.buf.hover, opts) 98 + vim.keymap.set("n", "gi", vim.lsp.buf.implementation, opts) 99 + vim.keymap.set("n", "<C-k>", vim.lsp.buf.signature_help, opts) 100 + vim.keymap.set("n", "<space>wa", vim.lsp.buf.add_workspace_folder, opts) 101 + vim.keymap.set("n", "<space>wr", vim.lsp.buf.remove_workspace_folder, opts) 102 + vim.keymap.set("n", "<space>wl", function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, opts) 103 + vim.keymap.set("n", "<space>D", vim.lsp.buf.type_definition, opts) 104 + vim.keymap.set("n", "<space>rn", vim.lsp.buf.rename, opts) 105 + vim.keymap.set("n", "<space>ca", vim.lsp.buf.code_action, opts) 106 + vim.keymap.set("n", "gr", vim.lsp.buf.references, opts) 107 + vim.keymap.set("n", "<space>e", vim.diagnostic.open_float, opts) 108 + vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) 109 + vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts) 110 + vim.keymap.set("n", "<space>q", vim.diagnostic.setloclist, opts) 111 + vim.keymap.set("n", "<space>f", function() 112 + vim.lsp.buf.format{ async = true } 113 + end, opts) 114 + vim.keymap.set("n", "<space>s", vim.lsp.buf.workspace_symbol, opts) 115 + 116 + -- require'completion'.on_attach(client, bufnr) 117 + protocol.CompletionItemKind = { 118 + "", -- Text 119 + "⋙", -- Method 120 + "𝑓", -- Function 121 + "", -- Constructor 122 + "", -- Field 123 + "", -- Variable 124 + "", -- Class 125 + "ﰮ", -- Interface 126 + "", -- Module 127 + "", -- Property 128 + "", -- Unit 129 + "", -- Value 130 + "", -- Enum 131 + "", -- Keyword 132 + "﬌", -- Snippet 133 + "", -- Color 134 + "", -- File 135 + "", -- Reference 136 + "", -- Folder 137 + "", -- EnumMember 138 + "", -- Constant 139 + "", -- Struct 140 + "", -- Event 141 + "ﬦ", -- Operator 142 + "" -- TypeParameter 143 + } 144 + end 145 + vim.api.nvim_create_autocmd('LspAttach', { 146 + group = vim.api.nvim_create_augroup('UserLspConfig', {}), 147 + callback = on_attach 148 + })
+196
nvim/lua/plugins.lua
··· 1 + -- Bootstrap lazy.nvim 2 + local ensure_lazy = function() 3 + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" 4 + if not vim.loop.fs_stat(lazypath) then 5 + vim.fn.system( 6 + { 7 + "git", 8 + "clone", 9 + "--filter=blob:none", 10 + "https://github.com/folke/lazy.nvim.git", 11 + "--branch=stable", -- latest stable release 12 + lazypath 13 + } 14 + ) 15 + end 16 + vim.opt.rtp:prepend(lazypath) 17 + end 18 + 19 + local lazy_bootstrap = ensure_lazy() 20 + if lazy_bootstrap then 21 + print("Bootstrapped lazy.nvim") 22 + end 23 + 24 + require("lazy").setup( 25 + { 26 + -- Color themes 27 + "shaunsingh/nord.nvim", 28 + "shaunsingh/moonlight.nvim", 29 + "folke/tokyonight.nvim", 30 + "cranberry-clockworks/coal.nvim", 31 + "hardselius/warlock", 32 + { 33 + "rebelot/kanagawa.nvim", 34 + opts = {compile = true} 35 + }, 36 + -- show indents and whitespace characters 37 + "lukas-reineke/indent-blankline.nvim", 38 + -- Completion 39 + "hrsh7th/nvim-compe", 40 + "hrsh7th/vim-vsnip", 41 + -- nvim lsp plugins 42 + "neovim/nvim-lspconfig", 43 + { 44 + "nvimdev/lspsaga.nvim", 45 + dependencies = { 46 + "nvim-tree/nvim-web-devicons", 47 + "nvim-treesitter/nvim-treesitter" 48 + }, 49 + opts = {lightbulb = {enable = false}}, 50 + event = "LspAttach" 51 + }, 52 + -- Syntax Highlighting from the future 53 + { 54 + "nvim-treesitter/nvim-treesitter", 55 + init = function() 56 + vim.cmd([[":TSUpdate"]]) 57 + end 58 + }, 59 + -- GitGutter, shows inline difs 60 + "airblade/vim-gitgutter", 61 + -- Git wrapper plugin 62 + "tpope/vim-fugitive", 63 + -- surround with pairs )))))) 64 + --"tpope/vim-surround", 65 + -- Auto format tool 66 + {"sbdchd/neoformat", lazy = true, cmd = "Neoformat"}, 67 + -- Distraction free writing: GoYo + Limelight 68 + {"junegunn/limelight.vim", lazy = true, ft = "markdown"}, 69 + {"junegunn/goyo.vim", lazy = true, ft = "markdown"}, 70 + -- Golang plugins 71 + --use {"fatih/vim-go", run = ":GoUpdateBinaries", lazy = true, ft = "go"} 72 + { 73 + "ray-x/go.nvim", 74 + ft = "go", 75 + lazy = true, 76 + dependencies = { 77 + "ray-x/guihua.lua", 78 + "neovim/nvim-lspconfig", 79 + "nvim-treesitter/nvim-treesitter" 80 + } 81 + }, 82 + { 83 + "nvim-lualine/lualine.nvim", 84 + dependencies = {"nvim-tree/nvim-web-devicons"} 85 + }, 86 + "junegunn/fzf.vim", 87 + { 88 + dir = "~/.fzf", 89 + build = function() 90 + vim.fn["fzf#install"](0) 91 + end, 92 + dependencies = {"junegunn/fzf.vim"} 93 + }, 94 + -- Polyglot 95 + "sheerun/vim-polyglot", 96 + -- Telescope, find anything fast 97 + "nvim-lua/plenary.nvim", 98 + {"nvim-telescope/telescope.nvim", dependencies = {"nvim-lua/plenary.nvim"}}, 99 + "nvim-telescope/telescope-symbols.nvim", 100 + {"folke/trouble.nvim", dependencies = "nvim-tree/nvim-web-devicons"}, 101 + -- Which key is bound? 102 + "folke/which-key.nvim", -- literally the best plugin ever 103 + -- Lithsps 104 + { 105 + "guns/vim-sexp", 106 + ft = {"hy", "scheme", "clojure"}, 107 + }, -- )))))) 108 + {"hiphish/rainbow-delimiters.nvim"}, 109 + --{"gpanders/nvim-parinfer", ft = {"scheme", "lisp", "fennel", "clojure", "lua"}}, 110 + --{ 111 + -- "eraserhd/parinfer-rust", 112 + -- build = "RUSTFLAGS='-C target-feature=+crt-static' cargo build --release", 113 + -- ft = {"scheme", "lisp", "fennel", "clojure", "lua"}, 114 + --}, 115 + -- Conjure, lisp is magical 116 + { 117 + "Olical/conjure", 118 + ft = {"scheme", "lisp", "fennel", "clojure", "lua"}, 119 + config = function() 120 + vim.g["conjure#client#scheme#stdio#command"] = "gxi" 121 + vim.g["conjure#client#scheme#stdio#prompt_pattern"] = "%d*> $?" 122 + end 123 + }, 124 + {"p1xelHer0/gerbil.nvim", ft = "scheme"}, 125 + -- Fennel, Luasthp 126 + {"jaawerth/fennel.vim", lazy = true, ft = "fennel"}, 127 + {"rktjmp/hotpot.nvim", lazy = true, ft = "fennel"}, 128 + {"Olical/nfnl", ft = "fennel"}, 129 + -- Rust stuff 130 + { 131 + "simrat39/rust-tools.nvim", 132 + ft = {"rust"}, 133 + config = function() 134 + local rt = require("rust-tools") 135 + rt.setup( 136 + { 137 + server = { 138 + on_attach = function(_, bufnr) 139 + -- Hover actions 140 + vim.keymap.set("n", "<C-space>", rt.hover_actions.hover_actions, {buffer = bufnr}) 141 + -- Code action groups 142 + vim.keymap.set( 143 + "n", 144 + "<Leader>a", 145 + rt.code_action_group.code_action_group, 146 + {buffer = bufnr} 147 + ) 148 + end 149 + } 150 + } 151 + ) 152 + end, 153 + dependencies = {"nvim-lua/plenary.nvim"} 154 + }, 155 + {"mfussenegger/nvim-dap", lazy = true, ft = {"c", "rust"}}, 156 + { 157 + "saecki/crates.nvim", 158 + tag = "v0.4.0", 159 + dependencies = {"nvim-lua/plenary.nvim"}, 160 + config = function() 161 + require("crates").setup() 162 + end, 163 + ft = {"rust"} 164 + }, 165 + -- RISC-V Assembly syntax highlighting 166 + {"kylelaker/riscv.vim", ft = "riscv"}, 167 + -- Hare Stuff 168 + 169 + -- Haredoc 170 + {url = "https://git.sr.ht/~torresjrjr/vim-haredoc", ft = {"hare"}}, 171 + -- Hare.vim 172 + {url = "https://git.sr.ht/~sircmpwn/hare.vim", ft = {"hare"}}, 173 + -- TCL 174 + {"lewis6991/tree-sitter-tcl", build = "make"}, 175 + -- LF 176 + {"ptzz/lf.vim", cmd = {"Lf"}, dependencies = {"voldikss/vim-floaterm"}}, 177 + -- Copilot 178 + -- use {"github/copilot.vim", lazy = true, cmd = {"Copilot"}} 179 + -- Mason 180 + { 181 + "williamboman/mason.nvim", 182 + init = function() 183 + vim.cmd([[":MasonUpdate"]]) 184 + end, 185 + dependencies = { 186 + "williamboman/mason-lspconfig.nvim", 187 + "mfussenegger/nvim-dap", 188 + "jose-elias-alvarez/null-ls.nvim" 189 + }, 190 + config = function() 191 + require("mason").setup() 192 + end 193 + } 194 + }, 195 + nil 196 + )
+258
sway/config
··· 1 + # This dotfile is managed using dotdrop 2 + 3 + # Read `man 5 sway` for a complete reference. 4 + 5 + ### Variables 6 + # Font config 7 + font Berkeley Mono Medium 12 8 + # Logo key. Use Mod1 for Alt. 9 + set $mod Mod4 10 + # Home row direction keys, like vim 11 + set $left h 12 + set $down j 13 + set $up k 14 + set $right l 15 + 16 + # Your preferred terminal emulator 17 + set $term kitty 18 + # Your preferred application launcher 19 + # Note: it's recommended that you pass the final command to sway 20 + #set $menu dmenu_path | dmenu | xargs swaymsg exec -- 21 + 22 + set $menu exec kitty --class 'launcher' sh -c 'compgen -c | sort -u | fzf | xargs -r swaymsg -t command exec' 23 + for_window [app_id="^launcher$"] floating enable, border none, resize set width 25 ppt height 100 ppt, move position 0 px 0 px 24 + 25 + # Lockscreen 26 + set $lock swaylock -c 892243 -e 27 + 28 + # Set laptop display 29 + set $laptop eDP-1 30 + exec sh -c "if [ 2 -lt $(swaymsg -t get_outputs -r | jq '. | length') ]; then swaymsg output $laptop disable; fi" 31 + 32 + ### Output configuration 33 + # 34 + # Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/) 35 + output * bg #799A91 solid_color 36 + # 37 + # Example configuration: 38 + # 39 + # output HDMI-A-1 resolution 1920x1080 position 1920,0 40 + # 41 + # You can get the names of your outputs by running: swaymsg -t get_outputs 42 + 43 + ### Idle configuration 44 + set $idle swayidle -w \ 45 + timeout 300 '$lock' \ 46 + timeout 600 'swaymsg "output * dpms off"' \ 47 + timeout 15 'if pgrep -x swaylock; then swaymsg "output * dpms off"; fi' \ 48 + resume 'swaymsg "output * dpms on"' \ 49 + before-sleep '$lock' 50 + exec $idle 51 + # 52 + # This will lock your screen after 300 seconds of inactivity, then turn off 53 + # your displays after another 300 seconds, and turn your screens back on when 54 + # resumed. It will also lock your screen before your computer goes to sleep, 55 + # and shut off the screen 15 seconds after being locked manually 56 + 57 + ### Input configuration 58 + # 59 + # Example configuration: 60 + # 61 + # input "2:14:SynPS/2_Synaptics_TouchPad" { 62 + # dwt enabled 63 + # tap enabled 64 + # natural_scroll enabled 65 + # middle_emulation enabled 66 + # } 67 + # 68 + # You can get the names of your inputs by running: swaymsg -t get_inputs 69 + # Read `man 5 sway-input` for more information about this section. 70 + 71 + 72 + input "1133:45081:MX_Master_2S_Mouse" { 73 + pointer_accel 0 74 + accel_profile flat 75 + } 76 + 77 + 78 + exec xrdb -merge "/home/noah/.config/Xresources.d/all" 79 + ### Key bindings 80 + # 81 + # Basics: 82 + # 83 + # start a terminal 84 + bindsym $mod+Return exec $term 85 + 86 + # kill focused window 87 + bindsym $mod+Shift+q kill 88 + 89 + # start your launcher 90 + bindsym $mod+d exec $menu 91 + 92 + # Screenshots 93 + bindsym $mod+p exec grim -g "$(slurp -d)" - | wl-copy 94 + 95 + # Drag floating windows by holding down $mod and left mouse button. 96 + # Resize them with right mouse button + $mod. 97 + # Despite the name, also works for non-floating windows. 98 + # Change normal to inverse to use left mouse button for resizing and right 99 + # mouse button for dragging. 100 + floating_modifier $mod normal 101 + 102 + # reload the configuration file 103 + bindsym $mod+Shift+c reload 104 + 105 + # Manually lock the desktop 106 + bindsym $mod+Alt+l exec $lock 107 + 108 + # Shut down 109 + bindsym $mod+Alt+p exec swaynag --message "Shut down laptop?" \ 110 + --button-dismiss-no-terminal "Shutdown" "systemctl poweroff" -e bottom \ 111 + --font 'Berkeley Mono' 112 + 113 + # exit sway (logs you out of your Wayland session) 114 + bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit' 115 + 116 + bindsym --release Print exec grim -g \"$(slurp)" - | wl-copy 117 + # 118 + # Moving around: 119 + # 120 + # Move your focus around 121 + bindsym $mod+$left focus left 122 + bindsym $mod+$down focus down 123 + bindsym $mod+$up focus up 124 + bindsym $mod+$right focus right 125 + # or use $mod+[up|down|left|right] 126 + bindsym $mod+Left focus left 127 + bindsym $mod+Down focus down 128 + bindsym $mod+Up focus up 129 + bindsym $mod+Right focus right 130 + 131 + # _move_ the focused window with the same, but add Shift 132 + bindsym $mod+Shift+$left move left 133 + bindsym $mod+Shift+$down move down 134 + bindsym $mod+Shift+$up move up 135 + bindsym $mod+Shift+$right move right 136 + # ditto, with arrow keys 137 + bindsym $mod+Shift+Left move left 138 + bindsym $mod+Shift+Down move down 139 + bindsym $mod+Shift+Up move up 140 + bindsym $mod+Shift+Right move right 141 + # 142 + # Workspaces: 143 + # 144 + # switch to workspace 145 + bindsym $mod+1 workspace 1 146 + bindsym $mod+2 workspace 2 147 + bindsym $mod+3 workspace 3 148 + bindsym $mod+4 workspace 4 149 + bindsym $mod+5 workspace 5 150 + bindsym $mod+6 workspace 6 151 + bindsym $mod+7 workspace 7 152 + bindsym $mod+8 workspace 8 153 + bindsym $mod+9 workspace 9 154 + bindsym $mod+0 workspace 10 155 + # move focused container to workspace 156 + bindsym $mod+Shift+1 move container to workspace 1 157 + bindsym $mod+Shift+2 move container to workspace 2 158 + bindsym $mod+Shift+3 move container to workspace 3 159 + bindsym $mod+Shift+4 move container to workspace 4 160 + bindsym $mod+Shift+5 move container to workspace 5 161 + bindsym $mod+Shift+6 move container to workspace 6 162 + bindsym $mod+Shift+7 move container to workspace 7 163 + bindsym $mod+Shift+8 move container to workspace 8 164 + bindsym $mod+Shift+9 move container to workspace 9 165 + bindsym $mod+Shift+0 move container to workspace 10 166 + # Note: workspaces can have any name you want, not just numbers. 167 + # We just use 1-10 as the default. 168 + # 169 + # Layout stuff: 170 + # 171 + # You can "split" the current object of your focus with 172 + # $mod+b or $mod+v, for horizontal and vertical splits 173 + # respectively. 174 + bindsym $mod+g splith 175 + bindsym $mod+v splitv 176 + 177 + # Switch the current container between different layout styles 178 + bindsym $mod+s layout stacking 179 + bindsym $mod+w layout tabbed 180 + bindsym $mod+e layout toggle split 181 + 182 + # Make the current focus fullscreen 183 + bindsym $mod+f fullscreen 184 + 185 + # Toggle the current focus between tiling and floating mode 186 + bindsym $mod+Shift+space floating toggle 187 + 188 + # Swap focus between the tiling area and the floating area 189 + bindsym $mod+space focus mode_toggle 190 + 191 + # move focus to the parent container 192 + bindsym $mod+a focus parent 193 + # 194 + # Scratchpad: 195 + # 196 + # Sway has a "scratchpad", which is a bag of holding for windows. 197 + # You can send windows there and get them back later. 198 + 199 + # Move the currently focused window to the scratchpad 200 + bindsym $mod+Shift+m move scratchpad 201 + 202 + # Show the next scratchpad window or hide the focused scratchpad window. 203 + # If there are multiple scratchpad windows, this command cycles through them. 204 + bindsym $mod+Shift+a scratchpad show 205 + # 206 + # Resizing containers: 207 + # 208 + mode "resize" { 209 + # left will shrink the containers width 210 + # right will grow the containers width 211 + # up will shrink the containers height 212 + # down will grow the containers height 213 + bindsym $left resize shrink width 10px 214 + bindsym $down resize grow height 10px 215 + bindsym $up resize shrink height 10px 216 + bindsym $right resize grow width 10px 217 + 218 + # ditto, with arrow keys 219 + bindsym Left resize shrink width 10px 220 + bindsym Down resize grow height 10px 221 + bindsym Up resize shrink height 10px 222 + bindsym Right resize grow width 10px 223 + 224 + # return to default mode 225 + bindsym Return mode "default" 226 + bindsym Escape mode "default" 227 + } 228 + bindsym $mod+r mode "resize" 229 + 230 + # Media and other hardware keys 231 + bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% 232 + bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% 233 + bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle 234 + bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle 235 + bindsym XF86MonBrightnessDown exec brightnessctl set 5%- 236 + bindsym XF86MonBrightnessUp exec brightnessctl set 5%+ 237 + bindsym XF86AudioPlay playerctl play-pause 238 + bindsym XF86AudioPause playerctl play-pause 239 + bindsym XF86AudioNext playerctl next 240 + bindsym XF86AudioPrev playerctl prev 241 + 242 + # 243 + # padding mode 244 + # 245 + #mode "padding" { 246 + # bindsym plus gap set outer current plus 10 247 + # bindsym minus gap set outer current minus 10 248 + # # return to default mode 249 + # bindsym Return mode "default" 250 + # bindsym Escape mode "default" 251 + #} 252 + # 253 + #bindsym $mod+m mode "padding" 254 + 255 + include powell 256 + 257 + include /etc/sway/config.d/* 258 + include /home/noah/.config/sway/`hostname`
+4
sway/env
··· 1 + XDG_CONFIG_HOME="${HOME}/.config" 2 + XDG_CACHE_HOME="${HOME}/.cache" 3 + XDG_DATA_HOME="${HOME}/.local/share" 4 + WLR_NO_HARDWARE_CURSORS=1
+4
sway/misaka
··· 1 + # output $laptop disable 2 + set $main DP-3 3 + 4 + output $main scale 1 resolution 2560x1440@59.951Hz position 0 0
+9
sway/othinus
··· 1 + # Ultrawide 2 + #workspace $ws1 output DP-6 3 + #workspace $ws2 output HDMI-A-1 4 + 5 + # HDMI is the main output 6 + output HDMI-A-1 pos 0 0 7 + output DP-5 pos -430 1440 8 + # Sometimes the DP identifier changes for some reason 9 + output DP-6 pos -430 1440
+25
sway/powell
··· 1 + # 2 + # Status Bar: 3 + # 4 + # Read `man 5 sway-bar` for more information about this section. 5 + bar { 6 + position top 7 + 8 + # When the status_command prints a new line to stdout, swaybar updates. 9 + # The default just shows the current date and time. 10 + #status_command while date +'%Y-%m-%d %l:%M:%S %p'; do sleep 1; done 11 + status_command i3status 12 + colors { 13 + # text color 14 + statusline #DEDEE0 15 + background #892243 16 + inactive_workspace #444444 #444444 #DEDEE0 17 + focused_workspace #799A91 #799A91 #444444 18 + } 19 + } 20 + 21 + # Colors 22 + client.focused #97A2A3 #799A91 #DEDEE0 #D5C9AD 23 + client.unfocused #C6AE8B #D5C9AD #444444 #C6AE8B 24 + client.focused_inactive #C6AE8B #7A9CA7 #DEDEE0 #C6AE8B 25 + client.urgent #C6AE8B #892243 #DEDEE0