echasnovski / mini.nvim

Library of 40+ independent Lua modules improving overall Neovim (version 0.8 and higher) experience with minimal effort
MIT License
4.85k stars 183 forks source link

mini.trailspace highlights in LazyVim startup screen #631

Closed HaleTom closed 8 months ago

HaleTom commented 8 months ago

Contributing guidelines

Module(s)

trailspace

Description

On starting LazyVim, it looks horrible:

image

Config:

Neovim version

NVIM v0.9.4

Steps to reproduce

  1. Install (LazyVim](https://www.lazyvim.org/installation)
  2. Setup trailspace:
return {
  "echasnovski/mini.trailspace",
  event = "VeryLazy",
  opts = {
    only_in_normal_buffers = true,
  },
}
  1. Start neovim

Expected behavior

No red on screen.

Actual behavior

See top screenshot.

HaleTom commented 8 months ago

Ideally, it would be great to have a way to disable / blacklist for various filetypes that commonly have trailing whitespace.

HaleTom commented 8 months ago

Buftype blacklist would also be great :)

echasnovski commented 8 months ago

Thanks for the issue!

At first glance it seems like some misconfiguration issue, but I'll look into it.

Ideally, it would be great to have a way to disable / blacklist for various filetypes that commonly have trailing whitespace.

Buftype blacklist would also be great :)

Precisely because of such various use cases there won't be dedicated blocklists for filetype-buftype-etc. See disabling section in help file.

echasnovski commented 8 months ago

Here 'mini.trailspace' works as expected.

The 'dashboard-nvim' uses normal buffer to display its content (see here).

You can disable for 'dashboard' filetype like this (autocommand should be done before dashboard creates its buffer):

vim.cmd('au FileType dashboard lua vim.b.minitrailspace_disable = true')
require('dashboard').setup()