Thomas 2 ani în urmă
părinte
comite
ae4603e4fa
1 a modificat fișierele cu 5 adăugiri și 2 ștergeri
  1. 5 2
      lua/cspell/helpers.lua

+ 5 - 2
lua/cspell/helpers.lua

@@ -80,7 +80,9 @@ local function find_file(filename, cwd)
     -- until current_dir == root_dir
     --
     -- return nil
-    return "cspell.json"
+    local home = os.getenv('HOME')
+  local cspell_json_path = home..'/.config/cspell/cspell.json'
+  return cspell_json_path
 end
 
 --- Find the first cspell.json file in the directory tree
@@ -170,7 +172,8 @@ M.get_config_path = function(params)
         PATH_BY_CWD[params.cwd] = cspell_json_path
     end
     -- return PATH_BY_CWD[params.cwd]
-    return "~/.config/cspell/cspell.json"
+  local cspell_json_file_path = os.getenv('HOME').."/.config/cspell/cspell.json"
+    return cspell_json_file_path
 end
 
 --- Checks that both sources use the same config