lukas-reineke / indent-blankline.nvim

Indent guides for Neovim
MIT License
4.16k stars 102 forks source link

Enable in telescope preview #764

Closed smartinellimarco closed 11 months ago

smartinellimarco commented 11 months ago

Hello, I was wondering if there is a way to enable the indentation lines in telescope previews (find_files, live_grep).

Screenshot 2023-11-02 at 16 28 03

This is my Telescope config:

local M = { 'nvim-telescope/telescope.nvim' }

M.tag = '0.1.3'
M.dependencies = {
  { 'nvim-lua/plenary.nvim' },
  {
    'nvim-telescope/telescope-fzf-native.nvim',
    build = 'make'
  }
}
M.opts = {
  defaults = {
    file_ignore_patterns = {
      '.git/.*',
      '.venv/.*',
      -- '!.env' TODO: fix
    }
  },
  pickers = {
    find_files = {
      hidden = true,
    },
    diagnostics = {
      initial_mode = 'normal'
    }
  }
}

function M.config(_, opts)
  local builtin = require('telescope.builtin')

  require('telescope').setup(opts)

  -- Show line numbers in the preview
  vim.cmd "autocmd User TelescopePreviewerLoaded setlocal number"

  vim.keymap.set('n', '<leader>e', builtin.find_files, {})
  vim.keymap.set('n', '<leader>f', builtin.live_grep, {})
end

return M

-- vim: ts=2 sts=2 sw=2 et

And IBL:

local M = { 'lukas-reineke/indent-blankline.nvim' }

M.main = 'ibl'
M.opts = {
  indent = { char = '┊' },
  scope = { enabled = false },
}

function M.config(_, opts)
  require('ibl').setup(opts)
end

return M

-- vim: ts=2 sts=2 sw=2 et

Thanks in advance!

lukas-reineke commented 11 months ago

Sorry, I don't use telescope, I know almost nothing about it. I believe the previews are just normal buffers, so it should be possible. You probably have more luck asking in the telescope repo.

AlexvZyl commented 4 months ago

@smartinellimarco Were you able to achieve this?

smartinellimarco commented 4 months ago

@AlexvZyl No sorry I haven't tried since