From 980c6a6a14a60dea7182be7675ffa143ae885043 Mon Sep 17 00:00:00 2001 From: Marc Jakobi Date: Sun, 17 Mar 2024 12:40:02 +0100 Subject: [PATCH] fix(config): don't validate types defined in external APIs --- CHANGELOG.md | 5 +++++ lua/rustaceanvim/config/check.lua | 20 -------------------- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0b95b0e..a763f5d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/lua/rustaceanvim/config/check.lua b/lua/rustaceanvim/config/check.lua index 7bd2c367..4d81028b 100644 --- a/lua/rustaceanvim/config/check.lua +++ b/lua/rustaceanvim/config/check.lua @@ -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