Skip to content

Commit

Permalink
fix(default-config): rust-analyzer settings
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed Oct 31, 2023
1 parent b3061d4 commit 703664a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.3.3] - 2023-10-31
- Default rust-analyzer configuration [[#37](https://github.com/mrcjkb/rustaceanvim/issues/37)].
Thanks again, [@eero-lehtinen](https://github.com/eero-lehtinen)!

## Fixed
## [3.3.2] - 2023-10-31
## Fixed
- Cargo workspace reload using removed command [[#36]](https://github.com/mrcjkb/rustaceanvim/pull/36).
Expand Down
10 changes: 9 additions & 1 deletion lua/rustaceanvim/config/check.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,19 @@ function M.validate(cfg)
ok, err = validate('server', {
cmd = { server.cmd, { 'function', 'table' } },
standalone = { server.standalone, 'boolean' },
['rust-analyzer'] = { server['rust-analyzer'], 'table', true },
settings = { server.settings, 'table', true },
})
if not ok then
return false, err
end
if server.settings then
ok, err = validate('server.settings', {
['rust-analyzer'] = { server.settings['rust-analyzer'], 'table', true },
})
if not ok then
return false, err
end
end
local dap = cfg.dap
local adapter = dap.adapter
ok, err = validate('dap.adapter', {
Expand Down
4 changes: 3 additions & 1 deletion lua/rustaceanvim/config/internal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ local RustaceanDefaultConfig = {
--- options to send to rust-analyzer
--- See: https://rust-analyzer.github.io/manual.html#configuration
--- @type table
['rust-analyzer'] = {},
settings = {
['rust-analyzer'] = {},
},
},

--- debugging stuff
Expand Down

0 comments on commit 703664a

Please sign in to comment.