From c82264aad293c4dd8f4379372c6ac51f68c1706c Mon Sep 17 00:00:00 2001 From: "John Mutuma (from Dev Box)" Date: Tue, 3 Mar 2026 21:48:14 +0300 Subject: [PATCH] fix(context): normalize file paths for Windows compatibility --- lua/sidekick/cli/context/location.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/sidekick/cli/context/location.lua b/lua/sidekick/cli/context/location.lua index d1a8dbb..1f62248 100644 --- a/lua/sidekick/cli/context/location.lua +++ b/lua/sidekick/cli/context/location.lua @@ -19,14 +19,14 @@ function M.get(ctx, opts) opts.kind = opts.kind or "position" assert(ctx.buf or ctx.name, "Either buf or name must be provided") - local name = ctx.name or vim.api.nvim_buf_get_name(ctx.buf) + local name = vim.fs.normalize(ctx.name or vim.api.nvim_buf_get_name(ctx.buf)) if not name or name == "" then name = "[No Name]" else - local cwd = ctx.cwd or vim.fn.getcwd(0) + local cwd = ctx.cwd or vim.fs.normalize(vim.fn.getcwd(0)) local ok, rel = pcall(vim.fs.relpath, cwd, name) if ok and rel and rel ~= "" and rel ~= "." then - name = rel + name = rel:gsub("\\", "/") end end