Thomas 2 years ago
parent
commit
5de418e44e
1 changed files with 3 additions and 2 deletions
  1. 3 2
      lua/cspell/helpers.lua

+ 3 - 2
lua/cspell/helpers.lua

@@ -113,7 +113,8 @@ M.get_cspell_config = function(params)
     local decode_json = code_action_config.decode_json or vim.json.decode
 
     -- local cspell_json_path = M.get_config_path(params)
-    local cspell_json_path = "~/.config/cspell/cspell.json"
+    -- local cspell_json_path = "~/.config/cspell/cspell.json"
+  local cspell_json_path = vim.fn.expand('$HOME/.config/cspell/cspell.json')
 
     -- if cspell_json_path == nil or cspell_json_path == "" then
     --     return
@@ -133,7 +134,7 @@ M.get_cspell_config = function(params)
 
     return {
         config = cspell_config,
-        path = "~/.config/cspell/cspell.json",
+        path = cspell_json_path,
     }
 end