Compare commits

..

2 Commits

5 changed files with 237 additions and 109 deletions

View File

@ -1,7 +1,10 @@
{ {
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json", "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
"Lua.diagnostics.globals": [ "Lua.diagnostics.globals": [
"vim", "vim"
],
"workspace.library": [
], ],
"Lua.workspace.checkThirdParty": false "Lua.workspace.checkThirdParty": false
} }

View File

@ -63,11 +63,11 @@
"cargo-leptos": { "cargo-leptos": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1687673802, "lastModified": 1692633266,
"narHash": "sha256-srP8sBhlAFR//CNCPd5Ek1lianKSZ3dW54d9V5UxqPA=", "narHash": "sha256-1mYaomgi9Ca5yMNEJuIJUEjKcg8jLopK2hcHhjx0F6w=",
"owner": "leptos-rs", "owner": "leptos-rs",
"repo": "cargo-leptos", "repo": "cargo-leptos",
"rev": "4ed1a7b9f87cb853126cf79e386db61e475679a1", "rev": "ba4033f0dfdd7a95bd2254a0a73a6f7381e9a063",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -84,16 +84,15 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1688063586, "lastModified": 1692750383,
"narHash": "sha256-ywshC598IZ31UoP04vHSAR5OT6T8Z8Lsz/MRNQkJiOs=", "narHash": "sha256-n5P5HOXuu23UB1h9PuayldnRRVQuXJLpoO+xqtMO3ws=",
"owner": "pegasust", "owner": "ipetkov",
"repo": "crane", "repo": "crane",
"rev": "cb14ad86d991493dfdc439772d7959e6f50bf46b", "rev": "ef5d11e3c2e5b3924eb0309dba2e1fea2d9062ae",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "pegasust", "owner": "ipetkov",
"ref": "cargo-update",
"repo": "crane", "repo": "crane",
"type": "github" "type": "github"
} }
@ -125,11 +124,11 @@
"systems": "systems_4" "systems": "systems_4"
}, },
"locked": { "locked": {
"lastModified": 1688380630, "lastModified": 1695195896,
"narHash": "sha256-8ilApWVb1mAi4439zS3iFeIT0ODlbrifm/fegWwgHjA=", "narHash": "sha256-pq9q7YsGXnQzJFkR5284TmxrLNFc0wo4NQ/a5E93CQU=",
"owner": "numtide", "owner": "numtide",
"repo": "devshell", "repo": "devshell",
"rev": "f9238ec3d75cefbb2b42a44948c4e8fb1ae9a205", "rev": "05d40d17bf3459606316e3e9ec683b784ff28f16",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -199,8 +198,7 @@
], ],
"nixlib": [ "nixlib": [
"std", "std",
"haumea", "lib"
"nixpkgs"
], ],
"yants": [ "yants": [
"std", "std",
@ -516,11 +514,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1685518550, "lastModified": 1689068808,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -549,11 +547,11 @@
"systems": "systems_2" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1687709756, "lastModified": 1689068808,
"narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -674,11 +672,11 @@
"gnmic": { "gnmic": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1688058431, "lastModified": 1693007125,
"narHash": "sha256-IMX2LT9FQwz5u0XJh1COmPWeWqqEBIunNUXlLsE1CYM=", "narHash": "sha256-qegO+OjorrkHiaBKwXGvJKA08BaDAMpSwZpkWZx+CNE=",
"owner": "openconfig", "owner": "openconfig",
"repo": "gnmic", "repo": "gnmic",
"rev": "8e7d054623c4f7594cf09c64655f0baf307ee6ff", "rev": "7b826d89a5300e1e214a00939ba0395203456408",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -743,7 +741,10 @@
}, },
"haumea_2": { "haumea_2": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_17" "nixpkgs": [
"std",
"lib"
]
}, },
"locked": { "locked": {
"lastModified": 1685133229, "lastModified": 1685133229,
@ -811,11 +812,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1690846837, "lastModified": 1695541620,
"narHash": "sha256-ZZ8YPOEdZG0zz61U4sfUAx28oEdqLdtG1iWTTH/98uc=", "narHash": "sha256-koMm/j4r6lBjGDUhDfYUXFIah8NsBrAEaxYYmYXChls=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "4fd794d3df88735dcf9662155d77b08a2e2dde29", "rev": "835465e8ba2459034e4ab192b1c6db35d1c0d638",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -851,8 +852,7 @@
"inputs": { "inputs": {
"nixlib": [ "nixlib": [
"std", "std",
"haumea", "lib"
"nixpkgs"
] ]
}, },
"locked": { "locked": {
@ -885,17 +885,32 @@
"type": "github" "type": "github"
} }
}, },
"lib": {
"locked": {
"lastModified": 1694306727,
"narHash": "sha256-26fkTOJOI65NOTNKFvtcJF9mzzf/kK9swHzfYt1Dl6Q=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "c30b6a84c0b84ec7aecbe74466033facc9ed103f",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"n2c": { "n2c": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_4", "flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_4" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
"lastModified": 1687467666, "lastModified": 1688922987,
"narHash": "sha256-z9n7ATBXeDqz5a8+4HJ9fhU6KMyg7zZX0wrhLdVG7bQ=", "narHash": "sha256-RnQwrCD5anqWfyDAVbfFIeU+Ha6cwt5QcIwIkaGRzQw=",
"owner": "nlewo", "owner": "nlewo",
"repo": "nix2container", "repo": "nix2container",
"rev": "56e249151911e3d3928b578f5b6c01b16f55c308", "rev": "ab381a7d714ebf96a83882264245dbd34f0a7ec8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -967,11 +982,11 @@
"std": "std" "std": "std"
}, },
"locked": { "locked": {
"lastModified": 1689005484, "lastModified": 1693335368,
"narHash": "sha256-9UpR36YpwU9246rfPOnWI1qyIMjzoOv81IEARaPyuYw=", "narHash": "sha256-ZhTTuiymY+FNQNt8W/nmPqgDcmlBdoTFZAbGasjdvHQ=",
"ref": "bleed", "ref": "bleed",
"rev": "296de75f052d88880414a72c6df6fe3b6a3f603d", "rev": "b21f800444e8f1b20fd49fd6054a4c38ac3c5954",
"revCount": 105, "revCount": 117,
"type": "git", "type": "git",
"url": "https://git.pegasust.com/pegasust/nix-boost" "url": "https://git.pegasust.com/pegasust/nix-boost"
}, },
@ -1004,6 +1019,28 @@
"type": "github" "type": "github"
} }
}, },
"nix-github-actions": {
"inputs": {
"nixpkgs": [
"nix-boost",
"poetry2nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1688870561,
"narHash": "sha256-4UYkifnPEw1nAzqqPOTL2MvWtm3sNGw1UTYTalkTcGY=",
"owner": "nix-community",
"repo": "nix-github-actions",
"rev": "165b1650b753316aa7f1787f3005a8d2da0f5301",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-github-actions",
"type": "github"
}
},
"nix-index-database": { "nix-index-database": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -1011,11 +1048,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1690687539, "lastModified": 1695526222,
"narHash": "sha256-Lnwz9XKtshm+5OeWqCbj/3tKuKK+DL5tUTdKSRrKBlY=", "narHash": "sha256-/NwZz3QcVplrfiDKk1thYg1EIHLSNucVHNUi2uwO3RI=",
"owner": "mic92", "owner": "mic92",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "d74b8171153ae35d7d323a9b1ad6c4cf7a995591", "rev": "25d6369c232bbea1ec1f90226fd17982e7a0a647",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1168,11 +1205,11 @@
}, },
"nixpkgs-latest": { "nixpkgs-latest": {
"locked": { "locked": {
"lastModified": 1690872690, "lastModified": 1695540850,
"narHash": "sha256-vrU9U97zVpq+H4qJ4iywYNmxGbK4Y0bN2Q/vUcgVrQE=", "narHash": "sha256-VEwVwmyZr20LNzUPs4abwM0yRTk+CqEDCE9DHxNP/vk=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "714bd4a3e3cc6d97dea0c658942204ef4d66fce5", "rev": "e556540620ebf01df3cc7a117bc72726ab9cae28",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1267,11 +1304,11 @@
}, },
"nixpkgs_11": { "nixpkgs_11": {
"locked": { "locked": {
"lastModified": 1690789960, "lastModified": 1695360818,
"narHash": "sha256-3K+2HuyGTiJUSZNJxXXvc0qj4xFx1FHC/ItYtEa7/Xs=", "narHash": "sha256-JlkN3R/SSoMTa+CasbxS1gq+GpGxXQlNZRUh9+LIy/0=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "fb942492b7accdee4e6d17f5447091c65897dde4", "rev": "e35dcc04a3853da485a396bdd332217d0ac9054f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1362,21 +1399,6 @@
} }
}, },
"nixpkgs_17": { "nixpkgs_17": {
"locked": {
"lastModified": 1681001314,
"narHash": "sha256-5sDnCLdrKZqxLPK4KA8+f4A3YKO/u6ElpMILvX0g72c=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "367c0e1086a4eb4502b24d872cea2c7acdd557f4",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs_18": {
"locked": { "locked": {
"lastModified": 1675940568, "lastModified": 1675940568,
"narHash": "sha256-epG6pOT9V0kS+FUqd7R6/CWkgnZx2DMT5Veqo+y6G3c=", "narHash": "sha256-epG6pOT9V0kS+FUqd7R6/CWkgnZx2DMT5Veqo+y6G3c=",
@ -1394,11 +1416,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1685714850, "lastModified": 1691371061,
"narHash": "sha256-OcvbIJq4CGwwFr9m7M/SQcDPZ64hhR4t77oZgEeh7ZY=", "narHash": "sha256-BxPbPVlBIoneaXIBiHd0LVzA+L4nmvFCNBU6TmQAiMM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c6ffce3d5df7b4c588ce80a0c6e2d2348a611707", "rev": "5068bc8fe943bde3c446326da8d0ca9c93d5a682",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1441,11 +1463,11 @@
}, },
"nixpkgs_5": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1687898314, "lastModified": 1693003285,
"narHash": "sha256-B4BHon3uMXQw8ZdbwxRK1BmxVOGBV4viipKpGaIlGwk=", "narHash": "sha256-5nm4yrEHKupjn62MibENtfqlP6pWcRTuSKrMiH9bLkc=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e18dc963075ed115afb3e312b64643bf8fd4b474", "rev": "5690c4271f2998c304a45c91a0aeb8fb69feaea7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1563,11 +1585,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1687538786, "lastModified": 1688099125,
"narHash": "sha256-/v5uoRyVSQurJ6W4Zad7vWpdUN+9AO4wm+lv5hgNGwA=", "narHash": "sha256-j6LMz00orEKZrQb14wRRw7kMLm+aj7zBJt05AY4UcRI=",
"owner": "paisano-nix", "owner": "paisano-nix",
"repo": "core", "repo": "core",
"rev": "9683ecfbc05f8c86396f0284d7125fe1567cd8d0", "rev": "10270dc46532c947de473ee88c8f5a3346a396fb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1596,16 +1618,16 @@
"paisano-tui_2": { "paisano-tui_2": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1681847764, "lastModified": 1694014205,
"narHash": "sha256-mdd7PJW1BZvxy0cIKsPfAO+ohVl/V7heE5ZTAHzTdv8=", "narHash": "sha256-u0+T6vMznzfjDMUd01ZXQsrQPMEhMjrQwUPTFsPBR1k=",
"owner": "paisano-nix", "owner": "paisano-nix",
"repo": "tui", "repo": "tui",
"rev": "3096bad91cae73ab8ab3367d31f8a143d248a244", "rev": "587ab9fd07bd969d59df73bfe527b5f8a4e752d1",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "paisano-nix", "owner": "paisano-nix",
"ref": "0.1.1", "ref": "0.2.0",
"repo": "tui", "repo": "tui",
"type": "github" "type": "github"
} }
@ -1624,11 +1646,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1688099125, "lastModified": 1693982790,
"narHash": "sha256-j6LMz00orEKZrQb14wRRw7kMLm+aj7zBJt05AY4UcRI=", "narHash": "sha256-WTZYlqGUjzzz/PSzcvjEZz2kkwYSXObjeQVrFBaqa2Y=",
"owner": "paisano-nix", "owner": "paisano-nix",
"repo": "core", "repo": "core",
"rev": "10270dc46532c947de473ee88c8f5a3346a396fb", "rev": "3e897a19418361ece34841105122ed4f9379ca96",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1640,17 +1662,18 @@
"poetry2nix": { "poetry2nix": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_5", "flake-utils": "flake-utils_5",
"nix-github-actions": "nix-github-actions",
"nixpkgs": [ "nixpkgs": [
"nix-boost", "nix-boost",
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1688020442, "lastModified": 1693051011,
"narHash": "sha256-5wq0xOUcs0jydNow6y+ToefawaC4wV1qiA8gkpMNK1c=", "narHash": "sha256-HNbuVCS/Fnl1YZOjBk9/MlIem+wM8fvIzTH0CVQrLSQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "poetry2nix", "repo": "poetry2nix",
"rev": "a98ecb470cc4b18407a156e17066173add8e05d3", "rev": "5b3a5151cf212021ff8d424f215fb030e4ff2837",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1735,11 +1758,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1685759304, "lastModified": 1691374719,
"narHash": "sha256-I3YBH6MS3G5kGzNuc1G0f9uYfTcNY9NYoRc3QsykLk4=", "narHash": "sha256-HCodqnx1Mi2vN4f3hjRPc7+lSQy18vRn8xWW68GeQOg=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "c535b4f3327910c96dcf21851bbdd074d0760290", "rev": "b520a3889b24aaf909e287d19d406862ced9ffc9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1754,11 +1777,11 @@
"nixpkgs": "nixpkgs_6" "nixpkgs": "nixpkgs_6"
}, },
"locked": { "locked": {
"lastModified": 1688005946, "lastModified": 1693102271,
"narHash": "sha256-aEK0CNCIfE6ALQuztj86sl4PZUzMDnbp68r6I5YW+AE=", "narHash": "sha256-JuxJYl7zZ9FUOA/3Az5OPYWQfH9Y8SvtqqFnPKB6zUw=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "2925988bbc95f94e7b2f822b914ac5612a636e93", "rev": "1aac4029cfbc529f8b39c96d29fe1d09338f9110",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1874,11 +1897,11 @@
"yants": "yants" "yants": "yants"
}, },
"locked": { "locked": {
"lastModified": 1687999677, "lastModified": 1692861655,
"narHash": "sha256-BlYPcZtgQoicqHA9mRV/+m0HkGf37SA6rb7zSckFlwM=", "narHash": "sha256-NVScyi+Gd7lf5bcH8vysGSqESNiZGrDgaxXY5KdO3iA=",
"owner": "divnix", "owner": "divnix",
"repo": "std", "repo": "std",
"rev": "c886d1e5d8f5d35c3d77fd0ba9911c4bc17e875e", "rev": "3ce88a33db33ae48ec0081f717e4f035812c3755",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1898,6 +1921,7 @@
"dmerge": "dmerge_2", "dmerge": "dmerge_2",
"haumea": "haumea_2", "haumea": "haumea_2",
"incl": "incl_2", "incl": "incl_2",
"lib": "lib",
"makes": [ "makes": [
"std", "std",
"blank" "blank"
@ -1914,7 +1938,7 @@
"std", "std",
"blank" "blank"
], ],
"nixpkgs": "nixpkgs_18", "nixpkgs": "nixpkgs_17",
"paisano": "paisano_2", "paisano": "paisano_2",
"paisano-tui": "paisano-tui_2", "paisano-tui": "paisano-tui_2",
"terranix": [ "terranix": [
@ -1924,11 +1948,11 @@
"yants": "yants_2" "yants": "yants_2"
}, },
"locked": { "locked": {
"lastModified": 1689337213, "lastModified": 1694941922,
"narHash": "sha256-qa0B38ihDW1MuAshwgvlbkk3CgheWlvYr35oMpDrxJs=", "narHash": "sha256-gSuhf+qC3jvOb8am+CTPtIJUH1W3PnU8nzmGVJ2t5eA=",
"owner": "divnix", "owner": "divnix",
"repo": "std", "repo": "std",
"rev": "17dc4eb9587517397dad00617b020769fece3cfe", "rev": "01adf87cf1ed37bcd72a90f2a4e385d76c81c825",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -2099,8 +2123,7 @@
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"std", "std",
"haumea", "lib"
"nixpkgs"
] ]
}, },
"locked": { "locked": {

View File

@ -72,6 +72,7 @@ WPlug('nvim-telescope/telescope.nvim', { branch = '0.1.x' }) -- file browser
-- Make sure that WPlug does not run `make` and use the output it needs -- Make sure that WPlug does not run `make` and use the output it needs
WPlug('nvim-telescope/telescope-fzf-native.nvim', WPlug('nvim-telescope/telescope-fzf-native.nvim',
{ ['do'] = 'make >> /tmp/log 2>&1' }) { ['do'] = 'make >> /tmp/log 2>&1' })
WPlug('nvim-telescope/telescope-live-grep-args.nvim')
WPlug('nvim-telescope/telescope-file-browser.nvim') WPlug('nvim-telescope/telescope-file-browser.nvim')
-- cmp: auto-complete/suggestions -- cmp: auto-complete/suggestions
@ -357,8 +358,93 @@ vim.api.nvim_create_user_command(
-- telescope -- telescope
local fb_actions = require "telescope".extensions.file_browser.actions local fb_actions = require "telescope".extensions.file_browser.actions
local tel_actions = require("telescope.actions") local tel_actions = require("telescope.actions")
local tel_action_state = require("telescope.actions.state")
local tel_actionset = require("telescope.actions.set") local tel_actionset = require("telescope.actions.set")
-- telescope + harpoon mark
local function default_harpoon_mark()
require('harpoon.mark').add_file()
end
local harpoon_keymap = '<leader>m'
local function telescope_multi_selection(prompt_bufnr)
local picker = tel_action_state.get_current_picker(prompt_bufnr)
---@class telescope.make_entry.Entry
---@field value any
---@field valid boolean | nil
---@field ordinal string for filtering and (fuzzy) search-friendly string
---@field display string|function
---@field filename string | nil
---@field bufnr number | nil
---@field lum number | nil
---@field col number | nil
---@class telescope.make_entry.gen_from_file__rv: telescope.make_entry.Entry
---@field cwd string | nil
---@field path string via __index
---@field __index function
---@type telescope.make_entry.gen_from_file__rv[]
local rv = picker:get_multi_selection()
return rv
end
local function mark_telescope_selections(prompt_bufnr)
-- NOTE: This works for both bulitin Telescope file browser and fuzzy search
local selections = telescope_multi_selection(prompt_bufnr)
--[[
local entries = {}
for k, e in ipairs(selections) do
table.insert(entries, { k = k, e = e })
end
print(vim.inspect({
prompt_bufnr = prompt_bufnr,
selections = selections,
entries = entries,
}))
stdout> (builtin.__file)
{
entries = { { "native_configs/ssh/authorized_keys",
index = 6,
<metatable> = <1>{
__index = <function 1>,
cwd = "/Users/hungtran/local_repos/dotfiles",
display = <function 2>
}
}, { "native_configs/ssh/config", index = 7, <metatable> = <table 1> } },
prompt_bufnr = 56
}
--]]
---@type string[]
local filenames = {}
for _, entry in ipairs(selections) do
local has_path, path = pcall(function() return entry:__index("path") --[[ @as string ]] end)
if has_path then
table.insert(filenames, path)
goto continue
end
-- invariant: pcall on has_path false will assign second rv as the error
-- payload. Most of the time, this is a string, but for safety, we could
-- not assume so.
local err = path
log.warn("No `.path` for entry `" .. vim.inspect(entry) .. "`: " .. vim.inspect(err))
::continue::
end
log.debug(vim.inspect(filenames))
for _, filename in pairs(filenames) do
require('harpoon.mark').add_file(filename)
end
end
local function term_height() local function term_height()
return vim.opt.lines:get() return vim.opt.lines:get()
end end
@ -369,10 +455,16 @@ require('telescope').setup {
n = { n = {
['<C-u>'] = function(prompt_bufnr) tel_actionset.shift_selection(prompt_bufnr, -math.floor(term_height() / 2)) end, ['<C-u>'] = function(prompt_bufnr) tel_actionset.shift_selection(prompt_bufnr, -math.floor(term_height() / 2)) end,
['<C-d>'] = function(prompt_bufnr) tel_actionset.shift_selection(prompt_bufnr, math.floor(term_height() / 2)) end, ['<C-d>'] = function(prompt_bufnr) tel_actionset.shift_selection(prompt_bufnr, math.floor(term_height() / 2)) end,
[harpoon_keymap] = function(prompt_bufnr)
mark_telescope_selections(prompt_bufnr)
end,
}, },
}, },
}, },
extensions = { extensions = {
live_grep_args = {
auto_quoting = true,
},
fzf = { fzf = {
fuzzy = true, -- allow fuzzy matches fuzzy = true, -- allow fuzzy matches
override_generic_sorter = true, override_generic_sorter = true,
@ -430,12 +522,14 @@ remap('n', '<leader>fa', function()
end, { desc = '[F]ind [A]ll files' }) end, { desc = '[F]ind [A]ll files' })
remap('n', '<leader>fg', function() remap('n', '<leader>fg', function()
require('telescope.builtin').live_grep() require('telescope').extensions.live_grep_args.live_grep_args()
end, { desc = '[F]ind thru [G]rep' }) end, { desc = '[F]ind thru [G]rep' })
remap('n', '<leader>fug', function() remap('n', '<leader>fug', function()
-- This relies on many factors: We use `rg` and that `-g '**/*'` effectively -- This relies on many factors: We use `rg` and that `-g '**/*'` effectively
-- drops ignore rules like the default `.gitignore` rule. -- drops ignore rules like the default `.gitignore` rule.
vim.notify("fuzzy unrestricted grep is deprecated, use Find thru Grep with `-uuu` query instead")
require('telescope.builtin').live_grep({ glob_pattern = '**/*' }) require('telescope.builtin').live_grep({ glob_pattern = '**/*' })
end, { desc = '[F]ind thru [u]nrestricted [G]rep' }) end, { desc = '[F]ind thru [u]nrestricted [G]rep' })
@ -561,7 +655,12 @@ require('guess-indent').setup {
} }
-- harpoon: O(1) buffer/terminal switching -- harpoon: O(1) buffer/terminal switching
remap('n', '<leader>m', function() require('harpoon.mark').add_file() end, { desc = "[H]arpoon [M]ark" }) remap('n', harpoon_keymap, function()
local is_err, err = pcall(require('harpoon.mark').add_file)
if is_err then
log.warn(vim.inspect(err))
end
end, { desc = "[H]arpoon [M]ark" })
local function harpoon_nav(key, nav_file_index, lead_keybind) local function harpoon_nav(key, nav_file_index, lead_keybind)
lead_keybind = lead_keybind or '<leader>h' lead_keybind = lead_keybind or '<leader>h'
assert(type(key) == "string", "expect key to be string(keybind)") assert(type(key) == "string", "expect key to be string(keybind)")

View File

@ -6,3 +6,4 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCgmng5xL/auvI2F8ufFAfId2Ey55ONHjgnKKSEWLVW
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC/UzKwmFsAlLoCXvOq2lsC1sr1BRDW5uPkdcYUfQ7z4JowL/pscoTV9zjfJd1hPBvHLBvn7gs7gWt0wNnJfD1Oor26VreHjhi1PZE2kovrEzjmPoz+GqMPciV+HF9XNIRwDiHlUNFPt9qJjAJXJCFhzcmT9q0JQuPlNgJtQ6+By7RgPuJczpf17IbxpheLcXqtOFcTHyRT01KijIPhAtWRlmG5dahVuu50EfpmHRYZ8nCJ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ran@Hungs-MacBook-Pro.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBCA6TLpBjcffVHr7DwSqaqPgFStuI7W8VJA3/ya5Xhw hungtran@Hungs-MacBook-Air.local

View File

@ -132,6 +132,7 @@ in {
vim-fugitive vim-fugitive
vim-jack-in vim-jack-in
sg-nvim sg-nvim
telescope-live-grep-args-nvim
; ;
in [ in [
plenary-nvim plenary-nvim
@ -178,6 +179,7 @@ in {
vim-fugitive vim-fugitive
vim-jack-in vim-jack-in
sg-nvim sg-nvim
telescope-live-grep-args-nvim
]; ];
}; };
# home.packages = nvim_pkgs; # home.packages = nvim_pkgs;