summaryrefslogtreecommitdiff
path: root/lua/plugins/misc.lua
blob: 37185aed1d96fb90a76ace98f322a9355a536dd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
return {
    {
        "obsidian.nvim",
        for_cats = "misc",
        event = {
            "BufReadPre " .. vim.fn.expand("~") .. "/Notes/**/*.md",
            "BufNewFile " .. vim.fn.expand("~") .. "/Notes/**/*.md",
        },
        after = function()
            require("obsidian").setup({
                legacy_commands = false,
                workspaces = {
                    {
                        name = "personal",
                        path = "~/Notes",
                    },
                },
            })
        end,
    },
    {
        "typst-preview.nvim",
        ft = "typst",
        for_cats = "misc",
        after = function()
            require("typst-preview").setup({
                debug = false,
                open_cmd = nil,
                port = nil,
                invert_colors = "never",
                follow_cursor = true,
                dependencies_bin = {
                    tinymist = "tinymist",
                    websocat = "websocat",
                },
                extra_args = nil,
                get_root = function(path_of_main_file)
                    local root = os.getenv("TYPST_ROOT")
                    if root then
                        return root
                    end
                    return vim.fn.fnamemodify(path_of_main_file, ":p:h")
                end,
                get_main_file = function(path_of_buffer)
                    return path_of_buffer
                end,
            })
        end,
    },
}