Przeglądaj źródła

feat(nvim): add Copilot plugin and update LSP/options; desktop: update aerospace and fonts

- Added `copilot.nix` plugin for Neovim with keymap and settings.
- Enabled Copilot in `plugins.nix` imports.
- Updated LSP configuration and options in `lsp.nix` and `options.nix`.
- Updated Aerospace configuration, including focus script and keybindings.
- Updated fonts configuration for desktop (enabled fontconfig, added fonts).
- Updated flake.lock for dependency changes.
Zander Hawke 11 miesięcy temu
rodzic
commit
cda6e2a205

+ 24 - 24
flake.lock

@@ -64,11 +64,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1750993128,
-        "narHash": "sha256-0JLfnaPQ/RYpZzJexMlX5wmiJzbb7qWU/BjVwPbBx5Q=",
+        "lastModified": 1751727024,
+        "narHash": "sha256-0+3JCO+22Ud2395GeEnp+WZedC3f2B3KspH5t+1AUX4=",
         "owner": "cachix",
         "repo": "devenv",
-        "rev": "acaec01e60eb7271eac23fda76c6a3417741d531",
+        "rev": "e33639c0535a8f18db417fd9fb36f180e8a7d27e",
         "type": "github"
       },
       "original": {
@@ -84,11 +84,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1750903843,
-        "narHash": "sha256-Ng9+f0H5/dW+mq/XOKvB9uwvGbsuiiO6HrPdAcVglCs=",
+        "lastModified": 1751607816,
+        "narHash": "sha256-5PtrwjqCIJ4DKQhzYdm8RFePBuwb+yTzjV52wWoGSt4=",
         "owner": "nix-community",
         "repo": "disko",
-        "rev": "83c4da299c1d7d300f8c6fd3a72ac46cb0d59aae",
+        "rev": "da6109c917b48abc1f76dd5c9bf3901c8c80f662",
         "type": "github"
       },
       "original": {
@@ -227,11 +227,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1750973805,
-        "narHash": "sha256-BZXgag7I0rnL/HMHAsBz3tQrfKAibpY2vovexl2lS+Y=",
+        "lastModified": 1751760902,
+        "narHash": "sha256-qBGNn7T/zOgUDQTo/RM/D2oxMkB2x36j3ajvpVanEVs=",
         "owner": "nix-community",
         "repo": "home-manager",
-        "rev": "080e8b48b0318b38143d5865de9334f46d51fce3",
+        "rev": "8b0180dde1d6f4cf632e046309e8f963924dfbd0",
         "type": "github"
       },
       "original": {
@@ -289,11 +289,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1750117611,
-        "narHash": "sha256-LTwASICtyN3AjzlF9l2ZNAIVZqclio3yRcwwZy3QSJA=",
+        "lastModified": 1750955511,
+        "narHash": "sha256-IDB/oh/P63ZTdhgSkey2LZHzeNhCdoKk+4j7AaPe1SE=",
         "owner": "cachix",
         "repo": "nix",
-        "rev": "9e4fc95c388e2223d47da865503dee20d179776a",
+        "rev": "afa41b08df4f67b8d77a8034b037ac28c71c77df",
         "type": "github"
       },
       "original": {
@@ -321,11 +321,11 @@
     },
     "nixpkgs-darwin": {
       "locked": {
-        "lastModified": 1750903198,
-        "narHash": "sha256-63IOb2kjG8VERVnwgoWSrN13bmKeQVoDINOu10/h8iw=",
+        "lastModified": 1751582995,
+        "narHash": "sha256-u7ubvtxdTnFPpV27AHpgoKn7qHuE7sgWgza/1oj5nzA=",
         "owner": "nixos",
         "repo": "nixpkgs",
-        "rev": "ca5542ac5290cdfe15e36f82fb5de02764ade1f0",
+        "rev": "7a732ed41ca0dd64b4b71b563ab9805a80a7d693",
         "type": "github"
       },
       "original": {
@@ -337,11 +337,11 @@
     },
     "nixpkgs-unstable": {
       "locked": {
-        "lastModified": 1750898778,
-        "narHash": "sha256-DXI7+SKDlTyA+C4zp0LoIywQ+BfdH5m4nkuxbWgV4UU=",
+        "lastModified": 1751625545,
+        "narHash": "sha256-4E7wWftF1ExK5ZEDzj41+9mVgxtuRV3wWCId7QAYMAU=",
         "owner": "nixos",
         "repo": "nixpkgs",
-        "rev": "322d8a3c6940039f7cff179a8b09c5d7ca06359d",
+        "rev": "c860cf0b3a0829f0f6cf344ca8de83a2bbfab428",
         "type": "github"
       },
       "original": {
@@ -353,11 +353,11 @@
     },
     "nixpkgs_2": {
       "locked": {
-        "lastModified": 1750838302,
-        "narHash": "sha256-aVkL3/yu50oQzi2YuKo0ceiCypVZpZXYd2P2p1FMJM4=",
+        "lastModified": 1751582995,
+        "narHash": "sha256-u7ubvtxdTnFPpV27AHpgoKn7qHuE7sgWgza/1oj5nzA=",
         "owner": "nixos",
         "repo": "nixpkgs",
-        "rev": "7284e2decc982b81a296ab35aa46e804baaa1cfe",
+        "rev": "7a732ed41ca0dd64b4b71b563ab9805a80a7d693",
         "type": "github"
       },
       "original": {
@@ -377,11 +377,11 @@
         "systems": "systems_2"
       },
       "locked": {
-        "lastModified": 1750512587,
-        "narHash": "sha256-kZqTQEARUkkKDFhECd0MGU4wXCJcxCdh5WeM/yD6oI4=",
+        "lastModified": 1751479430,
+        "narHash": "sha256-ub1Pj+oSrt2bE1tzTRYEwzCFewsc9F7X7RIJooM94MU=",
         "owner": "nix-community",
         "repo": "nixvim",
-        "rev": "b04bcdcbba4aa648903e065ad1907a97d4f7aee9",
+        "rev": "13cc4d84572c5f5d469a3a3454fa2028f78a3137",
         "type": "github"
       },
       "original": {

+ 2 - 2
home/features/desktop/aerospace.nix

@@ -1,4 +1,4 @@
-{ pkgs, config, ... }:
+{ pkgs, config, lib, ... }:
 
 let
   cfg = config.programs.aerospace;
@@ -39,7 +39,7 @@ in
   home.packages = [ aerospace-focus-pkg ];
 
   launchd.agents.aerospace = {
-    enable = true;
+    enable = lib.mkForce true;
     config = {
       ProgramArguments = [
         "${cfg.package}/Applications/AeroSpace.app/Contents/MacOS/AeroSpace"

+ 1 - 1
home/features/desktop/fonts.nix

@@ -3,7 +3,7 @@
   fonts.fontconfig.enable = true;
 
   home.packages = with pkgs; [
-    (nerdfonts.override { fonts = [ "FiraCode" ]; })
+    nerd-fonts.fira-code
     liberation_ttf
   ];
 }

+ 0 - 4
home/features/nvim/lsp.nix

@@ -129,7 +129,6 @@
 
       denols = {
         enable = true;
-        rootDir = "require('lspconfig').util.root_pattern('deno.lock')";
         extraOptions.init_options = {
           lint = true;
           unstable = true;
@@ -146,9 +145,6 @@
       ts_ls = {
         enable = true;
         extraOptions.single_file_support = false;
-        rootDir = ''
-          require('lspconfig').util.root_pattern("tsconfig.json")
-        '';
       };
 
       volar.enable = true;

+ 3 - 0
home/features/nvim/options.nix

@@ -3,6 +3,9 @@
   globals.maplocalleader = " ";
   globals.have_nerd_font = true;
 
+  # Make system clipboard work
+  clipboard.register = "unnamedplus";
+
   opts = {
     # Make line numbers default
     number = true;

+ 1 - 0
home/features/nvim/plugins.nix

@@ -4,6 +4,7 @@
     # ./plugins/avante.nix
     ./plugins/conform.nix
     ./plugins/comment.nix
+    ./plugins/copilot.nix
     ./plugins/fidget.nix
     ./plugins/gitsigns.nix
     ./plugins/indent-blankline.nix

+ 27 - 0
home/features/nvim/plugins/copilot.nix

@@ -0,0 +1,27 @@
+{
+  plugins.copilot-lua.enable = true;
+  plugins.copilot-lua.settings = {
+    suggestion = {
+      enabled = true;
+      auto_trigger = true;
+      accept = false;
+    };
+    panel.enabled = false;
+    filetypes."*" = true;
+  };
+
+  keymaps = [
+    {
+      key = "<S-Tab>";
+      action.__raw = ''
+        if require("copilot.suggestion").is_visible() then
+          require("copilot.suggestion").accept()
+        else
+          vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("<S-Tab>", true, false, true), "n", false)
+        end
+      '';
+      mode = "i";
+      options.silent = true;
+    }
+  ];
+}