From b5945c2fc8cbb531983c7ec27d283ad8abf1acec Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Mon, 24 Jun 2024 23:11:32 +0300 Subject: [PATCH] fix(fzf): disable `preview` for `vtsls` (#3798) ## What is this PR for? Disable `preview` in `fzf-lua` Extra for `vtsls`. I tested it with Python and Typescript Extras and in Typescript pressing `ca` shows without previewer, while in Python the same shows with previewer. Kindly check also that this is correct and I didn't miss out anything else. ## Does this PR fix an existing issue? Fixes #3773 ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/fzf.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index 8a0a2927..f53ce57b 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -131,7 +131,11 @@ return { -- height is number of items minus 15 lines for the preview, with a max of 80% screen height height = math.floor(math.min(vim.o.lines * 0.8 - 16, #items + 2) + 0.5) + 16, width = 0.5, - preview = { + preview = not vim.tbl_isempty(LazyVim.lsp.get_clients({ bufnr = 0, name = "vtsls" })) and { + layout = "vertical", + vertical = "down:15,border-top", + hidden = "hidden", + } or { layout = "vertical", vertical = "down:15,border-top", },