From 0469b99f40121164ad712391126a0aa4bf280f0d Mon Sep 17 00:00:00 2001 From: Tyler White Date: Tue, 30 May 2023 22:26:58 -0700 Subject: [PATCH] using find files instead of git_files, find_files respects .gitignore but looks at the files system, git_files only looks at git tracked files (issues with git submodules) --- lua/keybindings.lua | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lua/keybindings.lua b/lua/keybindings.lua index b9781a4..cfc4588 100644 --- a/lua/keybindings.lua +++ b/lua/keybindings.lua @@ -3,17 +3,11 @@ require('buildcmd') local tbuiltin = require('telescope.builtin') vim.g.mapleader = ' ' --space -local function project_files() - local opts = {} - local ok = pcall(tbuiltin.git_files, opts) - if not ok then tbuiltin.find_files(opts) end -end - -- Mappings, mostly taken from nvim-lspconfig local opts = { noremap=true, silent=true } vim.keymap.set('n', 'q', vim.diagnostic.open_float, opts) vim.keymap.set('n', 'e', 'Ex', opts) -vim.keymap.set('n', 'ff', project_files, opts) +vim.keymap.set('n', 'ff', tbuiltin.find_files, opts) vim.keymap.set('n', 'fb', 'Telescope buffers', opts) vim.keymap.set('n', 'bb', save_all_and_build, opts) -- TODO: get fancy and read the commentstring and user