From a21b64f0d4fa54140c733b6e49e18a445be0b4c7 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Fri, 7 Mar 2025 16:01:52 +0100 Subject: [PATCH] Fix autocompletion --- flake.lock | 54 +++++++++++++++++++------------------- nvim/lua/plugins/blink.lua | 7 +++++ nvim/lua/settings.lua | 7 ++++- 3 files changed, 40 insertions(+), 28 deletions(-) diff --git a/flake.lock b/flake.lock index 98a8bde..088f5fa 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1740965880, - "narHash": "sha256-ltryXsq+EFbvq5+YNti0C7RRZAK+y43iPl6viRpPf/Y=", + "lastModified": 1741340151, + "narHash": "sha256-SJ/m4Go4tSj8BnKLGwnLT6yN2pdlewepuXPmaDrzuK4=", "owner": "aylur", "repo": "astal", - "rev": "4b283b0045c0752c36c6e8306fc137f2c9f244a4", + "rev": "e14e19c220575446c4a0e815705c88b28e3850e0", "type": "github" }, "original": { @@ -174,11 +174,11 @@ "zig2nix": "zig2nix" }, "locked": { - "lastModified": 1741102560, - "narHash": "sha256-ICmSAbBjPlvTTjs6QH4dO2yZ96tZOY6Zppk6vtrcIks=", + "lastModified": 1741213203, + "narHash": "sha256-3/z39Y2AuLIm2OKWDAR1iPi1uo+LZju1XwW2NAxKUcY=", "owner": "mitchellh", "repo": "ghostty", - "rev": "66e8d919572fddc5fd145eb563a555deeb249b35", + "rev": "e07b6fdf6ba342eb1fc4321c26fe5a6475be5133", "type": "github" }, "original": { @@ -261,11 +261,11 @@ ] }, "locked": { - "lastModified": 1741128660, - "narHash": "sha256-GWaZ+KGxWYbOB15CSqktwngq0ccA1l2Ov3aUfl9jeY4=", + "lastModified": 1741345870, + "narHash": "sha256-KTpoO4oaucdFr3oJJBYpGK+aWVVrLvtiT17EQE7Cf4Y=", "owner": "nix-community", "repo": "home-manager", - "rev": "b1b964ea9348aef08cab514fa88e9c99def6fd63", + "rev": "04c915bcf1a1eac3519372ff3185beef053fba7c", "type": "github" }, "original": { @@ -319,11 +319,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1741159564, - "narHash": "sha256-SXjSaX2Agy9oONequfczrE2+qYvtgbkdEF6kOhYucw8=", + "lastModified": 1741306000, + "narHash": "sha256-qaDw0TyUceZBLntPBOdd1642T/mBGMNtK5NBuv2gWiY=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "47bbefa4a891d3e7b6d9d7d8c1072e81fe37b066", + "rev": "c1855b306b8eeb70118b3ba70471188a65e694e7", "type": "github" }, "original": { @@ -335,11 +335,11 @@ "neovim-src": { "flake": false, "locked": { - "lastModified": 1741128696, - "narHash": "sha256-RCa34CymWRHACNKDYadetTvFpxE9F2yYwQLNOfCbUgU=", + "lastModified": 1741302428, + "narHash": "sha256-zcgucpL/rgEC/IIii6R4NvmtJsYT+/F0ub1FQOWVv0Q=", "owner": "neovim", "repo": "neovim", - "rev": "b0341136c1c92790d599ae361d0d91952a52f0a2", + "rev": "e46f07b1d2942c7b5c08fca9a4cac735ee2c0c71", "type": "github" }, "original": { @@ -355,11 +355,11 @@ ] }, "locked": { - "lastModified": 1741112248, - "narHash": "sha256-Y340xoE1Vgo0eCDJi4srVjuwlr50vYSoyJrZeXHw3n0=", + "lastModified": 1741229100, + "narHash": "sha256-0HwrTDXp9buEwal/1ymK9uQmzUD5ozIA7CJGqnT/gLs=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "991bb2f6d46fc2ff7990913c173afdb0318314cb", + "rev": "adf5c88ba1fe21af5c083b4d655004431f20c5ab", "type": "github" }, "original": { @@ -390,11 +390,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1740646007, - "narHash": "sha256-dMReDQobS3kqoiUCQIYI9c0imPXRZnBubX20yX/G5LE=", + "lastModified": 1741325094, + "narHash": "sha256-RUAdT8dZ6k/486vnu3tiNRrNW6+Q8uSD2Mq7gTX4jlo=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "009b764ac98a3602d41fc68072eeec5d24fc0e49", + "rev": "b48cc4dab0f9711af296fc367b6108cf7b8ccb16", "type": "github" }, "original": { @@ -412,11 +412,11 @@ ] }, "locked": { - "lastModified": 1740567864, - "narHash": "sha256-eTS2wrC1jKR6PKXC9jZqQy5PwqbIOBLSLF3dwLiFJ8M=", + "lastModified": 1741192150, + "narHash": "sha256-wB140alXVla1Rw/kENerUoma2qO1Jy5IYWbmiSqmJu0=", "owner": "nix-community", "repo": "NixOS-WSL", - "rev": "1f40b43d01626ce994eb47150afa0d7215f396ca", + "rev": "0e4ccdb8181da2c6193c047b50ffee5f1a3b6dc1", "type": "github" }, "original": { @@ -427,11 +427,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1741010256, - "narHash": "sha256-WZNlK/KX7Sni0RyqLSqLPbK8k08Kq7H7RijPJbq9KHM=", + "lastModified": 1741246872, + "narHash": "sha256-Q6pMP4a9ed636qilcYX8XUguvKl/0/LGXhHcRI91p0U=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ba487dbc9d04e0634c64e3b1f0d25839a0a68246", + "rev": "10069ef4cf863633f57238f179a0297de84bd8d3", "type": "github" }, "original": { diff --git a/nvim/lua/plugins/blink.lua b/nvim/lua/plugins/blink.lua index e948ca7..a7d1dbc 100644 --- a/nvim/lua/plugins/blink.lua +++ b/nvim/lua/plugins/blink.lua @@ -6,6 +6,7 @@ return { keymap = { preset = "default", [""] = { "show", }, + [""] = { "cancel" }, [""] = { "select_and_accept" }, [""] = { "select_prev", "fallback" }, [""] = { "select_next", "fallback" }, @@ -26,6 +27,12 @@ return { }, menu = { max_height = 15, + auto_show = false, + }, + accept = { + auto_brackets = { + enabled = false, + }, }, }, fuzzy = { diff --git a/nvim/lua/settings.lua b/nvim/lua/settings.lua index dda3239..c0dac1a 100644 --- a/nvim/lua/settings.lua +++ b/nvim/lua/settings.lua @@ -36,7 +36,8 @@ vim.opt.listchars = { precedes = "◢", nbsp = "○", } -vim.opt.completeopt = { "menuone", "popup", "noinsert", "fuzzy" } +vim.opt.completeopt = { "menu", "menuone", "popup", "noinsert", "fuzzy" } +vim.opt.completeitemalign = { "kind", "abbr", "menu" } vim.opt.pumheight = 15 vim.opt.spelloptions = { "camel", "noplainbuffer" } @@ -136,6 +137,10 @@ vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, { desc = "Go vim.keymap.set("n", "gD", function() vim.lsp.buf.declaration() end, { desc = "Go to declaration" }) vim.keymap.set("n", "grs", function() vim.lsp.buf.type_definition() end, { desc = "Go to type definition" }) +-- vim.keymap.set({ 'i' }, '', function() +-- vim.lsp.completion.trigger() +-- end, { desc = "Trigger completion" }) + vim.api.nvim_create_autocmd("TextYankPost", { desc = "Highlight when yanking (copying) text",