diff options
Diffstat (limited to 'lua/plugins/note.lua')
| -rw-r--r-- | lua/plugins/note.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lua/plugins/note.lua b/lua/plugins/note.lua index 2728bde..e2b5db3 100644 --- a/lua/plugins/note.lua +++ b/lua/plugins/note.lua @@ -19,9 +19,12 @@ return { -- 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 + -- 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, }, }, |