Skip to content

Commit

Permalink
fix: internal config path generation on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
KotarouX committed Jan 19, 2025
1 parent 7ae735c commit 6281b3d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/cspell/helpers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ end
M.get_merged_cspell_json_path = function(params)
local vim_cache = vim.fn.stdpath("cache")
local plugin_name = "cspell.nvim"
local merged_config_key = Path:new(params.cwd):joinpath("cspell.json"):absolute():gsub("/", "-"):gsub(":", "")
local merged_config_key =
Path:new(vim.fn.getcwd(-1, -1)):joinpath("cspell.json"):absolute():gsub("\\", "-"):gsub("/", "-"):gsub(":", "")
local merged_config_path = Path:new(vim_cache):joinpath(plugin_name):joinpath(merged_config_key):absolute()

return merged_config_path
Expand Down

0 comments on commit 6281b3d

Please sign in to comment.