Skip to content

Commit

Permalink
nvim: open telescope if vim is opened without files or folder as an
Browse files Browse the repository at this point in the history
argument
  • Loading branch information
pjvds committed Jan 3, 2025
1 parent 115b27a commit e22718d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions nvim/lua/chadrc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,13 @@ vim.api.nvim_create_autocmd("BufWritePost", {
command = "!killall -SIGUSR1 kitty",
})

-- Open telescope on startup if no files were passed
vim.api.nvim_create_autocmd("VimEnter", {
callback = function()
if #vim.fn.argv() == 0 then
require("telescope.builtin").find_files()
end
end,
})

return M

0 comments on commit e22718d

Please sign in to comment.