diff --git a/config/nix/common/home.nix b/config/nix/common/home.nix index a3f1531a..efb68ecb 100644 --- a/config/nix/common/home.nix +++ b/config/nix/common/home.nix @@ -13,6 +13,7 @@ in { home.packages = with pkgs; [ + sqls vcpkg # vcpkg-tool file diff --git a/config/nix/common/nvim/default.nix b/config/nix/common/nvim/default.nix index a12832cb..4e000328 100644 --- a/config/nix/common/nvim/default.nix +++ b/config/nix/common/nvim/default.nix @@ -29,7 +29,7 @@ nil = { enable = true; extraConfig = - # lua + /* lua */ '' settings = { ['nil'] = { @@ -48,6 +48,15 @@ lua-language-server.enable = true; jsonls.enable = true; html.enable = true; + pylyzer.enable = true; + sqls = { + enable = true; + onAttachExtra = + /* lua */ + '' + require('sqls').on_attach(client, bufnr) + ''; + }; # rust-analyzer.enable = true; }; extraLua.pre = @@ -117,16 +126,18 @@ "ee" = "[[RestNvim]]"; "ec" = "[[RestNvimPreview]]"; "\\\"" = ''[["+]]''; - "" = "''"; - "vff" = "'vertical Gdiffsplit'"; + "vff" = "[[vertical Gdiffsplit]]"; "" = "vim.lsp.buf.definition"; "gi" = "vim.lsp.buf.implementation"; "a" = "vim.lsp.buf.code_action"; "F" = "function() vim.lsp.buf.format({ async = true }) end"; - "" = "'copilot#Accept(\"\")'"; + + "" = "''"; "q" = "[[bw]]"; "n" = "[[bnext]]"; "p" = "[[bprev]]"; + + "" = "[[Outline]]"; }; }; @@ -140,6 +151,9 @@ telescope-dap-nvim rustaceanvim + # Treesitter stuff + outline-nvim + # lsp stuff nvim-cmp cmp-buffer @@ -156,6 +170,7 @@ lsp-zero-nvim trouble-nvim crates-nvim + sqls-nvim # No more postman rest-nvim diff --git a/config/nix/common/nvim/extraConfig.lua b/config/nix/common/nvim/extraConfig.lua index 9c5e8284..504afba1 100644 --- a/config/nix/common/nvim/extraConfig.lua +++ b/config/nix/common/nvim/extraConfig.lua @@ -114,7 +114,7 @@ cmp.setup.filetype('gitcommit', { }) }) require('crates').setup() - +require('outline').setup() require("noice").setup({ lsp = { -- override markdown rendering so that **cmp** and other plugins use **Treesitter** diff --git a/config/nix/common/wezterm.nix b/config/nix/common/wezterm.nix index 3f47ac02..ee654b52 100644 --- a/config/nix/common/wezterm.nix +++ b/config/nix/common/wezterm.nix @@ -1,7 +1,8 @@ { pkgs, ... }: { programs.wezterm = { enable = true; - extraConfig = # lua + extraConfig = + /* lua */ '' local wezterm = require 'wezterm'; return { diff --git a/config/nix/flake.lock b/config/nix/flake.lock index 7bfdc435..0e62626e 100644 --- a/config/nix/flake.lock +++ b/config/nix/flake.lock @@ -395,24 +395,6 @@ "type": "github" } }, - "flake-utils_8": { - "inputs": { - "systems": "systems_8" - }, - "locked": { - "lastModified": 1689068808, - "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "gitignore": { "inputs": { "nixpkgs": [ @@ -691,28 +673,6 @@ "type": "github" } }, - "nix-github-actions_2": { - "inputs": { - "nixpkgs": [ - "nixneovimplugins", - "poetry2nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1688870561, - "narHash": "sha256-4UYkifnPEw1nAzqqPOTL2MvWtm3sNGw1UTYTalkTcGY=", - "owner": "nix-community", - "repo": "nix-github-actions", - "rev": "165b1650b753316aa7f1787f3005a8d2da0f5301", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nix-github-actions", - "type": "github" - } - }, "nixneovim": { "inputs": { "flake-utils": "flake-utils_7", @@ -727,16 +687,16 @@ "nmt": "nmt" }, "locked": { - "lastModified": 1709513017, - "narHash": "sha256-Ch86BJ023rvYI4bHAeLKkY6ctQIXMJ+NOVKYo3+SEjQ=", - "owner": "nixneovim", - "repo": "nixneovim", - "rev": "80485170869551e50a405e61bb3b37bf17319c98", + "lastModified": 1709737441, + "narHash": "sha256-SM68Sn82qk8osLkpIcvE8Z4iE8C6dWcAdig8TZz2QKM=", + "owner": "uttarayan21", + "repo": "NixNeovim", + "rev": "21961ef3fd7193aba8ec76572ce7d5d2e79d027f", "type": "github" }, "original": { - "owner": "nixneovim", - "repo": "nixneovim", + "owner": "uttarayan21", + "repo": "NixNeovim", "type": "github" } }, @@ -766,28 +726,6 @@ "type": "github" } }, - "nixneovimplugins_2": { - "inputs": { - "flake-utils": "flake-utils_8", - "nixpkgs": [ - "nixpkgs" - ], - "poetry2nix": "poetry2nix_2" - }, - "locked": { - "lastModified": 1709475467, - "narHash": "sha256-lGTtQyGkR1/XIwIQiPFLgtawrMn5DedbAH+Qn5Vk+Zg=", - "owner": "NixNeovim", - "repo": "NixNeovimPlugins", - "rev": "f830c560c66a489f84d165efb5fbc6659718fc83", - "type": "github" - }, - "original": { - "owner": "NixNeovim", - "repo": "NixNeovimPlugins", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1706487304, @@ -975,32 +913,6 @@ "type": "github" } }, - "poetry2nix_2": { - "inputs": { - "flake-utils": [ - "nixneovimplugins", - "flake-utils" - ], - "nix-github-actions": "nix-github-actions_2", - "nixpkgs": [ - "nixneovimplugins", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1689849924, - "narHash": "sha256-d259Z2S7CS7Na04qQNQ6LYQILuI7cf4Rpe76qc4mz40=", - "owner": "nix-community", - "repo": "poetry2nix", - "rev": "1d7eda9336f336392d24e9602be5cb9be7ae405c", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "poetry2nix", - "type": "github" - } - }, "pre-commit-hooks-nix": { "inputs": { "flake-compat": [ @@ -1045,7 +957,6 @@ "neovim-nightly-overlay": "neovim-nightly-overlay", "nix-darwin": "nix-darwin", "nixneovim": "nixneovim", - "nixneovimplugins": "nixneovimplugins_2", "nixpkgs": "nixpkgs_5", "nur": "nur" } @@ -1239,21 +1150,6 @@ "repo": "default", "type": "github" } - }, - "systems_8": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } } }, "root": "root", diff --git a/config/nix/flake.nix b/config/nix/flake.nix index e4d8341f..66f7ac75 100644 --- a/config/nix/flake.nix +++ b/config/nix/flake.nix @@ -48,14 +48,15 @@ }; nixneovim = { - url = "github:nixneovim/nixneovim"; + # url = "github:nixneovim/nixneovim"; + url = "github:uttarayan21/NixNeovim"; inputs.nixpkgs.follows = "nixpkgs"; }; - nixneovimplugins = { - url = "github:NixNeovim/NixNeovimPlugins"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + # nixneovimplugins = { + # url = "github:NixNeovim/NixNeovimPlugins"; + # inputs.nixpkgs.follows = "nixpkgs"; + # }; nur.url = "github:nix-community/nur"; @@ -78,8 +79,16 @@ }; - outputs = { nixpkgs, home-manager, nix-darwin, flake-utils, anyrun, nur - , neovim-nightly-overlay, ... }@inputs: + outputs = + { nixpkgs + , home-manager + , nix-darwin + , flake-utils + , anyrun + , nur + , neovim-nightly-overlay + , ... + }@inputs: let config_devices = [ { @@ -146,6 +155,24 @@ sha256 = "sha256-S1LJXmShhpCJIg/FEPx3jFbmPpS/1U4MAQN2RY/nkI0"; }; }; + sqls-nvim = final.pkgs.vimUtils.buildVimPlugin { + name = "sqls-nvim"; + src = final.pkgs.fetchFromGitHub { + owner = "nanotee"; + repo = "sqls.nvim"; + rev = "master"; + sha256 = "sha256-jKFut6NZAf/eIeIkY7/2EsjsIhvZQKCKAJzeQ6XSr0s"; + }; + }; + outline-nvim = final.pkgs.vimUtils.buildVimPlugin { + name = "outline-nvim"; + src = final.pkgs.fetchFromGitHub { + owner = "hedyhli"; + repo = "outline.nvim"; + rev = "master"; + sha256 = "sha256-HaxfnvgFy7fpa2CS7/dQhf6dK9+Js7wP5qGdIeXLGPY"; + }; + }; }; }; @@ -177,23 +204,27 @@ inputs.neovim-nightly-overlay.overlay anyrun-overlay inputs.nixneovim.overlays.default - inputs.nixneovimplugins.overlays.default + # inputs.nixneovimplugins.overlays.default nur.overlay ]; - in { - nixosConfigurations = let devices = nixos_devices; - in import ./nixos/device.nix { - inherit devices inputs nixpkgs home-manager overlays nur; - }; + in + { + nixosConfigurations = + let devices = nixos_devices; + in import ./nixos/device.nix { + inherit devices inputs nixpkgs home-manager overlays nur; + }; - darwinConfigurations = let devices = darwin_devices; - in import ./darwin/device.nix { - inherit devices inputs nixpkgs home-manager overlays nix-darwin; - }; + darwinConfigurations = + let devices = darwin_devices; + in import ./darwin/device.nix { + inherit devices inputs nixpkgs home-manager overlays nix-darwin; + }; - homeConfigurations = let devices = linux_devices; - in import ./linux/device.nix { - inherit devices inputs nixpkgs home-manager overlays; - }; + homeConfigurations = + let devices = linux_devices; + in import ./linux/device.nix { + inherit devices inputs nixpkgs home-manager overlays; + }; }; }