Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does results_width modify the width of results? because it doesn't work for me #935

Closed
gmr458 opened this issue Jun 24, 2021 · 5 comments
Closed
Labels
bug Something isn't working

Comments

@gmr458
Copy link

gmr458 commented Jun 24, 2021

Description

Expected Behavior

The behavior I expect is to reduce the width of the results box, the default width leaves empty space.
Actual Behavior

I think results_width is what I need but when I change its value I don't see any change. Is there something I am doing wrong?

Details

Reproduce
  1. start nvim
  2. change the value of results_width
  3. open telescope
Environment
  • nvim --version output:
    NVIM v0.5.0-dev+1421-ga72dfec85
    Build type: RelWithDebInfo
    LuaJIT 2.1.0-beta3
    Compilation: /usr/bin/gcc-11 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/runner/work/neovim/neovim/build/config -I/home/runner/work/neovim/neovim/src -I/home/runner/work/neovim/neovim/.deps/usr/include -I/usr/include -I/home/runner/work/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include
    Compiled by runner@fv-az68-463

Features: +acl +iconv +tui
See ":help feature-compile"

system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/share/nvim"

Run :checkhealth for more info

  • Operating system: WSL2 Ubuntu 20.04.2 LTS
  • Telescope commit: 6ac5ee0
Configuration

set nocompatible hidden laststatus=2

if !filereadable('/tmp/plug.vim')
  silent !curl --insecure -fLo /tmp/plug.vim
    \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
endif

source /tmp/plug.vim
call plug#begin('/tmp/plugged')
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
call plug#end()

autocmd VimEnter * PlugClean! | PlugUpdate --sync | close
lua << EOF

require('telescope').setup{
  defaults = {
    vimgrep_arguments = {
      'rg',
      '--color=never',
      '--no-heading',
      '--with-filename',
      '--line-number',
      '--column',
      '--smart-case'
    },
    prompt_position = "bottom",
    prompt_prefix = ">",
    selection_strategy = "reset",
    sorting_strategy = "descending",
    layout_strategy = "horizontal",
    layout_defaults = {},
    file_ignore_patterns = {},
    shorten_path = true,
    winblend = 0,
    width = 0.75,
    preview_cutoff = 120,
    results_height = 1,
    results_width = 0.2,
    border = {},
    borderchars = { '', '', '', '', '', '', '', ''},
    color_devicons = true,
    use_less = true,
  }
}
EOF
@gmr458 gmr458 added the bug Something isn't working label Jun 24, 2021
@Conni2461
Copy link
Member

Yeah it does nothing and we are aware of it. We are actually currently reworking how the whole layout configuration works #922 and its probably hitting master at the beginning of next week. We are trying to only break backwards compatibility once so it takes some time. We are providing a changelog to help adjusting and result_width is named there:

- {results_width}: This key actually never did anything. It was

@gmr458
Copy link
Author

gmr458 commented Jun 25, 2021

@Conni2461 I understand, thanks for the reply.

@gmr458 gmr458 closed this as completed Jun 25, 2021
@gmr458
Copy link
Author

gmr458 commented Jul 6, 2021

@Conni2461 Is there any news about results_width? It no longer appears in the default settings.

@Conni2461
Copy link
Member

width is now handling it. See for example: :help layout_strategies.horizontal() or any other strategy you want. Also you should read :help telescope.defaults.layout_config

@gmr458
Copy link
Author

gmr458 commented Jul 7, 2021

@Conni2461 Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants