Compare commits

..

No commits in common. "939e8a45f5f9c3ab32f071a559bca6eceead0d53" and "48b93a848e5132c007cfbd0075f264a7719d75a8" have entirely different histories.

3 changed files with 55 additions and 43 deletions

View file

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