folke / trouble.nvim

🚦 A pretty diagnostics, references, telescope results, quickfix and location list to help you solve all the trouble your code is causing.
Apache License 2.0
5.11k stars 173 forks source link

bug: weird formating of preview buffers on windows 11 #518

Closed chshrct closed 1 week ago

chshrct commented 1 week ago

Did you check docs and existing issues?

Neovim version (nvim -v)

0.10

Operating system/version

Windows 11

Describe the bug

alacritty_I5E6aANBuO Hi, folke. After major update of Trouble on windows 11, I encountered issues with formatting preview buffers. Could you please advise on how to address this?

Steps To Reproduce

-

Expected Behavior

-

Repro

-- DO NOT change the paths and don't remove the colorscheme
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.loop.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 = {
  "folke/tokyonight.nvim",
  "folke/trouble.nvim",
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here
b0ae989c commented 1 week ago

There is no preview buffer in your screenshot. What's the issue?

This should be https://github.com/folke/trouble.nvim/discussions

chshrct commented 1 week ago

alacritty_yVrJu6Sk58 Each line in the preview items from Trouble on Windows 11 ends with ^M. It seems like a CRLF issue.