From 6d6408c8957c872b0f3b7266756bb05a216e80ac Mon Sep 17 00:00:00 2001 From: Kate Adkins Date: Wed, 4 Dec 2024 09:51:24 -0700 Subject: [PATCH] nvim: updates for using nvim again~ --- flake.nix | 8 +- nixos/dotfiles/hm.nix | 5 +- nixos/dotfiles/vscode.hm.nix | 188 ++++++++++++++++------------ nixos/hosts/trailblazer/default.nix | 2 +- nvim/lua/config/lazy.lua | 12 +- nvim/lua/plugins/theme.lua | 2 +- 6 files changed, 124 insertions(+), 93 deletions(-) diff --git a/flake.nix b/flake.nix index 0f25745..e28a088 100644 --- a/flake.nix +++ b/flake.nix @@ -234,10 +234,10 @@ ( module: ( - { deprekages, ... }: + { deprekages, nil, ... }: { home-manager.config = - { pkgs, ... }@specialArgs: (import module) (specialArgs // { inherit deprekages; }); + { pkgs, ... }@specialArgs: (import module) (specialArgs // { inherit deprekages nil; }); } ) ) @@ -245,10 +245,10 @@ ( module: ( - { deprekages, ... }: + { deprekages, nil, ... }: { home-manager.users.deprekated = - { pkgs, ... }@specialArgs: (import module) (specialArgs // { inherit deprekages; }); + { pkgs, ... }@specialArgs: (import module) (specialArgs // { inherit deprekages nil; }); } ) ) diff --git a/nixos/dotfiles/hm.nix b/nixos/dotfiles/hm.nix index 22433b7..73e57ef 100644 --- a/nixos/dotfiles/hm.nix +++ b/nixos/dotfiles/hm.nix @@ -25,7 +25,10 @@ xdg.configFile.looking-glass.source = ../../looking-glass; # neovim - xdg.configFile.nvim.source = ../../nvim; + xdg.configFile.nvim = { + source = ../../nvim; + recursive = true; + }; # tmux xdg.configFile.tmux.source = ../../tmux; diff --git a/nixos/dotfiles/vscode.hm.nix b/nixos/dotfiles/vscode.hm.nix index aa5f294..b1a5b75 100644 --- a/nixos/dotfiles/vscode.hm.nix +++ b/nixos/dotfiles/vscode.hm.nix @@ -1,103 +1,109 @@ # # Visual Studio Code + Dance (kakoune mode) Experiments # -{ pkgs, deprekages, lib, ... }: +{ + pkgs, + deprekages, + lib, + nil, + ... +}: let # Simple helper to de-stringify invalid tokens. - author = name: pkgs.vscode-extensions.${name}; + author = name: pkgs.vscode-extensions.${name}; - # Forces a package to be marked as having linux-aarch64 support. - forceArmLinux = pkg: pkg.overrideAttrs (prev: { - meta.platforms = prev.meta.platforms ++ [ "aarch64-linux" ]; - }); + # Forces a package to be marked as having linux-aarch64 support. + forceArmLinux = + pkg: + pkg.overrideAttrs (prev: { + meta.platforms = prev.meta.platforms ++ [ "aarch64-linux" ]; + }); in { + programs.vscode = { + enable = true; - programs.vscode = { - enable = true; + # + # Extensions to include with vscode. + # + extensions = with (pkgs.vscode-extensions // deprekages.vscode-extensions); [ + # Requires a qualified name due to the leading '1'. + (author "1Password").op-vscode - # - # Extensions to include with vscode. - # - extensions = with (pkgs.vscode-extensions // deprekages.vscode-extensions); [ - # Requires a qualified name due to the leading '1'. - (author "1Password").op-vscode + # appearance + oderwat.indent-rainbow + brandonkirbyson.solarized-palenight - # appearance - oderwat.indent-rainbow - brandonkirbyson.solarized-palenight + # behavior + usernamehw.errorlens + asvetliakov.vscode-neovim + editorconfig.editorconfig - # behavior - #gregoire.dance - usernamehw.errorlens - reykjalin.vscode-kakoune - editorconfig.editorconfig + # general add-ons + adpyke.codesnap + ms-toolsai.jupyter + ms-vscode.hexeditor + ms-vscode.cmake-tools + ms-vscode.makefile-tools + streetsidesoftware.code-spell-checker - # general add-ons - adpyke.codesnap - ms-toolsai.jupyter - ms-vscode.hexeditor - ms-vscode.cmake-tools - ms-vscode.makefile-tools - streetsidesoftware.code-spell-checker + # nix + jnoortheen.nix-ide + arrterian.nix-env-selector + brettm12345.nixfmt-vscode - # nix - jnoortheen.nix-ide - arrterian.nix-env-selector - brettm12345.nixfmt-vscode - - # rust - fill-labs.dependi - rust-lang.rust-analyzer + # rust + fill-labs.dependi + rust-lang.rust-analyzer njpwerner.autodocstring - # python - (forceArmLinux ms-python.python) + # python + (forceArmLinux ms-python.python) # c/c++ ms-vscode.cpptools - # misc languages + # misc languages golang.go - graphql.vscode-graphql - graphql.vscode-graphql-syntax + graphql.vscode-graphql + graphql.vscode-graphql-syntax - # accessibility / talon, for when our neuro condition is wonk - pokey.talon - pokey.cursorless - pokey.parse-tree - pokey.command-server + # accessibility / talon, for when our neuro condition is wonk + pokey.talon + pokey.cursorless + pokey.parse-tree + pokey.command-server - ]; + ]; - # - # Keybindings. - # - keybindings = [ + # + # Keybindings. + # + keybindings = [ { - key = "shift shift"; - command = "workbench.action.quickOpen"; + key = "shift shift"; + command = "workbench.action.quickOpen"; } { - key = "alt alt"; - command = "workbench.action.quickOpen"; + key = "alt alt"; + command = "workbench.action.quickOpen"; } { - key = "ctrl ctrl"; - command = "workbench.action.showCommands"; + key = "ctrl ctrl"; + command = "workbench.action.showCommands"; } ]; - # - # VSCode settings; runtime settings are immutable. - # - userSettings = { + # + # VSCode settings; runtime settings are immutable. + # + userSettings = { - # Theming. - "workbench.colorTheme" = lib.mkForce "Solarized-Palenight"; + # Theming. + "workbench.colorTheme" = lib.mkForce "Solarized-Palenight"; - # Default to formatting on save. - "editor.formatOnSave" = true; + # Default to formatting on save. + "editor.formatOnSave" = true; # Curosrless: don't show decorations until asked. "cursorless.showOnStart" = false; @@ -106,15 +112,32 @@ in # mostly focuses around folks using screen readers. "editor.accessibilitySupport" = "off"; - # - # Rust - # - "rust-analyzer.checkOnSave.command" = "clippy"; + # + # Rust + # + "rust-analyzer.checkOnSave.command" = "clippy"; - # - # Spell Checking - # - "cSpell.userWords" = [ + # + # Nix + # + "nix.enableLanguageServer" = true; + "nix.serverPath" = "${nil.nil}/bin/nil"; + "nix.formatterPath" = "${pkgs.nixfmt-rfc-style}/bin/nixfmt"; + "[nix]"."editor.defaultFormatter" = "brettm12345.nixfmt-vscode"; + + # + # Neovim. + # + + # Make it so the plugin is performant. + "extensions.experimental.affinity" = { + "asvetliakov.vscode-neovim" = 1; + }; + + # + # Spell Checking + # + "cSpell.userWords" = [ "serdes" "ktemkin" "kadkins" @@ -124,16 +147,15 @@ in "hieratika" ]; - }; + }; - # - # For now, let Nix manage everything. - # - enableUpdateCheck = false; - enableExtensionUpdateCheck = false; + # + # For now, let Nix manage everything. + # + enableUpdateCheck = false; + enableExtensionUpdateCheck = false; + mutableExtensionsDir = false; - mutableExtensionsDir = false; - - }; + }; } diff --git a/nixos/hosts/trailblazer/default.nix b/nixos/hosts/trailblazer/default.nix index 5b66df6..75dd5eb 100644 --- a/nixos/hosts/trailblazer/default.nix +++ b/nixos/hosts/trailblazer/default.nix @@ -271,7 +271,7 @@ in boot.swraid.enable = true; boot.swraid.mdadmConf = '' - MAILADDR kate@ktemk.in + MAILADDR kate@deprekated.net ARRAY /dev/md/nixos:0 level=raid0 num-devices=2 metadata=1.2 UUID=325ee7dc:7fcc6062:635e902f:af2552dc devices=/dev/nvme0n1p1,/dev/nvme1n1p1 ''; diff --git a/nvim/lua/config/lazy.lua b/nvim/lua/config/lazy.lua index fd269d7..d27d7b6 100644 --- a/nvim/lua/config/lazy.lua +++ b/nvim/lua/config/lazy.lua @@ -11,20 +11,26 @@ require("lazy").setup({ spec = { -- add LazyVim and import its plugins { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.vscode" }, + -- import any extras modules here - -- { import = "lazyvim.plugins.extras.lang.typescript" }, - -- { import = "lazyvim.plugins.extras.lang.json" }, - -- { import = "lazyvim.plugins.extras.ui.mini-animate" }, + -- { import = "lazyvim.plugins.extras.lang.typescript" }, + -- { import = "lazyvim.plugins.extras.lang.json" }, + -- { import = "lazyvim.plugins.extras.ui.mini-animate" }, + -- import/override with your plugins { import = "plugins" }, }, defaults = { + -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup. -- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default. lazy = false, + -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, -- have outdated releases, which may break your Neovim install. version = false, -- always use the latest git commit + -- version = "*", -- try installing the latest stable version for plugins that support semver }, install = { colorscheme = { "tokyonight", "habamax" } }, diff --git a/nvim/lua/plugins/theme.lua b/nvim/lua/plugins/theme.lua index a22b501..f2ed69c 100644 --- a/nvim/lua/plugins/theme.lua +++ b/nvim/lua/plugins/theme.lua @@ -7,7 +7,7 @@ return { vim.cmd([[ colorscheme solarized8 - " Make Solaried8 a biiiit darker. + " Make Solarized8 a biiiit darker. highlight Normal guibg=#001E27 highlight LineNR ctermfg=11 guibg=#0B262D ]])