Skip to content
Discussion options

You must be logged in to vote

oh ok! I actually managed to do it!

local builtin = require("fzf-lua.previewer.builtin")

local function make_preview(preview_lines)
    local M = builtin.base:extend()

    function M:new(o, opts, fzf_win)
        M.super.new(self, o, opts, fzf_win)
        setmetatable(self, M)
        return self
    end

    function M:populate_preview_buf(entry)
        local buf = self:get_tmp_buffer()

        local lines = preview_lines(entry)
        vim.api.nvim_buf_set_lines(buf, 0, -1, false, lines)

        self:set_preview_buf(buf)
        self.win:update_preview_title(tostring(entry))
    end

    return M
end

fzfl.dictionary = function()
        fzfl.fzf_exec("cat /etc/dictionaries-common…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@qiine
Comment options

Answer selected by ibhagwan
@ibhagwan
Comment options

@ibhagwan
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants