return { { "jellydn/my-note.nvim", dependencies = { "MunifTanjim/nui.nvim" }, keys = { { "mn", "MyNote", desc = "Open MyNote", }, { "mg", "MyNote global", 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) -- Use native vim.fs.find instead of lspconfig.util local cwd = vim.fs.find(".git", { path = bufPath, upward = true, })[1] return cwd and vim.fs.dirname(cwd) or vim.fn.getcwd() end, }, }, }, }