Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(health): .vscode settings reported as loaded if .vscode/ is empty #662

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading