Compare commits

...

3 Commits

5 changed files with 56 additions and 22 deletions

View File

@ -82,6 +82,22 @@
"type": "github" "type": "github"
} }
}, },
"copilot-lua": {
"flake": false,
"locked": {
"lastModified": 1677479736,
"narHash": "sha256-n/SCrzzzL5WUHJk0sCXbgGusk/dQuy8DI9Pqdh+lVeQ=",
"owner": "zbirenbaum",
"repo": "copilot.lua",
"rev": "b41d4c9c7d4f5e0272bcf94061b88e244904c56f",
"type": "github"
},
"original": {
"owner": "zbirenbaum",
"repo": "copilot.lua",
"type": "github"
}
},
"crane": { "crane": {
"inputs": { "inputs": {
"flake-compat": [ "flake-compat": [
@ -813,6 +829,7 @@
"arkenfox-userjs": "arkenfox-userjs", "arkenfox-userjs": "arkenfox-userjs",
"asus-touchpad-numpad-driver": "asus-touchpad-numpad-driver", "asus-touchpad-numpad-driver": "asus-touchpad-numpad-driver",
"attic": "attic", "attic": "attic",
"copilot-lua": "copilot-lua",
"emacs": "emacs", "emacs": "emacs",
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_3",
"forgit-git": "forgit-git", "forgit-git": "forgit-git",

View File

@ -83,6 +83,11 @@
inputs.nixpkgs-stable.follows = "stable"; inputs.nixpkgs-stable.follows = "stable";
inputs.flake-utils.follows = "flake-utils"; inputs.flake-utils.follows = "flake-utils";
}; };
copilot-lua = {
url = "github:zbirenbaum/copilot.lua";
flake = false;
};
}; };
outputs = outputs =

View File

@ -8,26 +8,6 @@
with lib; with lib;
let let
cfg = config.my.programs.vim; cfg = config.my.programs.vim;
mkDate = longDate: (lib.concatStringsSep "-" [
(builtins.substring 0 4 longDate)
(builtins.substring 4 2 longDate)
(builtins.substring 6 2 longDate)
]);
mkVersionInput = input: mkDate (input.lastModifiedDate or "19700101") + "_" + (input.shortRev or "dirty");
nvim-treesitter-textsubjects = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "nvim-treesitter-textsubjects";
version = mkVersionInput inputs.nvim-treesitter-textsubjects;
src = inputs.nvim-treesitter-textsubjects;
};
smartcolumn-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "smartcolumn-nvim";
version = mkVersionInput inputs.smartcolumn-nvim;
src = inputs.smartcolumn-nvim;
};
in in
{ {
options.my.programs.vim = { options.my.programs.vim = {

View File

@ -323,7 +323,7 @@ local function lspconfig_setup(lsp, options)
lspconfig[lsp].setup(final_options) lspconfig[lsp].setup(final_options)
end end
local servers = { "nil_ls", "pylsp", "rust_analyzer" } local servers = { "nil_ls", "pylsp", "rust_analyzer", "ruff_lsp" }
for _, lsp in ipairs(servers) do for _, lsp in ipairs(servers) do
lspconfig_setup(lsp, {}) lspconfig_setup(lsp, {})
end end
@ -434,6 +434,10 @@ require("copilot").setup({
suggestion = { enabled = false }, suggestion = { enabled = false },
panel = { enabled = false }, panel = { enabled = false },
}) })
vim.api.nvim_create_autocmd("VimEnter", {
desc = "Disable Copilot by default on startup",
command = "Copilot disable",
})
require("copilot_cmp").setup() require("copilot_cmp").setup()
local orgmode = require("orgmode") local orgmode = require("orgmode")

View File

@ -1,4 +1,13 @@
{ inputs }: final: prev: { { inputs }: final: prev:
let
mkDate = longDate: (prev.lib.concatStringsSep "-" [
(builtins.substring 0 4 longDate)
(builtins.substring 4 2 longDate)
(builtins.substring 6 2 longDate)
]);
mkVersionInput = input: "unstable" + mkDate (input.lastModifiedDate or "19700101") + "_" + (input.shortRev or "dirty");
in
{
agenix = inputs.agenix.packages.${prev.system}.default; agenix = inputs.agenix.packages.${prev.system}.default;
attic = inputs.attic.packages.${prev.system}.default; attic = inputs.attic.packages.${prev.system}.default;
hyprpaper = inputs.hyprpaper.packages.${prev.system}.default; hyprpaper = inputs.hyprpaper.packages.${prev.system}.default;
@ -23,6 +32,25 @@
mesonFlags = old.mesonFlags or [ ] ++ [ "-Dexperimental=true" ]; mesonFlags = old.mesonFlags or [ ] ++ [ "-Dexperimental=true" ];
}); });
vimPlugins = prev.vimPlugins // {
nvim-treesitter-textsubjects = prev.vimUtils.buildVimPluginFrom2Nix {
pname = "nvim-treesitter-textsubjects";
version = mkVersionInput inputs.nvim-treesitter-textsubjects;
src = inputs.nvim-treesitter-textsubjects;
};
smartcolumn-nvim = prev.vimUtils.buildVimPluginFrom2Nix {
pname = "smartcolumn-nvim";
version = mkVersionInput inputs.smartcolumn-nvim;
src = inputs.smartcolumn-nvim;
};
copilot-lua = prev.vimPlugins.copilot-lua.overrideAttrs (old: {
version = mkVersionInput inputs.copilot-lua;
src = inputs.copilot-lua;
});
};
master = import inputs.master { master = import inputs.master {
inherit (prev) system; inherit (prev) system;
config.allowUnfree = true; config.allowUnfree = true;