Skip to content

Is it still possible to disable the diff previewer? #28

Description

@Futarimiti

Hi, thanks for the plugin.

I'm currently using the get_cursor theme from telescope. Sometimes the diff window becomes too bulky and overlaps with options from the actions menu:

image

Hence I would like to disable the diff preview sometimes. A month ago this could be achieved by the following configuration, by passing false to previewer option:

require('actions-preview').setup { telescope = require('telescope.themes').get_cursor { previewer = false } }
Screenshot 2024-02-23 at 9 30 30 pm

Which unfortunately does not work anymore since e4aa224. With the same configuration, the code actions menu pops up still, but selecting an option gives the following error:

Error executing lua callback: ...s-preview.nvim/lua/actions-preview/backend/telescope.lua:100: attempt to index field 'state' (a nil value)
stack traceback:
	...s-preview.nvim/lua/actions-preview/backend/telescope.lua:100: in function '_teardown_func'
	...zy/telescope.nvim/lua/telescope/previewers/previewer.lua:78: in function 'teardown'
	...share/nvim/lazy/telescope.nvim/lua/telescope/pickers.lua:1486: in function 'on_close_prompt'
	...share/nvim/lazy/telescope.nvim/lua/telescope/pickers.lua:531: in function <...share/nvim/lazy/telescope.nvim/lua/telescope/pickers.lua:530>

A similar error would also arise when trying to quit/close the popup.

Here's an animation showing the chaos:

Screen.Recording.2024-02-23.at.9.37.25.pm.mov

Having these said I guess that's definitely not how things work now. Is it still possible to disable the diff previewer? If yes, then what would be the correct way to setup so?

Thanks again for your efforts and devotion in the plugin. If you need more information please let me know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions