Skip to content

Commit

Permalink
chore: adding a custom find cmd to telescope
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham-cpp committed Dec 1, 2024
1 parent 4d4ff2f commit 51f4145
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 11 deletions.
12 changes: 7 additions & 5 deletions .config/lazygit/state.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
lastupdatecheck: 0
recentrepos:
- /home/shubham/Documents/dotfiles
- /home/shubham/Documents/Programming/WebDev/page-form
- /home/shubham/Documents/Programming/WebDev/discord-clone
- /home/shubham/Downloads/GitClones/lfimg
- /home/shubham/Documents/dotfiles
- /home/shubham/Downloads/GitClones/srcbook
- /home/shubham/Documents/Programming/WebDev/page-form
- /home/shubham/Documents/Programming/WebDev/discord-clone
- /home/shubham/Downloads/GitClones/lfimg
startuppopupversion: 5
lastversion: 0.41.0
lastversion: 0.44.1
customcommandshistory: []
hidecommandlog: false
ignorewhitespaceindiffview: false
diffcontextsize: 3
renamesimilaritythreshold: 50
localbranchsortorder: recency
remotebranchsortorder: alphabetical
gitlogorder: topo-order
Expand Down
8 changes: 4 additions & 4 deletions .config/nvim-lazy/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ debug
foo.*
*.log
data
lazy-lock.json
lazyvim.json
README.md
LICENSE
./lazy-lock.json
./lazyvim.json
./README.md
./LICENSE
2 changes: 1 addition & 1 deletion .config/nvim-lazy/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"nvim-lspconfig": { "branch": "master", "commit": "7b0a2f6b14485bb5a237fc1328a487ff3e4a08c5" },
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
"nvim-snippets": { "branch": "main", "commit": "56b4052f71220144689caaa2e5b66222ba5661eb" },
"nvim-treesitter": { "branch": "master", "commit": "454354e5998edb448111574e58d5f5f2d6a940bd" },
"nvim-treesitter": { "branch": "master", "commit": "70d44dad700512460aa76e9299ed00e0f53f3164" },
"nvim-treesitter-context": { "branch": "master", "commit": "6b081ea63a3711243d11540ce28ccdb6f35ecd33" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" },
"nvim-ts-autotag": { "branch": "main", "commit": "f2d24aca1bcbbd2c0306fd93d52e3697027b77ff" },
Expand Down
29 changes: 29 additions & 0 deletions .config/nvim-lazy/lua/config/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,32 @@
vim.opt.wrap = true
vim.opt.showbreak = "󰄾 "
vim.opt.iskeyword:append("-")
vim.opt.scrolloff = 8

vim.opt.wildignore:append({
"*.o",
"*.obj",
"*.out",
"*.class",

"*.jpg",
"*.jpeg",
"*.png",
"*.gif",

"*.zip",
"*.tar.gz",
"*.tar.xz",
"*.tar.bz2",
"*.rar",

"*.pyc",
"*.pyo",

"*.DS_Store",
"*.swp",

"node_modules",
"vendor",
".git",
})
24 changes: 23 additions & 1 deletion .config/nvim-lazy/lua/plugins/telescope.lua
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,29 @@ return {
end)
end,
keys = {
{ "<c-p>", LazyVim.pick("files"), desc = "Find Files (Root Dir)" },
{
"<c-p>",
function()
LazyVim.pick.open(
"files",
{
find_command = {
"rg",
"--files",
"--color",
"never",
"--ignore",
"--hidden",
"--sortr",
"modified",
"--glob",
"!{" .. vim.iter(vim.opt.wildignore:get()):join(",") .. "}",
},
}
)
end,
desc = "Find Files (Root Dir)",
},
{ "<leader>fn", LazyVim.pick.config_files(), desc = "Find Config File" },
{
"<leader>fd",
Expand Down

0 comments on commit 51f4145

Please sign in to comment.