echasnovski / mini.nvim

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

Pressing `Tab` in Insert mode produces `^I` on the terminal, when using `mini.basics`. #585

Closed CeNiEi closed 9 months ago

CeNiEi commented 9 months ago

Contributing guidelines

Module(s)

mini.basics

Description

Same as the title..

Thanks for the awesome work BTW.

Neovim version

0.9.4

Steps to reproduce

vim.g.mapleader = ' '
vim.g.maplocalleader = ' '

local lazypath = vim.fn.stdpath 'data' .. '/lazy/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',
    '--branch=stable', -- latest stable release
    lazypath,
  }
end

vim.opt.rtp:prepend(lazypath)

require('lazy').setup({
  { 'echasnovski/mini.nvim',      version = false },
}, {})

require("mini.basics").setup({
  options = {
    extra_ui = true,
    win_borders = 'double',
  },
})

Expected behavior

No response

Actual behavior

https://github.com/echasnovski/mini.nvim/assets/52526849/9ec8443b-f139-4ff3-9e51-d6aa99c77a7c

So, when I have the mini.basics plugin turned on, i get this issue Tab producing ^I on terminal. Then when i switch it off, things work fine on my terminal

echasnovski commented 9 months ago

Thanks for the issue!

Indeed, I can reproduce this. It is due to setting 'list' option while tab is not present in 'listchars'. Apparently, this is a documented behavior: "When "tab:" is omitted, a tab is shown as ^I." (from :h listchars).

I didn't notice it myself because I use both 'expandtab' and manually add tab:>.

This should now be fixed on latest main.

CeNiEi commented 9 months ago

@echasnovski Got it... Thanks for the help 👍