aboutsummaryrefslogtreecommitdiffstats
path: root/lua/plugins/note.lua
blob: 2728bde25c0c5ca59b9629eff5cb764c40864697 (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
return {
  {
    "jellydn/my-note.nvim",
    dependencies = { "MunifTanjim/nui.nvim" },
    keys = {
      {
        "<leader>mn",
        "<cmd>MyNote<cr>",
        desc = "Open MyNote",
      },
      {
        "<leader>mg",
        "<cmd>MyNote global<cr>",
        desc = "Open MyNote Global",
      },
    },
    opts = {
      files = {
        -- Using the parent .git folder as the cwd
        cwd = function()
          local bufPath = vim.api.nvim_buf_get_name(0)
          local cwd = require("lspconfig").util.root_pattern(".git")(bufPath)

          return cwd
        end,
      },
    },
  },
}