Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default_text option in find_files is not documented #2685

Open
philolo1 opened this issue Sep 5, 2023 · 1 comment · May be fixed by #2693
Open

default_text option in find_files is not documented #2685

philolo1 opened this issue Sep 5, 2023 · 1 comment · May be fixed by #2693
Labels
bug Something isn't working

Comments

@philolo1
Copy link
Contributor

philolo1 commented Sep 5, 2023

Description

The default_text option for find_files is not documented. This option is very useful for me to search by filtering using fzf extension:

function FilterLua() 
	builtin.find_files({
	  default_text = ".lua$ ",
       })
end

Neovim version

NVIM v0.9.1
Build type: Release
LuaJIT 2.1.0-beta3

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.9.1/share/nvim"

Run :checkhealth for more info

Operating system and version

macOs 13.3.1

Telescope version / branch / rev

telescope 0.1.2

checkhealth telescope

telescope: require("telescope.health").check() 0.1.2

Checking for required plugins ~
- OK plenary installed.
- OK nvim-treesitter installed.

Checking external dependencies ~
- OK rg: found ripgrep 13.0.0
- WARNING fd: not found. Install [sharkdp/fd](https://github.com/sharkdp/fd) for extended capabilities

===== Installed extensions ===== ~

Telescope Extension: `fzf` ~
- OK lib working as expected
- OK file_sorter correctly configured
- OK generic_sorter correctly configured

Steps to reproduce

:help telescope.builtin.find_files()

Expected behavior

Some documentation about default_text

Actual behavior

no documentation an info

Minimal config

vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=/tmp/nvim/site]]
local package_root = '/tmp/nvim/site/pack'
local install_path = package_root .. '/packer/start/packer.nvim'
local function load_plugins()
  require('packer').startup {
    {
      'wbthomason/packer.nvim',
      {
        'nvim-telescope/telescope.nvim',
        requires = {
          'nvim-lua/plenary.nvim',
          { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' },
        },
      },
      -- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
    },
    config = {
      package_root = package_root,
      compile_path = install_path .. '/plugin/packer_compiled.lua',
      display = { non_interactive = true },
    },
  }
end
_G.load_config = function()
  require('telescope').setup()
  require('telescope').load_extension('fzf')
  -- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
end
if vim.fn.isdirectory(install_path) == 0 then
  print("Installing Telescope and dependencies.")
  vim.fn.system { 'git', 'clone', '--depth=1', 'https://github.com/wbthomason/packer.nvim', install_path }
end
load_plugins()
require('packer').sync()
vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua load_config()]]
@philolo1 philolo1 added the bug Something isn't working label Sep 5, 2023
@philolo1
Copy link
Contributor Author

philolo1 commented Sep 8, 2023

I will try to solve this bug myself and do a pr.

philolo1 added a commit to philolo1/telescope.nvim that referenced this issue Sep 8, 2023
This commit resolves nvim-telescope#2685.

Adds documentation for the option default_text to all functions that include
it.
@philolo1 philolo1 linked a pull request Sep 8, 2023 that will close this issue
2 tasks
philolo1 added a commit to philolo1/telescope.nvim that referenced this issue Sep 8, 2023
This commit resolves nvim-telescope#2685.

Adds documentation for the option default_text to all functions that include
it.
philolo1 added a commit to philolo1/telescope.nvim that referenced this issue Sep 8, 2023
This commit resolves nvim-telescope#2685.

Adds documentation for the option default_text to all functions that include
it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant