Shougo / defx.nvim

:file_folder: The dark powered file explorer implementation for neovim/Vim8
MIT License
1.17k stars 86 forks source link

Forth column is cut on mildly thin defx window #295

Closed oblitum closed 3 years ago

oblitum commented 3 years ago

Warning: I will close the issue without the minimal init.vim and the reproduction instructions.

Problems summary

Forth column ("type") overflows on thin winwidth (happens on small screens, 1366x768 old laptop -> winwidth' : &columns / 4, see minimal init bellow).

Expected

Seems to happen because "type" is aligned to right, but seems to respect some minimal offset.

Environment Information

Provide a minimal init.vim/vimrc with less than 50 lines (Required!)

set runtimepath^=~/.vim/plugged/defx.nvim

function! s:defx_config() abort
  call defx#custom#option('default', {
  \   'winwidth' : &columns / 4,
  \   'direction': 'topleft',
  \   'split'    : 'vertical',
  \   'columns'  : 'indent:icons:filename:type'
  \ })
endfunction

autocmd VimEnter * if exists('g:loaded_defx') | call s:defx_config() | endif

colorscheme peachpuff

The reproduce ways from neovim/Vim starting (Required!)

  1. n
  2. :Defx

Screen shot (if possible)

img-2021-04-07-120114

Shougo commented 3 years ago

Please read defx documentation.

call defx#custom#column('filename', {
      \ 'min_width': 10,
      \ 'max_width': 20,
      \ })