use nightly neovim, plugin cleanup

This commit is contained in:
iofq 2025-03-13 02:51:48 -05:00
parent 91b6830d9e
commit df59c1b380
8 changed files with 281 additions and 78 deletions

235
flake.lock generated
View file

@ -16,6 +16,38 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
@ -34,6 +66,48 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"neovim-nightly-overlay",
"nixpkgs"
]
},
"locked": {
"lastModified": 1741352980,
"narHash": "sha256-+u2UunDA4Cl5Fci3m7S643HzKmIDAe+fiXrLqYsR2fs=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "f4330d22f1c5d2ba72d3d22df5597d123fdb60a9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": [
"neovim-nightly-overlay",
"hercules-ci-effects",
"nixpkgs"
]
},
"locked": {
"lastModified": 1738453229,
"narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd",
"type": "github"
},
"original": {
"id": "flake-parts",
"type": "indirect"
}
},
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@ -99,6 +173,29 @@
"type": "github" "type": "github"
} }
}, },
"git-hooks_2": {
"inputs": {
"flake-compat": "flake-compat_3",
"gitignore": "gitignore_2",
"nixpkgs": [
"neovim-nightly-overlay",
"nixpkgs"
]
},
"locked": {
"lastModified": 1741379162,
"narHash": "sha256-srpAbmJapkaqGRE3ytf3bj4XshspVR5964OX5LfjDWc=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "b5a62751225b2f62ff3147d0a334055ebadcd5cc",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": { "gitignore": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -121,6 +218,50 @@
"type": "github" "type": "github"
} }
}, },
"gitignore_2": {
"inputs": {
"nixpkgs": [
"neovim-nightly-overlay",
"git-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"hercules-ci-effects": {
"inputs": {
"flake-parts": "flake-parts_3",
"nixpkgs": [
"neovim-nightly-overlay",
"nixpkgs"
]
},
"locked": {
"lastModified": 1739595404,
"narHash": "sha256-0CjCfbq0yHWexOrpO06e2WU1r5JAqR6ffy1zgM3NksI=",
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"rev": "06519cec8fb32d219006da6eacd255504a9996af",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"type": "github"
}
},
"luvit-meta": { "luvit-meta": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -137,18 +278,58 @@
"type": "github" "type": "github"
} }
}, },
"neovim-nightly-overlay": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-parts": "flake-parts_2",
"git-hooks": "git-hooks_2",
"hercules-ci-effects": "hercules-ci-effects",
"neovim-src": "neovim-src",
"nixpkgs": "nixpkgs",
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1741738202,
"narHash": "sha256-S98JgCHJJFBI9XFXPdn/ATjux6JfrjLN7jGHEGvxsYM=",
"owner": "nix-community",
"repo": "neovim-nightly-overlay",
"rev": "6e291160fc740378dc846f9bb402653c4e50a313",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "neovim-nightly-overlay",
"type": "github"
}
},
"neovim-src": {
"flake": false,
"locked": {
"lastModified": 1741737177,
"narHash": "sha256-MxPM5FawrHrUywZXAHJ4+0+Wj4dITHDMHKf4aIwC9zk=",
"owner": "neovim",
"repo": "neovim",
"rev": "092529ebbf6fe566399aa47c274d708b8dea5334",
"type": "github"
},
"original": {
"owner": "neovim",
"repo": "neovim",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1738680400, "lastModified": 1741678040,
"narHash": "sha256-ooLh+XW8jfa+91F1nhf9OF7qhuA/y1ChLx6lXDNeY5U=", "narHash": "sha256-rmBsz7BBcDwfvDkxnKHmolKceGJrr0nyz5PQYZg0kMk=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "799ba5bffed04ced7067a91798353d360788b30d", "rev": "3ee8818da146871cd570b164fc4f438f78479a50",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-unstable", "ref": "nixpkgs-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -167,11 +348,11 @@
}, },
"nixpkgs-master": { "nixpkgs-master": {
"locked": { "locked": {
"lastModified": 1738831044, "lastModified": 1741842650,
"narHash": "sha256-6y2I2h4hX8d+LXLCzgu7QJ3Wvkx89R0x3WFQ5ovhwco=", "narHash": "sha256-gyA3ngXZroBeWdrVsM+bL63hQMUheYCrC+V78TEgBeU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e4b6440d7ca1649bb95bd59f39b2279db959e498", "rev": "b1f2198021490b51fb92b8b09db97b9ba2a7b4ce",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -197,11 +378,28 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": {
"locked": {
"lastModified": 1741513245,
"narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"gen-luarc": "gen-luarc", "gen-luarc": "gen-luarc",
"nixpkgs": "nixpkgs", "neovim-nightly-overlay": "neovim-nightly-overlay",
"nixpkgs": "nixpkgs_2",
"nixpkgs-master": "nixpkgs-master" "nixpkgs-master": "nixpkgs-master"
} }
}, },
@ -219,6 +417,27 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"neovim-nightly-overlay",
"nixpkgs"
]
},
"locked": {
"lastModified": 1739829690,
"narHash": "sha256-mL1szCeIsjh6Khn3nH2cYtwO5YXG6gBiTw1A30iGeDU=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "3d0579f5cc93436052d94b73925b48973a104204",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -5,6 +5,7 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-master.url = "github:NixOS/nixpkgs/master"; nixpkgs-master.url = "github:NixOS/nixpkgs/master";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
gen-luarc = { gen-luarc = {
url = "github:mrcjkb/nix-gen-luarc-json"; url = "github:mrcjkb/nix-gen-luarc-json";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -31,6 +32,7 @@
inherit system; inherit system;
overlays = [ overlays = [
neovim-overlay neovim-overlay
inputs.neovim-nightly-overlay.overlays.default
gen-luarc.overlays.default gen-luarc.overlays.default
]; ];
}; };

View file

@ -2,8 +2,7 @@
{inputs}: final: prev: {inputs}: final: prev:
with final.pkgs.lib; let with final.pkgs.lib; let
pkgs = final; pkgs = final;
pkgs-wrapNeovim = prev;
pkgs-wrapNeovim = inputs.nixpkgs.legacyPackages.${pkgs.system};
mkNvimPlugin = src: pname: mkNvimPlugin = src: pname:
pkgs.vimUtils.buildVimPlugin { pkgs.vimUtils.buildVimPlugin {
@ -14,9 +13,7 @@ with final.pkgs.lib; let
all-plugins = with pkgs.vimPlugins; [ all-plugins = with pkgs.vimPlugins; [
aerial-nvim aerial-nvim
inputs.nixpkgs-master.legacyPackages.${pkgs.system}.vimPlugins.blink-cmp blink-cmp
blink-cmp-copilot
blink-compat
blink-ripgrep-nvim blink-ripgrep-nvim
codecompanion-nvim codecompanion-nvim
copilot-lua copilot-lua
@ -27,7 +24,6 @@ with final.pkgs.lib; let
lazy-nvim lazy-nvim
luasnip luasnip
mini-nvim mini-nvim
neogen
neogit neogit
none-ls-nvim none-ls-nvim
nightfox-nvim nightfox-nvim
@ -65,9 +61,6 @@ with final.pkgs.lib; let
python312Packages.jedi-language-server python312Packages.jedi-language-server
ruby-lsp ruby-lsp
# debuggers
delve
#other #other
jujutsu jujutsu
]; ];

View file

@ -80,6 +80,7 @@ vim.diagnostic.config {
-- random keymaps -- random keymaps
vim.keymap.set('n', 'gq', vim.cmd.bdelete, { silent = true }) vim.keymap.set('n', 'gq', vim.cmd.bdelete, { silent = true })
vim.keymap.set('n', 'gQ', '<cmd>%bd|e#', { silent = true })
vim.keymap.set('n', 'gt', vim.cmd.bnext, { silent = true }) vim.keymap.set('n', 'gt', vim.cmd.bnext, { silent = true })
vim.keymap.set('n', 'gr', vim.cmd.bprev, { silent = true }) vim.keymap.set('n', 'gr', vim.cmd.bprev, { silent = true })
vim.keymap.set('n', 'tr', 'gT', { noremap = true, silent = true }) vim.keymap.set('n', 'tr', 'gT', { noremap = true, silent = true })

View file

@ -11,14 +11,22 @@ return {
} }
}, },
opts = { opts = {
panel = { enabled = true, keymap = { accept = "ga" } }, panel = {
enabled = true,
auto_refresh = true,
keymap = {
jump_prev = "<C-p>",
jump_next = "<C-n>",
accept = "<C-y>",
}
},
suggestion = { suggestion = {
enabled = true, enabled = true,
auto_trigger = true, auto_trigger = true,
hide_during_completion = true,
keymap = { keymap = {
accept = "<M-]>", accept = "<M-]>",
next = "<M-[>", next = "<M-[>",
dismiss = "<C-]>",
}, },
}, },
completion = { completion = {
@ -60,25 +68,11 @@ return {
"zbirenbaum/copilot.lua", "zbirenbaum/copilot.lua",
}, },
opts = { opts = {
-- adapters = {
-- copilot = function()
-- return require("codecompanion.adapters").extend("copilot", {
-- schema = {
-- model = {
-- default = "claude-3.5-sonnet"
-- },
-- },
-- })
-- end
-- },
strategies = { strategies = {
chat = { adapter = "copilot", }, chat = { adapter = "copilot", },
inline = { adapter = "copilot", }, inline = { adapter = "copilot", },
}, },
}, },
init = function()
vim.api.nvim_create_user_command('CC', ':CodeCompanion', {})
end,
keys = { keys = {
{ {
'<leader>ac', '<leader>ac',
@ -90,12 +84,14 @@ return {
'<leader>as', '<leader>as',
'<cmd>CodeCompanionChat Add<CR>', '<cmd>CodeCompanionChat Add<CR>',
noremap = true, noremap = true,
mode = { "n", "v" },
desc = 'Copilot chat add selection' desc = 'Copilot chat add selection'
}, },
{ {
'<leader>aa', '<leader>aa',
'<cmd>CodeCompanionActions<CR>', '<cmd>CodeCompanionActions<CR>',
noremap = true, noremap = true,
mode = { "n", "v" },
desc = 'Copilot inline' desc = 'Copilot inline'
} }
} }

View file

@ -3,28 +3,9 @@ return {
'saghen/blink.cmp', 'saghen/blink.cmp',
event = "VeryLazy", event = "VeryLazy",
dependencies = { dependencies = {
'saghen/blink.compat',
'rafamadriz/friendly-snippets', 'rafamadriz/friendly-snippets',
'giuxtaposition/blink-cmp-copilot',
'mikavilpas/blink-ripgrep.nvim' 'mikavilpas/blink-ripgrep.nvim'
}, },
config = function(_, opts)
require('blink.cmp').setup(opts)
vim.api.nvim_create_autocmd('User', {
pattern = 'BlinkCmpMenuOpen',
callback = function()
require("copilot.suggestion").dismiss()
vim.b.copilot_suggestion_hidden = true
end,
})
vim.api.nvim_create_autocmd('User', {
pattern = 'BlinkCmpMenuClose',
callback = function()
vim.b.copilot_suggestion_hidden = false
end,
})
end,
opts = { opts = {
sources = { sources = {
default = { default = {
@ -33,24 +14,22 @@ return {
"snippets", "snippets",
"buffer", "buffer",
"ripgrep", "ripgrep",
"copilot"
}, },
providers = { providers = {
ripgrep = { ripgrep = {
module = "blink-ripgrep", module = "blink-ripgrep",
name = "rg", name = "rg",
score_offset = -10, score_offset = -10,
},
copilot = {
name = "copilot",
module = "blink-cmp-copilot",
score_offset = 100,
async = true, async = true,
}, },
} }
}, },
keymap = { cmdline = {
["<C-space>"] = { "show", "select_and_accept" } completion = {
menu = {
auto_show = true,
},
},
}, },
completion = { completion = {
documentation = { documentation = {
@ -63,14 +42,10 @@ return {
auto_insert = true, auto_insert = true,
} }
}, },
accept = { ghost_text = {
auto_brackets = { enabled = true,
enabled = true
}
}, },
menu = { menu = {
-- auto show in cmdline
auto_show = true,
draw = { draw = {
treesitter = { "lsp" }, treesitter = { "lsp" },
columns = { columns = {
@ -80,12 +55,9 @@ return {
} }
}, },
trigger = { trigger = {
show_on_keyword = false, show_on_keyword = true,
} }
}, },
appearance = {
use_nvim_cmp_as_default = true,
},
signature = { enabled = true } signature = { enabled = true }
} }
}, },

View file

@ -4,11 +4,6 @@ return {
event = "InsertEnter", event = "InsertEnter",
config = true config = true
}, },
{
'danymat/neogen',
event = 'VeryLazy',
config = true,
},
{ {
'jinh0/eyeliner.nvim', 'jinh0/eyeliner.nvim',
event = 'VeryLazy', event = 'VeryLazy',

View file

@ -25,6 +25,10 @@ return {
files = { hidden = true }, files = { hidden = true },
grep = { hidden = true }, grep = { hidden = true },
explorer = { hidden = true }, explorer = { hidden = true },
git_files = { untracked = true },
smart = {
multi = { "buffers", "recent", "files", "git_files" }
}
}, },
}, },
actions = { actions = {
@ -53,14 +57,20 @@ return {
vim.api.nvim_set_hl(0, 'SnacksPickerDir', { fg = '#cccccc' }) vim.api.nvim_set_hl(0, 'SnacksPickerDir', { fg = '#cccccc' })
end, end,
keys = { keys = {
{ '<C-\\>', function() Snacks.terminal.toggle() end, mode = { "n", "t" }, noremap = true, desc = 'terminal open' }, { '<C-\\>', function() Snacks.terminal.toggle() end, mode = { "n", "t" }, noremap = true, desc = 'terminal open' },
{ 'm', function() Snacks.words.jump(1, true) end, noremap = true, desc = 'next reference' }, { '<leader>t', function() Snacks.terminal.toggle('$SHELL') end, mode = { "n", "t" }, noremap = true, desc = 'terminal open' },
{ 'M', function() Snacks.words.jump(-1, true) end, noremap = true, desc = 'next reference' }, { 'm', function() Snacks.words.jump(1, true) end, noremap = true, desc = 'next reference' },
{ 'M', function() Snacks.words.jump(-1, true) end, noremap = true, desc = 'next reference' },
{ {
'<leader>ff', '<leader>ff',
function() Snacks.picker.smart() end, function() Snacks.picker.smart() end,
{ noremap = true, silent = true, desc = 'Fuzzy find files' } { noremap = true, silent = true, desc = 'Fuzzy find files' }
}, },
{
'<leader>fe',
function() Snacks.picker.explorer() end,
{ noremap = true, silent = true, desc = 'snacks explorer' }
},
{ {
'<leader>fg', '<leader>fg',
function() Snacks.picker.files() end, function() Snacks.picker.files() end,
@ -81,6 +91,16 @@ return {
function() Snacks.picker.pickers() end, function() Snacks.picker.pickers() end,
{ noremap = true, silent = true, desc = 'See all pickers' } { noremap = true, silent = true, desc = 'See all pickers' }
}, },
{
'<leader>fd',
function() Snacks.picker.diagnostics() end,
{ noremap = true, silent = true, desc = 'Pick diagnostics' }
},
{
'<leader>fj',
function() Snacks.picker.jumps() end,
{ noremap = true, silent = true, desc = 'Pick jumps' }
},
{ {
'<leader>f.', '<leader>f.',
function() Snacks.picker.resume() end, function() Snacks.picker.resume() end,
@ -91,6 +111,11 @@ return {
function() Snacks.picker.buffers() end, function() Snacks.picker.buffers() end,
{ noremap = true, silent = true, desc = 'Fuzzy find buffers' } { noremap = true, silent = true, desc = 'Fuzzy find buffers' }
}, },
{
'<leader>fn',
function() Snacks.picker.notifications() end,
{ noremap = true, silent = true, desc = 'pick notifications' }
},
} }
} }
} }