Skip to content

Commit

Permalink
fix(health): .vscode settings reported as loaded if .vscode/ is empty (
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb authored Jan 22, 2025
1 parent 7d5d331 commit b7e12ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lua/rustaceanvim/config/json.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ end
---@param json_tbl { [string]: unknown }
---@param key_predicate? fun(string): boolean
function M.override_with_json_keys(tbl, json_tbl, key_predicate)
if vim.tbl_isempty(tbl) then
return
end
is_json_config_loaded = true
for json_key, value in pairs(json_tbl) do
if not key_predicate or key_predicate(json_key) then
Expand Down
2 changes: 1 addition & 1 deletion lua/rustaceanvim/config/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function server.load_rust_analyzer_settings(project_root, opts)
local config_json = results[1]
local content = os.read_file(config_json)
if not content then
vim.notify('Could not read ' .. config_json, vim.log.levels.WARNING)
vim.notify('Could not read ' .. config_json, vim.log.levels.WARN)
return default_settings
end
local json = require('rustaceanvim.config.json')
Expand Down

0 comments on commit b7e12ca

Please sign in to comment.