Compare commits

...

3 commits

Author SHA1 Message Date
939e8a45f5
i preferred this 2025-09-28 01:55:05 +08:00
d1a7fafe3a
fix settings 2025-09-28 01:54:46 +08:00
c1c56c6e71
chore: bump inputs 2025-09-28 01:54:11 +08:00
3 changed files with 43 additions and 55 deletions

View file

@ -6,9 +6,6 @@
# Options provided to the require('cmp').setup function. # Options provided to the require('cmp').setup function.
settings = { settings = {
# Disable autocompletion by default
completion.autocomplete = false;
# The sources to use # The sources to use
sources = [ sources = [
# Language Server Protocol # Language Server Protocol
@ -32,31 +29,6 @@
# Key mappings for the completion menu. # Key mappings for the completion menu.
mapping = { mapping = {
# Confirm candidate on TAB immediately when there's only one completion entry
"<Tab>" = /* lua */ ''
cmp.mapping(function(fallback)
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
-- When the selection menu is open select the next item
if cmp.visible() then
cmp.select_next_item({behavior = cmp.SelectBehavior.Select})
-- Ensure we are mid word
elseif col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil then
-- Open the selection menu
cmp.complete()
-- Autocomplete when there is only 1 selection available
if #cmp.get_entries() == 1 then
cmp.confirm({ select = true })
end
-- Select the firt item
cmp.select_next_item({behavior = cmp.SelectBehavior.Select})
-- Keep regular functionality of tab
else
fallback()
end
end, {'i', 's'})
'';
# Confirm selection # Confirm selection
"<CR>" = /* lua */ '' "<CR>" = /* lua */ ''
cmp.mapping.confirm({ select = true }) cmp.mapping.confirm({ select = true })

View file

@ -3,7 +3,7 @@
enable = true; enable = true;
# Configure nvim-tree # Configure nvim-tree
extraOptions = { settings = {
# Set width of nvim-tree # Set width of nvim-tree
view = { view = {
width = 38; width = 38;

68
flake.lock generated
View file

@ -5,11 +5,11 @@
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1743550720, "lastModified": 1756770412,
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "c621e8422220273271f52058f618c94e405bb0f5", "rev": "4524271976b625a4a605beefd893f270620fd751",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -26,11 +26,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1743550720, "lastModified": 1756770412,
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "c621e8422220273271f52058f618c94e405bb0f5", "rev": "4524271976b625a4a605beefd893f270620fd751",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -71,27 +71,27 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1729958008, "lastModified": 1754860581,
"narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=", "narHash": "sha256-EM0IE63OHxXCOpDHXaTyHIOk2cNvMCGPqLt/IdtVxgk=",
"owner": "NuschtOS", "owner": "NuschtOS",
"repo": "ixx", "repo": "ixx",
"rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb", "rev": "babfe85a876162c4acc9ab6fb4483df88fa1f281",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NuschtOS", "owner": "NuschtOS",
"ref": "v0.0.6", "ref": "v0.1.1",
"repo": "ixx", "repo": "ixx",
"type": "github" "type": "github"
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1744098102, "lastModified": 1758690382,
"narHash": "sha256-tzCdyIJj9AjysC3OuKA+tMD/kDEDAF9mICPDU7ix0JA=", "narHash": "sha256-NY3kSorgqE5LMm1LqNwGne3ZLMF2/ILgLpFr1fS4X3o=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c8cd81426f45942bb2906d5ed2fe21d2f19d95b7", "rev": "e643668fd71b949c53f8626614b21ff71a07379d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -103,11 +103,11 @@
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"lastModified": 1743296961, "lastModified": 1754788789,
"narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=", "narHash": "sha256-x2rJ+Ovzq0sCMpgfgGaaqgBSwY+LST+WbZ6TytnT9Rk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs.lib", "repo": "nixpkgs.lib",
"rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa", "rev": "a73b9c743612e4244d865a2fdee11865283c04e6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -118,11 +118,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1744157173, "lastModified": 1758763312,
"narHash": "sha256-bWSjxDwq7iVePrhmA7tY2dyMWHuNJo8knkO4y+q4ZkY=", "narHash": "sha256-puBMviZhYlqOdUUgEmMVJpXqC/ToEqSvkyZ30qQ09xM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6a39c6e495eefabc935d8ddf66aa45d85b85fa3f", "rev": "e57b3b16ad8758fd681511a078f35c416a8cc939",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -136,14 +136,15 @@
"inputs": { "inputs": {
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts_2",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"nuschtosSearch": "nuschtosSearch" "nuschtosSearch": "nuschtosSearch",
"systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1744272522, "lastModified": 1758931855,
"narHash": "sha256-cFuxYOLp/6L0eu5wX7xmaF4VhqEm/aT08awzEHGMMQE=", "narHash": "sha256-jTmbWlOxsy9dDP3UdCB6jEO63FtkM3dQG2FOq0b4foI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "33c3f98fdc9a62183ec7d535bf910e04f141284b", "rev": "e0f1e4ae4bb8762b7c51c3a514ca19664fad9c3b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -162,11 +163,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1743683223, "lastModified": 1758662783,
"narHash": "sha256-LdXtHFvhEC3S64dphap1pkkzwjErbW65eH1VRerCUT0=", "narHash": "sha256-igrxT+/MnmcftPOHEb+XDwAMq3Xg1Xy7kVYQaHhPlAg=",
"owner": "NuschtOS", "owner": "NuschtOS",
"repo": "search", "repo": "search",
"rev": "56a49ffef2908dad1e9a8adef1f18802bc760962", "rev": "7d4c0fc4ffe3bd64e5630417162e9e04e64b27a4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -196,6 +197,21 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"systems_2": {
"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", "root": "root",