The git_files
picker shows git submodules. This is both annoying and can break previewers that are expecting to act only on files, such as the new vim_buffer_cat
previewer.
I haven't found a suitable option for git ls-files
or an alternative single command that gives us what we want, so we might just need to filter out the submodules from the list. From cursory exploration, it looks like we can use the output of git submodule status
or just parse .gitmodules
to determine what the submodules for the repo are.
Alternatively, git grep --exclude-standard --cached --untracked -l ""
comes really close, but excludes empty files and symlinks as well.
Expected Behavior
The git_files
picker does not show git submodules.
Actual Behavior
The git_files
picker shows git submodules.
:Telescope git_files
(default)
set nocompatible hidden laststatus=2 if !filereadable('/tmp/plug.vim') silent !curl --insecure -fLo /tmp/plug.vim \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim endif source /tmp/plug.vim call plug#begin('/tmp/plugged') Plug 'nvim-lua/popup.nvim' Plug 'nvim-lua/plenary.nvim' Plug 'nvim-telescope/telescope.nvim' call plug#end() autocmd VimEnter * PlugClean! | PlugUpdate --sync | close lua << EOF require('telescope').setup{ defaults = { vimgrep_arguments = { 'rg', '--color=never', '--no-heading', '--with-filename', '--line-number', '--column', '--smart-case' }, prompt_position = "bottom", prompt_prefix = ">", selection_strategy = "reset", sorting_strategy = "descending", layout_strategy = "horizontal", layout_defaults = {}, file_ignore_patterns = {}, shorten_path = true, winblend = 0, width = 0.75, preview_cutoff = 120, results_height = 1, results_width = 0.8, border = {}, borderchars = { '─', '│', '─', '│', '╭', '╮', '╯', '╰'}, color_devicons = true, use_less = true, } } EOF
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4