stevearc / dressing.nvim

Neovim plugin to improve the default vim.ui interfaces
MIT License
1.73k stars 32 forks source link

[Bug] telescope theme deprecation notice shown continuously #26

Closed akinsho closed 2 years ago

akinsho commented 2 years ago

Describe the bug The recent telescope theme deprecation warning is shown continuously because the telescope theme object itself actually has a key called theme, so this wrongly reports that a user hasn't migrated despite having done so.

System information

use {
      'stevearc/dressing.nvim',
      after = 'telescope.nvim',
      config = function()
        require('dressing').setup {
          input = {
            insert_only = false,
            winblend = 2,
          },
          select = {
            telescope = require('telescope.themes').get_cursor { -- <--- This function returns an object with a theme key
              layout_config = {
                height = function(self, _, max_lines)
                  local results = #self.finder.results
                  return (results <= max_lines and results or max_lines - 10) + 4 -- 4 is the size of the window
                end,
              },
            },
          },
        }
      end

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

  telescope = {                                                                                                                                                                      
    borderchars = {                                                                                                                                                                  
      preview = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" },                                                                                                                          
      prompt = { "─", "│", " ", "│", "╭", "╮", "│", "│" },                                                                                                                           
      results = { "─", "│", "─", "│", "├", "┤", "╯", "╰" }                                                                                                                           
    },                                                                                                                                                                               
    layout_config = {                                                                                                                                                                
      height = <function 2>,                                                                                                                                                         
      width = 80                                                                                                                                                                     
    },                                                                                                                                                                               
    layout_strategy = "cursor",                                                                                                                                                      
    results_title = false,                                                                                                                                                           
    sorting_strategy = "ascending",                                                                                                                                                  
    theme = "cursor"                                                                                                                                                                 
  } 
stevearc commented 2 years ago

Should be fixed now. Thanks for the report!

akinsho commented 2 years ago

Awesome, thanks can confirm that's fixed now 👍🏿