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(config): don't validate types defined in external APIs #298

Merged
merged 1 commit into from
Mar 17, 2024
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Can be enabled by setting `vim.g.rustaceanvim.server.load_vscode_settings`
to `true` [[#286](https://github.com/mrcjkb/rustaceanvim/issues/286)].

### Fixed

- Config: Don't validate configs whose types are defined in external APIs
such as nvim-dap [[#294](https://github.com/mrcjkb/rustaceanvim/issues/294)].

## [4.13.0] - 2024-03-15

### Added
Expand Down
20 changes: 0 additions & 20 deletions lua/rustaceanvim/config/check.lua
Original file line number Diff line number Diff line change
Expand Up @@ -134,26 +134,6 @@ function M.validate(cfg)
if not ok then
return false, err
end
local configuration = types.evaluate(dap.configuration)
if configuration == false then
ok = true
else
---@cast configuration DapClientConfig
ok, err = validate('dap.configuration', {
type = { configuration.type, 'string' },
name = { configuration.name, 'string' },
request = { configuration.request, 'string' },
cwd = { configuration.cwd, 'string', true },
program = { configuration.program, 'string', true },
args = { configuration.args, 'table', true },
env = { configuration.env, 'table', true },
initCommands = { configuration.initCommands, 'string', true },
coreConfigs = { configuration.coreConfigs, 'table', true },
})
end
if not ok then
return false, err
end
return true
end

Expand Down
Loading