瀏覽代碼

nixpkgs/neovim: show untracked files in git chooser

Thomas Dy 2 年之前
父節點
當前提交
75658d3058
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      .config/nixpkgs/neovim/plugins.lua

+ 2 - 3
.config/nixpkgs/neovim/plugins.lua

@@ -32,9 +32,8 @@ require('telescope').load_extension('fzf')
 -- custom picker to fallback to files if no git
 local telescope_builtin = require('telescope.builtin')
 _G.project_files = function()
-  local opts = {}
-  local ok = pcall(telescope_builtin.git_files, opts)
-  if not ok then telescope_builtin.find_files(opts) end
+  local ok = pcall(telescope_builtin.git_files, { show_untracked = true })
+  if not ok then telescope_builtin.find_files({}) end
 end
 
 -- shows added/removed/changed lines