Giter VIP home page Giter VIP logo

telescope-file-browser.nvim's Introduction

telescope-file-browser.nvim

telescope-file-browser.nvim is a file browser extension for telescope.nvim. It supports synchronized creation, deletion, renaming, and moving of files and folders powered by telescope.nvim and plenary.nvim.

Demo More demo examples can be found in the showcase issue.

Table of Contents


Requirements

  • Neovim >= 0.9.0
  • fd (optional, for faster browser)
  • git (optional, for display git status)

Installation

Install the plugin with your preferred package manager.

--lazy
{
    "nvim-telescope/telescope-file-browser.nvim",
    dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" }
}

-- packer
use {
    "nvim-telescope/telescope-file-browser.nvim",
    requires = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" }
}
vim-plug
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
Plug 'nvim-telescope/telescope-file-browser.nvim'

Setup and Configuration

You can configure the telescope-file-browser like any other telescope.nvim picker. Please see :h telescope-file-browser.picker for the full set of options dedicated to the picker. Unless otherwise stated, you can pass these options either to your configuration at extension setup or picker startup. For instance, you can map theme and mappings as you are used to from telescope.nvim.

-- You don't need to set any of these options.
-- IMPORTANT!: this is only a showcase of how you can set default options!
require("telescope").setup {
  extensions = {
    file_browser = {
      theme = "ivy",
      -- disables netrw and use telescope-file-browser in its place
      hijack_netrw = true,
      mappings = {
        ["i"] = {
          -- your custom insert mode mappings
        },
        ["n"] = {
          -- your custom normal mode mappings
        },
      },
    },
  },
}
-- To get telescope-file-browser loaded and working with telescope,
-- you need to call load_extension, somewhere after setup function:
require("telescope").load_extension "file_browser"
Defaults

Non-primative options are commented out. See :h telescope-file-browser.picker.file_browser()

local fb_actions = require "telescope._extensions.file_browser.actions"

require("telescope").setup {
  extensions = {
    file_browser = {
      path = vim.loop.cwd(),
      cwd = vim.loop.cwd(),
      cwd_to_path = false,
      grouped = false,
      files = true,
      add_dirs = true,
      depth = 1,
      auto_depth = false,
      select_buffer = false,
      hidden = { file_browser = false, folder_browser = false },
      respect_gitignore = vim.fn.executable "fd" == 1,
      no_ignore = false,
      follow_symlinks = false,
      browse_files = require("telescope._extensions.file_browser.finders").browse_files,
      browse_folders = require("telescope._extensions.file_browser.finders").browse_folders,
      hide_parent_dir = false,
      collapse_dirs = false,
      prompt_path = false,
      quiet = false,
      dir_icon = "๏“",
      dir_icon_hl = "Default",
      display_stat = { date = true, size = true, mode = true },
      hijack_netrw = false,
      use_fd = true,
      git_status = true,
      mappings = {
        ["i"] = {
          ["<A-c>"] = fb_actions.create,
          ["<S-CR>"] = fb_actions.create_from_prompt,
          ["<A-r>"] = fb_actions.rename,
          ["<A-m>"] = fb_actions.move,
          ["<A-y>"] = fb_actions.copy,
          ["<A-d>"] = fb_actions.remove,
          ["<C-o>"] = fb_actions.open,
          ["<C-g>"] = fb_actions.goto_parent_dir,
          ["<C-e>"] = fb_actions.goto_home_dir,
          ["<C-w>"] = fb_actions.goto_cwd,
          ["<C-t>"] = fb_actions.change_cwd,
          ["<C-f>"] = fb_actions.toggle_browser,
          ["<C-h>"] = fb_actions.toggle_hidden,
          ["<C-s>"] = fb_actions.toggle_all,
          ["<bs>"] = fb_actions.backspace,
        },
        ["n"] = {
          ["c"] = fb_actions.create,
          ["r"] = fb_actions.rename,
          ["m"] = fb_actions.move,
          ["y"] = fb_actions.copy,
          ["d"] = fb_actions.remove,
          ["o"] = fb_actions.open,
          ["g"] = fb_actions.goto_parent_dir,
          ["e"] = fb_actions.goto_home_dir,
          ["w"] = fb_actions.goto_cwd,
          ["t"] = fb_actions.change_cwd,
          ["f"] = fb_actions.toggle_browser,
          ["h"] = fb_actions.toggle_hidden,
          ["s"] = fb_actions.toggle_all,
        },
      },
    },
  },
}

Usage

You can use the telescope-file-browser as follows:

vim.keymap.set("n", "<space>fb", ":Telescope file_browser<CR>")

-- open file_browser with the path of the current buffer
vim.keymap.set("n", "<space>fb", ":Telescope file_browser path=%:p:h select_buffer=true<CR>")

-- Alternatively, using lua API
vim.keymap.set("n", "<space>fb", function()
	require("telescope").extensions.file_browser.file_browser()
end)

Mappings

telescope-file-browser.nvim comes with a lot of default mappings for discoverability. You can use telescope's which_key (insert mode: <C-/>, normal mode: ?) to list mappings attached to your picker.

  • path denotes the folder the file_browser is currently in
  • fb_actions refers to the table of provided telescope-file-browser.actions accessible via require "telescope".extensions.file_browser.actions
Insert / Normal fb_actions Description
<A-c>/c create Create file/folder at current path (trailing path separator creates folder)
<S-CR> create_from_prompt Create and open file/folder from prompt (trailing path separator creates folder)
<A-r>/r rename Rename multi-selected files/folders
<A-m>/m move Move multi-selected files/folders to current path
<A-y>/y copy Copy (multi-)selected files/folders to current path
<A-d>/d remove Delete (multi-)selected files/folders
<C-o>/o open Open file/folder with default system application
<C-g>/g goto_parent_dir Go to parent directory
<C-e>/e goto_home_dir Go to home directory
<C-w>/w goto_cwd Go to current working directory (cwd)
<C-t>/t change_cwd Change nvim's cwd to selected folder/file(parent)
<C-f>/f toggle_browser Toggle between file and folder browser
<C-h>/h toggle_hidden Toggle hidden files/folders
<C-s>/s toggle_all Toggle all entries ignoring ./ and ../
<Tab> see telescope.nvim Toggle selection and move to next selection
<S-Tab> see telescope.nvim Toggle selection and move to prev selection
<bs>/ backspace With an empty prompt, goes to parent dir. Otherwise acts normally

fb_actions.create_from_prompt requires that your terminal recognizes these keycodes (e.g. kitty). See :h tui-input for more information.

Remappings

As part of the setup, you can remap actions as you like. The default mappings can also be found in this file.

local fb_actions = require "telescope".extensions.file_browser.actions
-- mappings in file_browser extension of telescope.setup
...
      mappings = {
        ["i"] = {
          -- remap to going to home directory
          ["<C-h>"] = fb_actions.goto_home_dir
          ["<C-x>"] = function(prompt_bufnr)
            -- your custom function
          end
        },
        ["n"] = {
          -- unmap toggling `fb_actions.toggle_browser`
          f = false,
        },
...

Documentation

The documentation of telescope-file-browser can be be accessed from within Neovim via:

Topic Vimdoc Comment
Introduction :h telescope-file-browser.nvim
Picker options :h telescope-file-browser.picker.file_browser For extension setup
Actions :h telescope-file-browser.actions Explore mappable actions
Finders :h telescope-file-browser.finders Lower level for customization

The documentation can be easily explored via :Telescope help_tags. Search for fb_actions, for instance, nicely lists available actions from within vimdocs. Very much recommended!

Please make sure to consult the docs prior to raising issues for asking questions.

Workflow

telescope-file-browser.nvim unifies a file_browser and a folder_browser into a single finder that can be toggled between:

  1. file_browser: finds files and folders in the (currently) selected folder (denoted as path, default: cwd)
  2. folder_browser: swiftly fuzzy find folders from cwd downwards to switch folders for the file_browser (i.e. set path to selected folder)

Within a single session, path always refers to the folder the file_browser is currently in and changes by selecting folders from within the file or folder_browser.

If you want to open the file_browser from within the folder of your current buffer, you should pass path = "%:p:h" to the opts table of the picker (Vimscript: :Telescope file_browser path=%:p:h) or to the extension setup configuration. Strings passed to path or cwd are expanded automatically.

By default, the folder_browser always launches from cwd, but it can be configured to launch from path via passing the cwd_to_path = true to picker opts table or at extension setup. The former corresponds to a more project-centric file browser workflow, whereas the latter typically facilitates file and folder browsing across the entire file system.

In practice, it mostly affects how you navigate the file system in multi-hop scenarios, for instance, when moving files from varying folders into a separate folder. The default works well in projects from which the folder_browser can easily reach any folder. cwd_to_path = true would possibly require returning to parent directories or cwd intermittently. However, if you move deeply through the file system, launching the folder_browser from cwd every time is tedious. Hence, it can be configured to follow path instead.

In general, telescope-file-browser.nvim intends to enable any workflow without comprise via opting in as virtually any component can be overriden.

Multi-Selections

Multiple files and directories can be selected at the same time using default bindings (<Tab>/<S-Tab>) from telescope.nvim.

One distinct difference to telescope.nvim is that multi-selections are preserved between browsers.

Hence, whenever you (de-)select a file or folder within {file, folder}_browser, respectively, this change persists across browsers (in a single session).

File System Operations

Note: path corresponds to the folder the file_browser is currently in.

Warning: Batch renaming or moving files with path inter-dependencies are not resolved! For instance, moving a folder somewhere while moving another file into the original folder in later order within same action will fail.

Action (incl. GIF) Docs Comment
creation :h telescope-file-browser.actions.create Create file or folder (with trailing OS separator) at path (file_browser) or at selected directory (folder_browser)
copying :h telescope-file-browser.actions.copy Supports copying current selection & multi-selections to path (file_browser) or selected directory (folder_browser)
moving :h telescope-file-browser.actions.move Move multi-selected files to path (file_browser) or selected directory (folder_browser)
removing :h telescope-file-browser.actions.remove Remove (multi-)selected files
renaming :h telescope-file-browser.actions.rename Rename (multi-)selected files

See fb_actions for a list of native actions and inspiration on how to write your own custom action. As additional reference, plenary's Path library powers a lot of the built-in actions.

For more information on telescope actions and remappings, see also the upstream documentation and associated vimdocs at :h telescope.defaults.mappings.

Additional information can also be found in telescope's developer documentation.

Exports

The extension exports the following attributes via :lua require "telescope".extensions.file_browser:

Export Description
file_browser main picker
actions file browser actions for e.g. remapping
finder file, folder, and unified finder for user customization
_picker Unconfigured equivalent of file_browser

Roadmap & Contributing

Please see the associated issue on more immediate open TODOs for telescope-file-browser.nvim.

That said, the primary work surrounds on enabling users to tailor the extension to their individual workflow, primarily through opting in and possibly overriding specific components.

telescope-file-browser.nvim's People

Contributors

archiif avatar blakejc94 avatar catacomba avatar ckolkey avatar etherswangel avatar fdschmidt93 avatar fhill2 avatar futsuuu avatar gepbird avatar hsawaji avatar ikerurda avatar jamestrew avatar jan-xyz avatar jgottzen avatar kobylianskii avatar miguelmoraperea avatar miversen33 avatar otavioschwanck avatar paterjason avatar qgadrian avatar ranebrown avatar rashil2000 avatar skebanga avatar stelcodes avatar waynebowie99 avatar yutkat avatar zhiyuanlck avatar zorbn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

telescope-file-browser.nvim's Issues

File browser specific file_ignore patterns

It would be great if the file_browser had the option "file_ignore_pattern" that overwrites the default file_ignore pattern.
In my special case there is a NAMESPACE file that I don't want to live-grep over but which I would like to see in the file-browser.
Maybe this is a more general feature request and not only related to the file-browser, if so please redirect this issue.

why do we need to and move files to the current path

Newbie, so if this is already resolved please help. I am unable to copy files to buffer and paste it in another location.
It is only showing option to copy or move to the current directory.
We can specify the directories only in the folder mode but it is not wise to just copy the entire folder. Please help

attempt to index nil value error when trying to create a directory/file

When I try to create a directory and a file In folder mode I get the error on the screens shot below. worth pointing out that if I'm in file mode and hit / it will put me in folder mode so it seems to me that the only way to that this plugging has for creating a file may be a bit broken.

Screenshot 2021-11-21 at 12 29 15

Clarity on shortcut for moving files in normal mode

Description

Could you clarify what --/m means in terms of the default shortcut needed to move a file(s) in normal mode?

In the readme/docs, each action has a <C-*> mapping for normal mode, apart from move.

Neovim version

NVIM v0.6.0-dev+2040-g8cbe100fc
Build type: Release
LuaJIT 2.1.0-beta3

Operating system and version

macOS 11.6.1

Steps to reproduce

select some files
navigate to target folder
try and use the default shortcut to move

Expected behavior

A <C-M> shortcut or similar

Actual behavior

Typing -- just enters that string into the text input box.

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-file-browser.nvim',
        },
      },
      -- 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('file_browser')
  -- 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()]]

select_buffer does not seem to take effect

Description

Recently added select_buffer does not seem to work. My understanding is that current buffer should be preselected by placing cursor line over corresponding file in Telescope's picker. This is not what I am observing.

Neovim version

NVIM v0.7.0-dev+1101-g3230b3148
Build type: Release
LuaJIT 2.1.0-beta3

Operating system and version

macOS 12.2.1

Steps to reproduce

  1. nvim -nu minimal.init.lua minimal.init.lua
  2. :lua require('telescope').extensions.file_browser.file_browser { path = '%:p:h', select_buffer = true }

Expected behavior

minimal.init.lua within CWD to be selected in picker.

Actual behavior

First entry (../) is selected instead.
Screenshot 2022-02-18 at 09 28 27

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-file-browser.nvim',
        },
      },
      -- 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('file_browser')
  -- 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()]]

Error when running `:Telescope file_browser path='%:p:h'`

Description

I have telescope-file-browser.nvim set up, and calling :Telescope file_browser works, but calling :Telescope file_browser path='%:p:h' (as designated in the README).

Neovim version

NVIM v0.6.1
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by [email protected]

Features: +acl +iconv +tui
See ":help feature-compile"

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

Run :checkhealth for more info

Operating system and version

macOS 12.1

Steps to reproduce

  1. Run :Telescope file_browser path='%:p:h'

Expected behavior

I should get a file browser window starting in the directory of the current file.

Actual behavior

An error is printed and I am presented with an empty file browser window:

[telescope] ^I...ck/packer/start/telescope.nvim/lua/telescope/pickers.lua:468: in function <...ck/packer/start/telescope.nvim/lua/telescope/pickers.lua:416>

image

Enter into folder remap to 'l'

Is your feature request related to a problem? Please describe.
Often in other file browsers h and l are mapped to go up and enter into folder respectively.

Describe the solution you'd like

["h"] = fb_actions.goto_parent_dir,  --  yep I iknow it conflicts with show hidden - I remapped it to H
["l"] = actions.select_default,

where :
local actions = require "telescope.actions"

Not a big change but this helped me move into tele- file browser. Grat pugin btw.

how to set browse path to the current buffer instead of cwd

I'm trying to set browse path to the current buffer path
I used
file_browser = { path = require('telescope.utils').buffer_dir() }
didn't however when I used something like
file_browser = { path = "~/dev" }
it worked and it doesn't give an error like buffer_dir() is not a string

How to remove files without prompt?

how can I remove files without this prompt

or at least make it easier by just pressing y for yes or n no
and no additional need to press one more enter

Tue Dec  7 22:05:37 EET 2021

Roadmap

This issue will keep users informed of any roadmap, gotchas, breaking changes, and the like.

Roadmap

The next focus will be on refactoring

  • the entry maker and associated path display
  • previewer (maybe with upstream PRs) to facilitate customization

TODOs (PRs welcome :)

TODOs are not really sorted by priority.

  • A view of multi-selections (cf this comment)
  • Warning: Batch Rename (renaming multi-selections) does not account for links between renamed objects yet (difficult fix). In any case, it should be safe to rename disjoint paths.
  • Better handle moving files/folders to targets in which files/folders already exist, see "skipping" in fb_actions
  • Being able to toggle depth in the file browser as false is unlimited depth, could be interesting
  • Maybe allow to set application by extension with which a file is opened
  • Own previewer for making previewer truly customize-able (will happen upstream)

The aforementioned list will be continuously updated.

Contributions

Any help on the above mentioned issues is greatly appreciated! To get started, familiarize with the code base and plenary's pathlib. In fact, I'm very much welcome a main maintainer of the project as my work on telescope core already takes a lot of my time allocated to open source.

Incorrect file copied message when a file was actually not copy

Description

Currently telescope-file-browser.nvim does not support copying a file to another directory other than cwd.

If a user tries to copy a file to another directory, the file is not copied, but the user gets the following message:

/example/path/to/file has been copied!

Which is an incorrect and misleading message, the file in fact was never copied.

Neovim version

NVIM v0.7.0-dev+792-gc46f7caad
Build type: RelWithDebInfo

Operating system and version

Ubuntu 20.04

Steps to reproduce

  1. Start to copy a file
  2. When prompt: "Copying existing file or folder within original directory, please provide a new file or folder name:" edit the file path to another directory, other than cwd.
  3. The file will not be copied (as expected) but the user will get the following message "[file] has been copied!".

Expected behavior

When copying a file outside the original directory, the message to the user should be: "[file] has not been copied".

Actual behavior

When copying a file outside the original directory, the message currently is: "[file] has been copied!", which is incorrect.

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-file-browser.nvim',
        },
      },
      -- 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('file_browser')
  -- 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()]]

Invalid files causes error when listing is grouped

Description

vim.loop.fs_stat returns nil for symbolic links where the target doesn't exist, causing

local x_is_dir = vim.loop.fs_stat(x).type == "directory"
to error out.

Whether this is an upstream issue with luv/neovim I don't know.

Neovim version

NVIM v0.6.1
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3

Operating system and version

openSUSE Tumbleweed 5.16.0-1-default

Steps to reproduce

  1. In a terminal: ln -s /non-exising-file .
  2. In the same directory start nvim and: :Telescope file_browser grouped=true

Expected behavior

File browser to show the content of the current directory.

Actual behavior

[telescope] [WARN 17:34:28] ...ck/packer/start/telescope.nvim/lua/telescope/pickers.lua:473: Finder failed with msg: ...er.nvim/lua/telescope/_extensions/fi le_browser/utils.lua:128: attempt to index a nil value

is printed and the file browser lists no files or directories.

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-file-browser.nvim',
        },
      },
      -- 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('file_browser')
  -- 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()]]

Name Conflict

Since this extensions name conflicts with the built in file browser, how do I get telescope to launch this one instead of the built in one? New to lua in nvim so idk if I'm missing something.

There was no question tag so I threw it under feature request, hope that's alright.

Multi selection open in neovim question

Hi,
for multi selecting and opening in neovim, is there anything besides the os default open command? currently, if I multi select some files, then use to open them, only the one that the cursor is currently over is opened in the current nvim session.

It would be great to have the default open in buffer behavior work with multi select. Or am i missing something?

Sorting option that separates directories and files

Is your feature request related to a problem? Please describe.
The sorting method of the file browser currently sorts directories and files in a combined manner. It also displays the listing in descending order. This is different to the general conventions adopted by other code editors and file browsing tools.

Currently, files and directories are all sorted as follows:

C-file.md     
โ€บ C-directory/
B-file.md     
โ€บ B-directory/
A-file.md     
โ€บ A-directory/
โ€บ ../         

However, In vim/neovim's built-in netrw plugin, the same listing is sorted as follows:

A-directory/
B-directory/
C-directory/
A-file.md
B-file.md
C-file.md

In VS Code's explorer, it is listed as:

> A-directory
> B-directory
> C-directory
A-file.md
B-file.md
C-file.md

In GitHub's repo view:

A-directory
B-directory
C-directory
A-file.md
B-file.md
C-file.md

The same is true with many other file browsers out there. Whilst I appreciate that the Telescope file browser is intended to be navigated using fuzzy searches, it can be difficult to visually get your bearings whilst browsing a project. Especially if you have been browsing the same directory using a different tool.

Describe the solution you'd like
The option to sort directories and files separately and in ascending order (so that it matches the conventions of other file browsers).

So that the listing is as follows:

โ€บ A-directory/
โ€บ B-directory/
โ€บ C-directory/
A-file.md
B-file.md
C-file.md
โ€บ ../

Describe alternatives you've considered
Not sure if there are any alternative approaches I could try.

Additional context
n/a

Thanks!

First selection shouldn't be to navigate back

Is your feature request related to a problem? Please describe.

I'm always frustrated when I open the browser or navigate to a directory and have the selection being to jump back

Describe the solution you'd like

First selection is on the first result not on the action to go to parent.

Describe alternatives you've considered

I played around with the default action tried telescope actions like selection_move and move_next but it didn't work.

Create File With C-e launchs a prompt to insert file name.

Description

I've just switched to this plugin from using Telescope's file browser because of the deprecation warning. I've encountered a strange behaviour though, which wasn't on Telescope itself.

When I type in the path of a file I want to create and hit C-e, I get a prompt in the command bar asking me to insert a file name.

2022-01-10-113304_883x283_scrot

Neovim version

NVIM v0.7.0-dev+839-g09d270bce
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-11 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/runner/work/neovim/neovim/build/config -I/home/runner/work/neovim/neovim/src -I/home/runner/work/neovim/neovim/.deps/usr/include -I/usr/include -I/home/runner/work/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include
Compiled by runner@fv-az121-138

Features: +acl +iconv +tui
See ":help feature-compile"

system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "
/home/runner/work/neovim/neovim/build/nvim.AppDir/usr/share/nvim"

Run :checkhealth for more info

Operating system and version

Ubuntu 21.10 Impish

Steps to reproduce

Open the file browser, type the name of a file that doesn't exist (doesn't matter if in a new folder or in current folder), hit C-e, and you'll get the prompt.

Expected behavior

This used to create the file and open it for editing in Telescope.

Actual behavior

Opens prompt at the nvim command bar, asking to insert file path.

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-file-browser.nvim',
        },
      },
      -- 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('file_browser')
  -- 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()]]

file_browser_relative incorrect title on panel

Description

When use

require("telescope").extensions.file_browser.file_browser({
    path = vim.fn.expand('%:h')
  })

to invoke the file browser relative to the current path it shows ./ on the title bar
Screen Shot 2021-12-08 at 20 03 11

but if move to another directory and come back show the directory name ok.
Screen Shot 2021-12-08 at 20 04 00

I tried this other option for the path parameter

  vim.fn.fnamemodify(vim.api.nvim_buf_get_name(0), ':h')

but always get the same result

Neovim version

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

Operating system and version

maxOS 11.6.1

Steps to reproduce

  1. nvim -nu minimal.lua
  2. execute on the command line lua require("telescope").extensions.file_browser.file_browser({ path = vim.fn.expand('%:h') })
  3. check the panel title

Expected behavior

show the correct directory path

Actual behavior

always shows ./

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-file-browser.nvim',
        },
      },
      -- 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('file_browser')
  -- 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()]]

Expose default action

Hey @fdschmidt93, awesome work I really like how this turned out, unfortunately just now I've begun actually integrating it in my workflow. Should have done that long time ago.

Is your feature request related to a problem? Please describe.

I'm trying to remap "" and "l" to run the default action.

Describe the solution you'd like

expose the default action through fb_actions.default

Describe alternatives you've considered

pretty much copy the replace_if

which-key shortcut doesn't work

Description

I've recently discovered about a which-key shortcut for telescope pickers mentioned in telescope main repo

 mappings = {
      i = {
        -- map actions.which_key to <C-h> (default: <C-/>)
        -- actions.which_key shows the mappings for your picker,
        -- e.g. git_{create, delete, ...}_branch for the git_branches picker
        ["<C-h>"] = "which_key"

which doesn't work on the file browser

Neovim version

NVIM v0.6.1
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3

Operating system and version

ubuntu 20.04

Steps to reproduce

  1. set a shortcut in telescope config file for the which-key functionality
  2. use it flawlessly in other pickers.
  3. try to use it in telescope file browser
  4. wonder why it doesn't work

Expected behavior

a window with the shortcut should appear as in other pickers.

Actual behavior

nothing shows up

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-file-browser.nvim',
        },
      },
      -- 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('file_browser')
  -- 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()]]

How to override default mappings

I'm trying to override the default mappings given by this extension. For example, I want to remape <C-f> to <Right>. However, I am unable to do so.

This is an extract from my config (I have a lot of other mappings):

    local fb_actions = require 'telescope'.extensions.file_browser.actions
    local imaps = {
      ['<C-f>'] = { '<Right>',  type = 'command' },
    }
    require'telescope'.setup {
      extensions = {
        file_browser = { mappings = { i = imaps, }, },
      },
    }

I was looking through the source code for this plugin, and saw that the fb_actions were being mapped in attach_mappings. This runs after extension mappings are set, meaning my mappings are being overriden by this plugin.

I'm still new to Telescope and the way things are organized, so apologies if this is already answered elsewhere, but how can I override attach_mappings this to disable these mappings? And is there any way I can do this without having to copy and paste in the replace_if chunk of code? (I'm not actually sure what that's doing.)

Close keymap window if escape is pressed

I would love it if the help box (keymap window) would go away if i press esc. I always look for help and then want it to go but pressing escape just closes Telescope.
I don't see a reason why it would stay even after I type something since its even hiding most of the screen.
Thanks for an amazing plugin!

C-t doesn't open file in new tab

Description

When browsing files, C-x and C-v behave properly, but C-t doesn't seem to open file in new tab. When using telescope live grep, or file finding, this seems to work fine.

Neovim version

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

Operating system and version

macOS 11.6

Steps to reproduce

  1. Start file browser
  2. Look around for a file
  3. C-t to open in new tab (not working)

teslescope-config.lua

local telescope = require("telescope")
local actions = require("telescope.actions")

telescope.setup({
	defaults = {
		file_sorter = require("telescope.sorters").get_fzy_sorter,
		file_ignore_patterns = { "node_modules", ".git", "cache", "dist" },
		mappings = {
			n = {
				["q"] = actions.close,
			},
		},
	},
	extensions = {
		fzy_native = {
			fuzzy = true, -- false will only do exact matching
			override_generic_sorter = true,
			override_file_sorter = true,
			case_mode = "smart_case", -- or "ignore_case" or "respect_case"
			-- the default case_mode is "smart_case"
			-- hidden = true,                   -- Show hidden files
			-- fuzzy = true,                    -- false will only do exact matching
			-- override_generic_sorter = true,  -- override the generic sorter
			-- override_file_sorter = true,     -- override the file sorter
			-- case_mode = "smart_case",        -- or "ignore_case" or "respect_case"
			--                                  -- the default case_mode is "smart_case"
		},
	},
})

telescope.load_extension("fzy_native")
telescope.load_extension("file_browser")

-- Dotfiles Shortcut
local M = {}

M.search_dotfiles = function()
	require("telescope.builtin").find_files({
		prompt_title = "< Dotfiles >",
		cwd = "~/dotfiles",
	})
end

M.git_branches = function()
	require("telescope.builtin").git_branches({
		attach_mappings = function(prompt_bufnr, map)
			map("i", "C-d", actions.git_delete_branch)
			map("n", "C-d", actions.git_delete_branch)
			return true
		end,
	})
end

return M

Expected behavior

When you C-t, file should open up in new tab.

Actual behavior

C-t goes to bottom of the file browser list.

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-file-browser.nvim',
        },
      },
      -- 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('file_browser')
  -- 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()]]

file_browser not opening the current buffer path

Description

When I do a :Telescope file_browser path='%:p:h', it does not open path/directory structure of the current open buffer.
I also tried with double quotes, meaning, path="%:p:h", still same issue.

See below GIF for more info.
Peek 2022-01-18 23-45

Issue described by GIF shall be sufficient. Let me know if more info is required.

Neovim version

NVIM v0.7.0-dev
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3

Operating system and version

Linux 5.11.0-46-generic 20.04.1-Ubuntu

Steps to reproduce

  1. Open a file
  2. Run the command :Telescope file_browser path='%:p:h'

Expected behavior

No response

Actual behavior

The current buffer path should be opened, which is not happening.

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-file-browser.nvim',
        },
      },
      -- 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('file_browser')
  -- 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()]]

Gitignore Folder Bug

Description

NOTE: not using a minimal config because bug is dependent on an external gitignore file, and I know the source of the issue is within the file-browser itself.

Suppose a folder is ignored in .gitignore like so:
folder/

Both git and fd interpret this to ignore the folder and its contents

file-browser, on the other hand, only ignores the folder's contents, and the folder itself is still visible.

Neovim version

NVIM v0.7.0-dev+850-ge92b81633
Build type: Release
LuaJIT 2.1.0-beta3

Operating system and version

macOS 11.5

Steps to reproduce

  1. Have gitignore that ignores any folder and its contents with the below syntax
folder/
  1. Make directory with corresponding name
  2. Run file-browser in the parent directory respecting .gitignore

Expected behavior

folder and its contents are both not shown by the file browser

Actual behavior

folder is shown by the file browser, but its contents are correctly ignored

Running fd on the directory ignores both folder and its contents, and I believe file-browser should replicate this behavior

NOTE: The bug is resolved by adding both folder/ and folder to the gitignore.

Not a big deal to resolve on the user end. But why isn't this the default, when both git and fd ignore the folder and its contents as a whole with this syntax?

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-file-browser.nvim',
        },
      },
      -- 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('file_browser')
  -- 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()]]

Focus on correct entry

Considering the following cases:

  1. When we go to the parent directory, the selection is reset to the first entry, can we provide an option to make it focus on the directory where we backwards?
  2. When a file is created, will it be better if we can focus on the new entry?

Add "quiet" config option to suppress action confirmation print statements

Is your feature request related to a problem? Please describe.

Whenever I execute a file action (eg: delete a file), I find the additional confirmation at the end of the action, which then requires an additional enter to dismiss, breaks my workflow

eg:

These files are going to be deleted:
/tmp/foo
Remove selected files [y/N]: y
/tmp/foo has been removed!                             \ these 2 lines
Press ENTER or type command to continue                / 

ie: the following print statements in actions.lua

print(string.format("%s has been moved!", filename))
print(string.format("\n%s has been removed!", p:absolute()))

Describe the solution you'd like

I would like a "quiet" config option which prevents the action confirmation print statement being output

Open file browser on VimEnter,BufEnter

Is your feature request related to a problem? Please describe.
I would like the file browser to open if the path is a directory e.g. nvim ~/ or :e ~/.

Describe the solution you'd like
VimEnter,BufEnter autocommands to open the file browser.

Describe alternatives you've considered
I could write these myself but figured it was worth checking if their was interest in including them in the main repo. This is a quick example but has some issues such as leaving an empty buffer of the directory.
autocmd! VimEnter * if isdirectory(expand('%:p')) | exe 'Telescope file_browser' | endif

Additional context
N/a

file_browser still throwing attempt to index a nil value

Description

I think the file_browser was somehow missed when implementing
nvim-telescope/telescope.nvim#1289
The file_browser picker still throws the error when hitting return on an empty list ๐Ÿ˜บ

Neovim version

NVIM v0.6.0-dev+627-gb5b025f6a
Build type: RelWithDebInfo
LuaJIT 2.0.5
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions     -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security     -fstack-clash-protection -fcf-protection -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I[..]/neovim-git/src/build/config -I[..]/neovim-git/src/neovim-git/src -I/usr/include -I[..]/neovim-git/src/build/src/nvim/auto -I[..]/neovim-git/src/build/include
Compiled by aron

Operating system and version

Arch Linux x86_64 @ 5.15.5-arch1-1

checkhealth telescope

telescope: require("telescope.health").check()
========================================================================
## Checking for required plugins
  - OK: plenary installed.
  - OK: nvim-treesitter installed.

## Checking external dependencies
  - OK: rg: found ripgrep 13.0.0
  - OK: fd: found fd 8.3.0

## ===== Installed extensions =====

Steps to reproduce

  1. Open the file_browser
  2. Enter something that leads to an empty selection
  3. Hit enter

Expected behavior

Print [telescope] Nothing currently selected like find_files or other pickers

Actual behavior

E5108: Error executing lua ...ker/start/telescope.nvim/lua/telescope/builtin/files.lua:374: attempt to index a nil value    
stack traceback:                                                                                                            
        ...ker/start/telescope.nvim/lua/telescope/builtin/files.lua:374: in function 'condition'                            
        ...packer/start/telescope.nvim/lua/telescope/actions/mt.lua:8: in function 'run_replace_or_original'                
        ...packer/start/telescope.nvim/lua/telescope/actions/mt.lua:30: in function 'run_replace_or_original'               
        ...packer/start/telescope.nvim/lua/telescope/actions/mt.lua:30: in function 'key_func'                              
        ...k/packer/start/telescope.nvim/lua/telescope/mappings.lua:235: in function 'execute_keymap'                       
        [string ":lua"]:1: in main chunk                                       

Folder Browser Create File in selected folder

Describe the solution you'd like
When entering the Folder Browser i'd like be able with the c button to create a file inside the fuzzy found folder.
Right now i'd have to enter the folder and create the file from the file browser

Describe alternatives you've considered
none :(

Performance

Description

Finder performance currently is abysmally slow compared to what it should be. My hunch is that the metatable gymnastics of finders significantly slow down the picker.

This can be observed with folder browsing in very large repositories. Compared to a plain custom plenary.scandir picker ala

local scan = require("plenary.scandir")
local finders = require("telescope.finders")
local pickers = require("telescope.pickers")
local conf = require("telescope.config").values

local make_entry = function(entry)
	return { ordinal = entry, display = entry, value = entry }
end

local pick_folders = function(opts)
	opts = opts or {}

	local cwd = vim.loop.cwd()
	opts.depth = vim.F.if_nil(opts.depth, 1)
	opts.cwd = opts.cwd and vim.fn.expand(opts.cwd) or cwd
	opts.path = opts.path and vim.fn.expand(opts.path) or cwd
	opts.files = vim.F.if_nil(opts.files, true)
	pickers.new(opts, {
		prompt_title = "Folder Browser",
		finder = finders.new_table({
			results = scan.scan_dir(vim.loop.cwd(), { only_dirs = false }),
			entry_maker = make_entry,
		}),
		previewer = conf.file_previewer(opts),
		sorter = conf.file_sorter(opts),
	}):find()
end

The file browser extension is extremely slow. Once the finder of finders is bypassed, the extension is just as fast. That'll require some more investigation.

Neovim version

NVIM v0.7.0-dev+717-gf37c5f180
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions     -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security     -fstack-clash-protection -fcf-protection -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/fdschmidt/.cache/paru/clone/neovim-git/src/build/config -I/home/fdschmidt/.cache/paru/clone/neovim-git/src/neovim-git/src -I/usr/include -I/home/fdschmidt/.cache/paru/clone/neovim-git/src/build/src/nvim/auto -I/home/fdschmidt/.cache/paru/clone/neovim-git/src/build/include
Compiled by fdschmidt

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Operating system and version

Arch Linux

Steps to reproduce

  1. Go to large repository with thousands of folders
  2. Attempt to folder browse

Expected behavior

Browsing should be very fast as plenary.scandir is extremely fast.

Actual behavior

Very slow browsing.

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-file-browser.nvim',
        },
      },
      -- 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('file_browser')
  -- 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()]]

Incompatible with dressing.nvim

Description

Not sure if this issue should be raised here or at https://github.com/stevearc/dressing.nvim but these plugins don't work well together when for example creating new files. See below.

Neovim version

NVIM v0.7.0-dev+890-g574a582202
Build type: RelWithDebInfo
LuaJIT 2.0.5

Operating system and version

arch linux 5.15.12-arch1-1

Steps to reproduce

  1. have telescope-file-browser.nvim and dressing.nvim installed.
  2. create a new file using the browser
  3. enter the file name and click enter

Expected behavior

The telescope prompt to stay open and no error being raised.

Actual behavior

You get the error:

Error executing vim.schedule lua callback: ...pack/packer/opt/telescope.nvim/lua/telescope/pickers.lua:851: Invalid buffer id: 7
stack traceback:
        [C]: in function 'nvim_buf_set_lines'
        ...pack/packer/opt/telescope.nvim/lua/telescope/pickers.lua:851: in function 'reset_prompt'
        ...pack/packer/opt/telescope.nvim/lua/telescope/pickers.lua:874: in function 'refresh'
        ....nvim/lua/telescope/_extensions/file_browser/actions.lua:82: in function 'on_confirm'
        ...e/pack/packer/start/dressing.nvim/lua/dressing/input.lua:72: in function ''
        vim.lua: in function ''
        vim.lua: in function <vim.lua:0>

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-file-browser.nvim',
        },
      },
      'stevearc/dressing.nvim',
    },
    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('file_browser')
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()]]

A shortcut to open buffer as split

Is your feature request related to a problem? Please describe.
It is an inconvenience that opens the file as a new tab, then splits it.

Describe the solution you'd like
A shortcut.

Describe alternatives you've considered
I think it can write in function, but I am new to Lua, definitely cost a lot of time to figure out. You can write an example code and put it in a doc, so a newbie can follow it.

request: input callbacks to move to $home and cwd

As brought up by @skebanga on the telescope-gitter

I would like to suggest an enhancement to telescope-file-browser. Namely, that if the user types ~/, the cwd is changed to ${HOME}; similarly, if the user types / the cwd is changed to root, Perhaps these could/should be controlled behind some options. I'm happy to take on the work to add this, but was hoping you'd give me a pointer as to where to start? The primary issue I see is that it's not a keybinding per-se, it's more like upon a keypress in insert mode, if the current path matches regex"^/$"then change to root and refresh, or if the current path matches regex "^~/$" then change to ${HOME}. Do you think this would be possible?

Remote Filesystem Support (Request)

Is your feature request related to a problem? Please describe.
As of current, there are quite a few different local file system browser plugins for Neovim. There is really only 1 remote filesystem browser and that is the built in NetRW. NetRW has its flaws, namely being its counterintuitive approach to navigating files (It is core vim).

Telescope File Browser is an amazing telescope plugin, and I feel it could move even further ahead of other filesystem plugins by integrating ssh support.

Describe the solution you'd like
In a perfect world, we would be able to open a remote filesystem via neovim directly (which would use netrw) and then browse/manage said filesystem via the telescope-file-browser plugin

Describe alternatives you've considered
NetRW, as described above, is the only one that I am familiar with that supports remote file systems. It is... not amazing, though it is currently the only tool for the job.
Distant.nvim is another alternative, though I haven't played with it much as it depends on distant being installed on the remote client and that is not always an option (I am adverse to installing IDE dependencies on production machines)

path/cwd options produce absolute paths on initial load

Description

On initial load of file browser files are incorrectly prefixed with absolute path while no paths should be visible at all (just filenames).

Neovim version

NVIM v0.7.0-dev+870-g43b95b543
Build type: Release
LuaJIT 2.1.0-beta3

Operating system and version

macOS 12.1

Steps to reproduce

  1. nvim --clean -u minimal.lua
  2. Hit - to open file browser
  3. Observe "Actual behaviour"
  4. Go one level up by hitting ../
  5. Return to previous directory (optional)
  6. Observe "Expected behaviour"

Expected behavior

See files without paths as it should be displaying relatively to current buffer's directory.

Actual behavior

Files displayed with absolute paths, for example:

/Users/gegoune/dotfiles/nvim/after/plugin

(after changing directory from initial one files are not prefixed with absolute path any more)

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-file-browser.nvim',
        },
      },
    },
    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('file_browser')

  vim.keymap.set('n', '-', function()
    require('telescope').extensions.file_browser.file_browser {
      path = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(0), ':.:h'),
      cwd = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(0), ':.:h'),
    }
  end)
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()]]

add option to auto focus on the entry of current buffer when the displayed directory is the directory of current file

Reasons

A new operation mode is entered when fb is started with its own key mappings, it is glad for me to map '-' to open fb in the current directory and use the buffer key mappings. For example, I set the initial mode to normal and map L to open on the right, and it will not occupy the mapping of <m-l> or <c-l> . It is more convenient than run commands in the command line! But I think there can be a little improvement, it will be better if it can try to focus on the current buffer when someone prefers to operate on the file of current buffer.

Since fb can make use of the fuzzy search of upstream, the initial selection of entry may be not so important.

Some details

The possible way is to provide an option such as auto_focus, so that users can set it to true in the setup function or pass it to the startup function.

Note that hidden files need to be toggled if the file of current buffer is a hidden file.

Well, it is better to also control auto_focus by adding a new action auto_focus_toggle :)

remove current folder from results

I don't think this is a bug but I rly don't like it
I'm in my neovim config and use telescope file browser.
the results look sth like this:
Screenshot 2022-01-11 at 11 14 01

Is it possible to get rid of the ../nvim_config in from of every result?
Perhaps make this configurable

CD to git root directory

Is your feature request related to a problem? Please describe.
Easier way to change nvim cwd to git root using the file browser

Describe the solution you'd like
While in file_browser, C-r would change cwd to git root directory or some other keybind

Describe alternatives you've considered
Using vim fugitve then using telescope file_browswer.

Additional context
Add any other context or screenshots about the feature request here.

Switch from file/folder mode changes current directory back to 'cwd'

Description

Switch from file/folder mode changes current directory back to cwd, that seems a bit weird, I would expect the current directory to remain the same. Ultimately, as a user, I only want to change the mode from where I am, I don't want to go back to cwd unless I specifically ask for it.

Neovim version

NVIM v0.7.0-dev+792-gc46f7caad
Build type: RelWithDebInfo

Operating system and version

Ubuntu 20.04

Steps to reproduce

  1. Open file browser in file mode
  2. Navigate to a sub-directory
  3. Change to folder mode
  4. The current directory goes back to cwd

Expected behavior

  1. Open file browser in file mode
  2. Navigate to a sub-directory
  3. Change to folder mode
  4. The current directory remains the same, only change the mode to folder mode.

Actual behavior

change-to-folder-mode-goes-back-to-cwd

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-file-browser.nvim',
        },
      },
      -- 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('file_browser')
  -- 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()]]

Error when border = false

Description

The picker crashes when border = false

I have a potential fix on my branch
https://github.com/PaterJason/telescope-file-browser.nvim/commit/1ab67bc7d3a97f008992ff4f335313fb02345648

Neovim version

NVIM v0.6.0
Build type: Release
LuaJIT 2.0.5

Operating system and version

Arch Linux

Steps to reproduce

  1. nvim -nu minimal.lua
  2. Command lua require 'telescope'.extensions.file_browser.file_browser()<CR>
  3. Enter any directory

Expected behavior

No response

Actual behavior

E5108: Error executing lua ...-browser.nvim/lua/telescope/_extensions/file_browser.lua:96: attempt to index field 'prompt_border' (a nil value)
stack traceback:
        ...-browser.nvim/lua/telescope/_extensions/file_browser.lua:96: in function 'run_replace_or_original'
        ...packer/start/telescope.nvim/lua/telescope/actions/mt.lua:30: in function 'run_replace_or_original'
        ...packer/start/telescope.nvim/lua/telescope/actions/mt.lua:30: in function 'key_func'
        ...k/packer/start/telescope.nvim/lua/telescope/mappings.lua:235: in function 'execute_keymap'
        [string ":lua"]:1: in main chunk

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-file-browser.nvim',
        },
      },
      -- 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{ defaults = { border = false } }
  require('telescope').load_extension('file_browser')
  -- 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()]]

Having to confirm twice on operation cancel

Description

This is annoying a bit. the second line printed makes the prompt stay there instead of just be printed in console.
Screen Shot 2022-01-26 at 3 04 36 PM

maybe differing results would make sense and solve this?

Neovim version

NVIM v0.6.1

Operating system and version

macOs

Steps to reproduce

  1. create/rename/delete
  2. cancel or confirm
  3. console await user input

Expected behavior

after confirming or canceling action the focus should be back on the browser

Actual behavior

Await additional input.

Minimal config

..

E5108 Error when pressing <CR> with any string that doesn't match a file/folder

Description

I get this error if I type any nonsense in the file browser text area (so a string that doesn't match a file/folder) and press enter:

E5108: Error executing lua ...r.nvim/lua/telescope/_extensions/file_browser/picker.lua:82: attempt to inde
x a nil value
stack traceback:
        ...r.nvim/lua/telescope/_extensions/file_browser/picker.lua:82: in function 'condition'
        ...k/packer/opt/telescope.nvim/lua/telescope/actions/mt.lua:8: in function 'run_replace_or_origina
l'
        ...k/packer/opt/telescope.nvim/lua/telescope/actions/mt.lua:30: in function 'run_replace_or_origin
al'
        ...k/packer/opt/telescope.nvim/lua/telescope/actions/mt.lua:30: in function 'key_func'
        ...ack/packer/opt/telescope.nvim/lua/telescope/mappings.lua:235: in function 'execute_keymap'
        [string ":lua"]:1: in main chunk

Possibly related to #7

Neovim version

NVIM v0.6.0-dev+2040-g8cbe100fc
Build type: Release
LuaJIT 2.1.0-beta3

Operating system and version

macOS 11.6.1

Steps to reproduce

Type any string into the File Browser input that doesn't find a file and press

Expected behavior

Nothing

Actual behavior

That error appears

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-file-browser.nvim',
        },
      },
      -- 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('file_browser')
  -- 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()]]

Breaking Changes

This pinned issue is supposed to announce breaking changes (and possibly other critical info) to users.

The idea is that we announce (potentially) breaking changes hopefully with sufficient time (ideally weeks) in advance. Therefore, it is recommended to subscribe to the issue as means to keep informed about breaking news.

requiring actions causes setup not to work

Description

First off, thank you everyone that's ever worked on any telescope related project, it's so cool and I use it everyday.

I've been trying to setup file_browser to be my main file browsing plugin, however:
With the config

	local fb_actions = require("telescope").extensions.file_browser.actions
	require("telescope").setup({
		extensions = {
			file_browser = {
				theme = "ivy",
				mappings = {
					n = {
						["B"] = function()
							print("test")
						end,
					},
				},
			},
		},
	})
	require("telescope").load_extension("file_browser")
	vim.api.nvim_set_keymap(
		"n",
		"<Leader>n",
		"<cmd>lua require 'telescope'.extensions.file_browser.file_browser()<CR>",
		{ noremap = true, silent = true }
	)

neither the theme or any of the mappings appear when I either use the mapping <Leader>n or call lua require 'telescope'.extensions.file_browser.file_browser()

However, when I remove the actions require and change it to something like

	require("telescope").setup({
		extensions = {
			file_browser = {
				theme = "ivy",
				mappings = {
					n = {
						["B"] = function()
							print("test")
						end,
					},
				},
			},
		},
	})
	require("telescope").load_extension("file_browser")
	vim.api.nvim_set_keymap(
		"n",
		"<Leader>n",
		"<cmd>lua require 'telescope'.extensions.file_browser.file_browser()<CR>",
		{ noremap = true, silent = true }
	)

Both he theme and the mappings work perfectly.

I therefore believe it's due to the actions require at the top.
I'll look into it more in the code but thought I'd make an issue first to track it.

Neovim version

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

Operating system and version

macOS 12.0.1

Steps to reproduce

  1. nvim -nu minimal.lua
  2. n
  3. (to enter normal mode)
  4. B (should print out "test")

Expected behavior

When I open the file browser, it will have the theme I specified and the mappings which I specify.

Actual behavior

Actually doesn't have the config I specify or the mappings.

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-file-browser.nvim",
				},
			},
			-- 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()
	local fb_actions = require("telescope").extensions.file_browser.actions
	require("telescope").setup({
		extensions = {
			file_browser = {
				theme = "ivy",
				mappings = {
					n = {
						["B"] = function()
							print("test")
						end,
					},
				},
			},
		},
	})
	require("telescope").load_extension("file_browser")
	vim.api.nvim_set_keymap(
		"n",
		"<Leader>n",
		"<cmd>lua require 'telescope'.extensions.file_browser.file_browser()<CR>",
		{ noremap = true, silent = true }
	)
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()]])

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.