telescope.nvim icon indicating copy to clipboard operation
telescope.nvim copied to clipboard

Border false introduces background bleed

Open vikfroberg opened this issue 1 year ago • 1 comments

Description

Before toggling Telescope: Screenshot 2024-06-27 at 08 19 12

After toggling Telescope: Screenshot 2024-06-27 at 08 19 21

You can see that "nvim-telescope/telescope.nvim" is seen through the Telescope window.

Neovim version

NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1716656478

Operating system and version

macOS 14.4.1

Telescope version / branch / rev

telescope 0.1.8

checkhealth telescope

telescope: health#telescope#check

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

Checking external dependencies ~
- OK rg: found ripgrep 14.1.0
- OK fd: found fd 8.2.1

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

Telescope Extension: `smart_open` ~
- No healthcheck provided

Steps to reproduce

{
  defaults = {
    border = false,
  },
},

Expected behavior

The spacing between the prompt and results should disappear or the background should be opaque

Actual behavior

Background is transparent between prompt and results

Minimal config

local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs { "config", "data", "state", "cache" } do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.uv.fs_stat(lazypath) then
  vim.fn.system {
    "git",
    "clone",
    "--filter=blob:none",
    "https://github.com/folke/lazy.nvim.git",
    lazypath,
  }
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  {
    "nvim-telescope/telescope.nvim",
    dependencies = {
      "nvim-lua/plenary.nvim",
    },
    config = function()
      -- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
      require("telescope").setup {
        defaults = {
          border = false,
        }
      }
    end,
  },
}

require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vikfroberg avatar Jun 27 '24 07:06 vikfroberg

I think you actually just need to do border=true and then tweak the border highlight groups so that bg and fg are the same. The groups of interest.

  TelescopeBorder = { default = true, link = "TelescopeNormal" },
  TelescopePromptBorder = { default = true, link = "TelescopeBorder" },
  TelescopeResultsBorder = { default = true, link = "TelescopeBorder" },
  TelescopePreviewBorder = { default = true, link = "TelescopeBorder" },

You can go deeper and remove the gaps between the windows using something like this https://github.com/nvim-telescope/telescope.nvim/wiki/Configuration-Recipes#fused-layout

Hope that helps.

jamestrew avatar Jun 29 '24 04:06 jamestrew