completion tweaks

This commit is contained in:
iofq 2025-05-03 20:50:37 -05:00
parent 96a162e9e8
commit fb7e0a930a
8 changed files with 93 additions and 37 deletions

65
flake.lock generated
View file

@ -96,11 +96,11 @@
]
},
"locked": {
"lastModified": 1741352980,
"narHash": "sha256-+u2UunDA4Cl5Fci3m7S643HzKmIDAe+fiXrLqYsR2fs=",
"lastModified": 1743550720,
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "f4330d22f1c5d2ba72d3d22df5597d123fdb60a9",
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
"type": "github"
},
"original": {
@ -249,11 +249,11 @@
]
},
"locked": {
"lastModified": 1742014779,
"narHash": "sha256-I6fG1zrfdLFcp/imGZElig0BJO3YU0QEXLgvwWoOpJ8=",
"lastModified": 1744693102,
"narHash": "sha256-1Z4WPGVky4w3lrhrgs89OKsLzPdtkbi1bPLNFWsoLfY=",
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"rev": "524637ef84c177661690b924bf64a1ce18072a2c",
"rev": "5b6cec51c9ec095a0d3fd4c8eeb53eb5c59ae33e",
"type": "github"
},
"original": {
@ -278,6 +278,22 @@
"type": "github"
}
},
"mini-nvim": {
"flake": false,
"locked": {
"lastModified": 1746264830,
"narHash": "sha256-A3FIyfy/3VUBMPfWd6PLaqAhOAOA5ava0nc4Z9JCKCI=",
"owner": "echasnovski",
"repo": "mini.nvim",
"rev": "ee23e1abc206efc6d6cce19ec8c0a3da7a897035",
"type": "github"
},
"original": {
"owner": "echasnovski",
"repo": "mini.nvim",
"type": "github"
}
},
"neovim-nightly-overlay": {
"inputs": {
"flake-compat": "flake-compat_2",
@ -289,11 +305,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1743898191,
"narHash": "sha256-JCcQDgwYV+C4igYA6DchGpKKA6eyZXLvRrxWHmQbmDk=",
"lastModified": 1746256223,
"narHash": "sha256-a97mwMJcE0cYGfwB5N5v+Ey+by1poGTc/fsrd47Fom8=",
"owner": "nix-community",
"repo": "neovim-nightly-overlay",
"rev": "276567b29d8c9aca7b6a54e93a9183e44a17f19c",
"rev": "02ec02529a5d602a9e9d273531d776d160fae182",
"type": "github"
},
"original": {
@ -305,11 +321,11 @@
"neovim-src": {
"flake": false,
"locked": {
"lastModified": 1743893800,
"narHash": "sha256-i/X0b3b/dAqjNIB5RoryeDvMkVfdoPBwK5xn06W6Wdo=",
"lastModified": 1746214751,
"narHash": "sha256-FlGgG3A9oJwGP0YTWU2Nw9fwdnqPMapjx3twonu0Vkg=",
"owner": "neovim",
"repo": "neovim",
"rev": "28e819018520a2300eaeeec6794ffcd614b25dd2",
"rev": "5a2edc483dff93cc94847b6950713d80a51087c0",
"type": "github"
},
"original": {
@ -320,11 +336,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1743689281,
"narHash": "sha256-y7Hg5lwWhEOgflEHRfzSH96BOt26LaYfrYWzZ+VoVdg=",
"lastModified": 1746152631,
"narHash": "sha256-zBuvmL6+CUsk2J8GINpyy8Hs1Zp4PP6iBWSmZ4SCQ/s=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2bfc080955153be0be56724be6fa5477b4eefabb",
"rev": "032bc6539bd5f14e9d0c51bd79cfe9a055b094c3",
"type": "github"
},
"original": {
@ -364,11 +380,11 @@
},
"nixpkgs-uns": {
"locked": {
"lastModified": 1743827369,
"narHash": "sha256-rpqepOZ8Eo1zg+KJeWoq1HAOgoMCDloqv5r2EAa9TSA=",
"lastModified": 1746232882,
"narHash": "sha256-MHmBH2rS8KkRRdoU/feC/dKbdlMkcNkB5mwkuipVHeQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "42a1c966be226125b48c384171c44c651c236c22",
"rev": "7a2622e2c0dbad5c4493cb268aba12896e28b008",
"type": "github"
},
"original": {
@ -380,11 +396,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1743962461,
"narHash": "sha256-UaulIYZqwVF7CRYsDG6Jt3k3+Qs21yJT2/CLRWT9qzg=",
"lastModified": 1746314326,
"narHash": "sha256-2xqKEdmbFttKUwIxZgQAOG24rNqVvJ7c3LmA+ZnvWlc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "eb77ff4e9c1f071693be92d144f363ef24701039",
"rev": "0eb56ece14bc2e4301f756c342356ceceb90b6f9",
"type": "github"
},
"original": {
@ -398,6 +414,7 @@
"inputs": {
"flake-utils": "flake-utils",
"gen-luarc": "gen-luarc",
"mini-nvim": "mini-nvim",
"neovim-nightly-overlay": "neovim-nightly-overlay",
"nixpkgs": "nixpkgs_2",
"nixpkgs-uns": "nixpkgs-uns"
@ -426,11 +443,11 @@
]
},
"locked": {
"lastModified": 1743748085,
"narHash": "sha256-uhjnlaVTWo5iD3LXics1rp9gaKgDRQj6660+gbUU3cE=",
"lastModified": 1746216483,
"narHash": "sha256-4h3s1L/kKqt3gMDcVfN8/4v2jqHrgLIe4qok4ApH5x4=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "815e4121d6a5d504c0f96e5be2dd7f871e4fd99d",
"rev": "29ec5026372e0dec56f890e50dbe4f45930320fd",
"type": "github"
},
"original": {

View file

@ -10,6 +10,10 @@
url = "github:mrcjkb/nix-gen-luarc-json";
inputs.nixpkgs.follows = "nixpkgs";
};
mini-nvim = {
url = "github:echasnovski/mini.nvim";
flake = false;
};
# Add bleeding-edge plugins here.
# They can be updated with `nix flake update` (make sure to commit the generated flake.lock)
# wf-nvim = {

View file

@ -11,6 +11,8 @@ with final.pkgs.lib; let
};
mkNeovim = pkgs.callPackage ./mkNeovim.nix { inherit pkgs-wrapNeovim; };
mini-nvim-git = mkNvimPlugin inputs.mini-nvim "mini.nvim";
all-plugins = with pkgs.vimPlugins; [
blink-cmp
blink-copilot
@ -20,11 +22,11 @@ with final.pkgs.lib; let
copilot-lua
diffview-nvim
eyeliner-nvim
friendly-snippets
lazy-nvim
mini-nvim
mini-nvim-git
neogit
nightfox-nvim
nvim-autopairs
nvim-lint
nvim-lspconfig
nvim-treesitter-context

View file

@ -56,7 +56,6 @@ vim.diagnostic.config {
}
-- random keymaps
vim.keymap.set({ 'v', 'i' }, 'wq', '<esc>l', { noremap = true, silent = true })
vim.keymap.set('n', '<S-l>', vim.cmd.bnext, { noremap = true, silent = true })
vim.keymap.set('n', '<S-h>', vim.cmd.bprev, { noremap = true, silent = true })
vim.keymap.set('v', '<', '<gv')

View file

@ -18,6 +18,7 @@ return {
'nvim-lua/plenary.nvim',
'nvim-treesitter/nvim-treesitter',
'zbirenbaum/copilot.lua',
'MeanderingProgrammer/render-markdown.nvim',
},
opts = {
strategies = {

View file

@ -7,15 +7,26 @@ return {
'fang2hou/blink-copilot',
},
opts = {
fuzzy = {
sorts = {
'exact',
'score',
'sort_text',
},
},
sources = {
default = {
'lsp',
'path',
'snippets',
'omni',
'ripgrep',
'copilot',
},
providers = {
snippets = {
score_offset = -20,
},
ripgrep = {
module = 'blink-ripgrep',
name = 'rg',
@ -25,10 +36,10 @@ return {
copilot = {
module = 'blink-copilot',
name = 'Copilot',
score_offset = 100,
score_offset = 10,
async = true,
opts = {
max_completions = 3,
max_completions = 2,
debounce = 500,
auto_refresh = {
backward = false,
@ -63,7 +74,12 @@ return {
show_on_keyword = true,
},
},
signature = { enabled = true },
signature = {
enabled = true,
trigger = {
show_on_insert = true,
},
},
},
},
}

View file

@ -85,6 +85,13 @@ return {
prefix = 'gR',
},
}
require('mini.pairs').setup {
modes = { insert = true, command = true, terminal = false },
skip_next = [=[[%w%%%'%[%"%.%`%$]]=],
skip_ts = { 'string' },
skip_unbalanced = true,
markdown = true,
}
require('mini.git').setup()
local align_blame = function(au_data)
if au_data.data.git_subcommand ~= 'blame' then
@ -153,7 +160,15 @@ return {
show_integration_count = false,
},
}
vim.keymap.set('n', '<leader>nm', map.toggle, { noremap = true, desc = 'minimap open' })
local multi = require('mini.keymap').map_multistep
local combo = require('mini.keymap').map_combo
combo({ 'i', 'c', 'x', 's' }, 'wq', '<BS><BS><Esc>l')
multi({ 'i', 's' }, '<Tab>', { 'blink_accept', 'vimsnippet_next', 'jump_after_close', 'jump_after_tsnode' })
multi({ 'i', 's' }, '<S-Tab>', { 'vimsnippet_prev', 'jump_before_open', 'jump_before_tsnode' })
end)
end,
},

View file

@ -1,9 +1,4 @@
return {
{
'windwp/nvim-autopairs',
event = 'InsertEnter',
config = true,
},
{
'stevearc/oil.nvim',
opts = {
@ -38,7 +33,13 @@ return {
end,
},
{ 'tiagovla/scope.nvim', event = 'VeryLazy', config = true },
{ 'MeanderingProgrammer/render-markdown.nvim', event = 'VeryLazy', config = true },
{
'MeanderingProgrammer/render-markdown.nvim',
event = 'VeryLazy',
opts = {
ft = { 'markdown', 'codecompanion ' },
},
},
{
'sindrets/diffview.nvim',
event = 'VeryLazy',
@ -110,6 +111,7 @@ return {
vim.api.nvim_set_hl(0, 'MiniDiffSignAdd', { fg = 'green', bold = true })
vim.api.nvim_set_hl(0, 'MiniDiffSignDelete', { fg = 'red', bold = true })
vim.api.nvim_set_hl(0, 'MiniDiffSignChange', { fg = 'green', bold = true })
vim.api.nvim_set_hl(0, 'BlinkCmpGhostText', { link = 'String' })
end,
},
{