fdschmidt93 / telescope-egrepify.nvim

Variable user customization for telescope.live_grep to set rg flags on-the-fly
MIT License
122 stars 13 forks source link

bug: Display `^M` at end of lines on Windows #31

Closed mrbeardad closed 10 months ago

mrbeardad commented 10 months ago

Description

image

Neovim version

NVIM v0.10.0-dev-1911+g104565909
Build type: RelWithDebInfo
LuaJIT 2.1.1702233742

Operating system and version

Windows 11

Steps to reproduce

  1. cd nvim
  2. nvim
  3. :Telescope egrepify
  4. type lazy.nvim
  5. the results are part of init.lua following, and fileformat=dos

Expected behavior

No ^M at the end of lines. Maybe it's due to LF or CRLF

Actual behavior

All the results with end with ^M

Minimal config

local plugins_path = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(plugins_path) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "https://github.com/folke/lazy.nvim.git",
    "--branch=stable",
    plugins_path,
  })
end
vim.opt.rtp:prepend(plugins_path)

require("lazy").setup({
  {
    "nvim-telescope/telescope.nvim",
    dependencies = {
      "nvim-lua/plenary.nvim",
      "nvim-tree/nvim-web-devicons",
    },
    opts = {},
  },
  {
    "fdschmidt93/telescope-egrepify.nvim",
    keys = {
      { "<Space>/", "<Cmd>Telescope egrepify<CR>", desc = "Search Text" },
    },
    config = function()
      require("telescope").load_extension("egrepify")
    end,
  },
})