Skip to content

A simple Telescope extension to search through the lines in the current buffer

License

Notifications You must be signed in to change notification settings

neanias/telescope-lines.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

telescope-lines.nvim

A simple Telescope extension to search through the lines in the current buffer.

Installation

Using packer.nvim:

use({
  "neanias/telescope-lines.nvim",
  requires = "nvim-telescope/telescope.nvim",
})

Setup

To enable the extension, add this to your config:

require("telescope").load_extension("lines")

To configure the plugin, you can add to the telescope setup:

local telescope = require("telescope")
telescope.setup({
  -- ...
  extensions = {
    -- These are the default values.
    lines = {
      hide_empty_lines = true,
      trim_lines = true,
    },
  },
})

-- `load_extension` must be called after `telescope.setup`
telescope.load_extension("lines")

The two configuration fields are hide_empty_lines and trim_lines as noted above. hide_empty_lines will hide any lines that are just whitespace from being in the picker, whilst trim_lines will trim leading & trailing whitespace from the lines before sending them to the picker.

Usage

This can be run as a Telescope command

:Telescope lines

or called directly in lua

:lua require("telescope").extensions.lines.lines()

About

A simple Telescope extension to search through the lines in the current buffer

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages