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(default-config): rust-analyzer settings #39

Merged
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
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ 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).
- Cargo workspace reload using removed command [[#36](https://github.com/mrcjkb/rustaceanvim/pull/36)].
Thanks [@eero-lehtinen](https://github.com/eero-lehtinen)!

## [3.3.1] - 2023-10-31
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
9 changes: 6 additions & 3 deletions lua/rustaceanvim/config/internal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,13 @@ local RustaceanDefaultConfig = {
---@type boolean
standalone = true,

--- options to send to rust-analyzer
--- See: https://rust-analyzer.github.io/manual.html#configuration
--- @type table
['rust-analyzer'] = {},
settings = {
--- options to send to rust-analyzer
--- See: https://rust-analyzer.github.io/manual.html#configuration
--- @type table
['rust-analyzer'] = {},
},
},

--- debugging stuff
Expand Down