Giter Site home page Giter Site logo

dir-telescope.nvim's Introduction

dir-telescope.nvim

Perform telescope.nvim functions in selected directories

dir-telescope.mp4

Installation

use({
  "princejoogie/dir-telescope.nvim",
  -- telescope.nvim is a required dependency
  requires = {"nvim-telescope/telescope.nvim"},
  config = function()
    require("dir-telescope").setup({
      -- these are the default options set
      hidden = true,
      no_ignore = false,
      show_preview = true,
    })
  end,
})

Usage

  1. dir-telescope can be used in two ways, either as a telescope extension or as user commands.
  2. the commands will open a telescope picker with the list of directories in your current working directory.
  3. you can select a directory by hitting Enter or select multiple directories to filter with Tab
  4. it will then perform either a live_grep or find_files on your selected directories
  5. (tip): <C-q> will save your queries in a quickfix list. this is the default binding for telescope.nvim

With Telescope extensions

require("telescope").load_extension("dir")

To use the extension simply run :Telescope dir live_grep or :Telescope dir find_files. These will respect the options you have set during configuration.

Setting keymaps for telescope extensions

vim.keymap.set("n", "<leader>fd", "<cmd>Telescope dir live_grep<CR>", { noremap = true, silent = true })
vim.keymap.set("n", "<leader>pd", "<cmd>Telescope dir find_files<CR>", { noremap = true, silent = true })

Programatically call the extension

require("telescope").extensions.dir.live_grep()
require("telescope").extensions.dir.find_files()

With User commands

dir-telescope creates two user commands :GrepInDirectory and :FileInDirectory which you can map to any liking you want.

Setting keymaps for user commands

vim.keymap.set("n", "<leader>fd", "<cmd>GrepInDirectory<CR>", { noremap = true, silent = true })
vim.keymap.set("n", "<leader>pd", "<cmd>FileInDirectory<CR>", { noremap = true, silent = true })

Contributing

Intructions for contributing is documented in th CONTRIBUTING.md guide


Made with โ˜• by Prince Carlo Juguilon

dir-telescope.nvim's People

Contributors

princejoogie avatar

Watchers

 avatar

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.