Here's a minimal reproducer, following the format of nvim issue reproducers. Run with nvim --clean -u minimal.lua. Open a quickfix list with the two files in question using :FixedQuickfix.
If you open the markdown file first, then then yaml file, the yaml file will be soft wrapped too, which it shouldn't be, as the filetype is not in the allowlist.
I had trouble getting soft wrapping to trigger, so I just fudged it. I wasn't sure if the tree-sitter plugin was needed or not, I added it while trying to get soft wrapping to kick in but it didn't help.
This is with nvim revision aeeadddac43b999a4bc6f57cbbdd2d7c7f1d08e4.
minimal.lua
-- Run this file as `nvim --clean -u minimal.lua`
for name, url in pairs {
-- 'https://github.com/nvim-treesitter/nvim-treesitter/',
'https://github.com/andrewferrier/wrapping.nvim',
} do
local install_path = vim.fn.fnamemodify('nvim_issue/' .. name, ':p')
if vim.fn.isdirectory(install_path) == 0 then
vim.fn.system { 'git', 'clone', '--depth=1', url, install_path }
end
vim.opt.runtimepath:append(install_path)
end
-- ADD INIT.LUA SETTINGS _NECESSARY_ FOR REPRODUCING THE ISSUE
-- Plugin: Wrapping
require("wrapping").setup({
softener = { markdown = 10000000 },
auto_set_mode_filetype_allowlist = {
"asciidoc",
"gitcommit",
"latex",
"mail",
"markdown",
"rst",
"tex",
"text",
},
})
function OpenFixedQuickfix()
local items = {
{filename = "should-wrap.md", lnum = 1, col = 1, text = "example 1 example 1 example 1 example 1 example 1 example 1 example 1 example 1 example 1 example 1 example 1 example 1 example 1 example 1 example 1 example 1 example 1"},
{filename = "should-not-wrap.yaml", lnum = 1, col = 1, text = "example 2 example 2 example 2 example 2 example 2 example 2 example 2 example 2 example 2 example 2 example 2 example 2 example 2 example 2 example 2 example 2 example 2"},
}
vim.fn.setqflist(items, ' ', 'Hard‑coded locations')
vim.cmd('copen')
end
vim.api.nvim_create_user_command('FixedQuickfix', function()
OpenFixedQuickfix()
end, {})
should-wrap.md
# Hello
The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog.
should-not-wrap.yaml
should_not_wrap: "3odue+rbx+6BgimmUoME/k4B48/9u1cs/LaxwLlW8Y6YHZk9+aeEnSvHU54JMnXSIF/dZ6VxXEm2pqDhSwcx4K75hT6cLRUpxMETRdtcFW1wLGCymr1jufqSE/t1SJzt/e8cJOWK3sqgPfNAmqgS0BtVC7DzwPv3oy9vunBkfJPZtI01yDNLMhUNrfRjqhfieWeqXMzBoA3jF+7R4I7s9MCOzjAWJkrQzgputsleBqjxae6B0I1KmAbSvAnJTfbjIXxw13d0iAbwQEAlovlfq9FJ84p3WFJYjSxOuHCuRsVcMRFUD4y/bYI/W8n9KRucXJzOK6DmG6BrD8qjmjZZGOvZrxnO1m1uPrJQED1YEr8lZha/RoAy5hrn3WbSSIVjDdAcFfaqLJYsBvsSinNH6JHEO69QKYpgrc9Zhu+KrHyAyPri0kTvccxGPO6ZIZcBnc/GniWpqkxkY89x/zJPtF3f44iOHEoWNIV2FXVDKdPus5q6hCccWSsHK8kINazx+wHFH5t6T2T1MU3CvHO7fjXprEC0fHGoyAUijKX/f02rOfiUa+0+SjigZBeY7UXbc24jpRzMtjoJ0UuUbknxblmy7tdxYBRZcC4fQShfJ47nD5B2PbMqYWEJhvXCrNvht/m4DuRrmu2NUDQSUTHu6H1C2s+o7QKGWKIlo0A1h2mR515hdoRCg9mA8/H8yd6X5A8Y2uZwTdOkx+jei+oyv4lWUi/n+K64aNZwh0WjMk4U6uwzwND2u+NBt0m9M9Y4oDymxsY7mc/0D3XBy0SMHgWHVnj1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WKvHGr5jnJr3s44QoySkbJGGXe0sTAhyy3RxKTnyl/QT90l/YLwPl2ZHYutTSL9cxCpzCUvBELDAMDNqfpLuAJZGqfXLYc6igGIymq9U6cf4Ioh4c01C/KH1D35sk0aSASsHdmJWZ4PuJQWX1zKjLV4f4Siu5LdXEz1ZLiSkVSUnKmf9xovv4h/dbQrCCVafDO95QdQ35aAWT6VU++QJSuqjY38XitpYAgCsq2CNBLrzsdO3H98XWVewGgjCKtWNvQHjFbaIE4Dq6DYTZ5amfQlbWm966BVHPRrLkESgVZKHu0cgJR1FGHe564V8lkEo2n4r90SaSm2+P9L22xLlHOQyS4zF+w5HlIEUZEADUBy0RmBv27PPQrLtTuROXlEgJVXXOaHAsGBDtXJrE6tsUC0QJwIsUR7jj9MhEPIMt4LJh4azNd6RpuDEj2apylTK3BBC7SI0chAKgGv7srHDoIikmy7GSw4k6ykCLbUPZSa3KBazVShsV2t3sWogi0O4eE1UpEcPJ0WKhmhNDInjPuaPui6WbK7yMJZY6NoxkgSZSc1H22ln6lifWWxQOM8SCqlZQ8wzu7l28BJyC2T7MoF+TkQaVLNQjRVEuK7fWiplOT1EPhnkutfXhTe3y/L8oE81jZOiN6SMVvoNflFTB4GFsjnHY1bBTJbv0zOu4DTnc7vDRQO20BQeCt2QmquvyKhj349WinBJoUIak4G0WuaWYPI5XxCxw3mO/LmcxXg5zXGq4n4WcctPwBkEA8l1UXBhwjUFG8A2JpBkiMu7mkY+NAeRhHk6ybC1WoOyZplQwwObIQARPPDYlvKDZ/FEc5xhp9csNXqqdhHw406LQkGoDO6EjD3jzI+BNJ4tQtPtO2YGQapx8SXms89sNG0xFBlxhYDBkyRBdOZFV8wB0QJdWexAExB1lOlmx9I8cfDs8Onngwy/Q3jBi6qoHXQdcrZR7Dg0ajhB6e/QioVVyfL3QUgr15Nb2LF6q/tQg2965PdkzeafUfgQRaPgV9Dd6mP4eiXapLCc"
Here's a minimal reproducer, following the format of nvim issue reproducers. Run with
nvim --clean -u minimal.lua. Open a quickfix list with the two files in question using:FixedQuickfix.If you open the markdown file first, then then yaml file, the yaml file will be soft wrapped too, which it shouldn't be, as the filetype is not in the allowlist.
I had trouble getting soft wrapping to trigger, so I just fudged it. I wasn't sure if the tree-sitter plugin was needed or not, I added it while trying to get soft wrapping to kick in but it didn't help.
This is with nvim revision aeeadddac43b999a4bc6f57cbbdd2d7c7f1d08e4.
minimal.lua
should-wrap.md
should-not-wrap.yaml