File tree Expand file tree Collapse file tree 3 files changed +1
-35
lines changed
Expand file tree Collapse file tree 3 files changed +1
-35
lines changed Original file line number Diff line number Diff line change @@ -88,12 +88,6 @@ local default_config = {
8888 --- @see vim.log.levels
8989 --- @type integer log level
9090 _log_level = vim .log .levels .WARN ,
91- --- @class rest.Config.DebugInfo
92- _debug_info = {
93- -- NOTE: default option is `nil` to prevent overwriting as empty array
94- --- @type string[]
95- unrecognized_configs = nil ,
96- },
9791}
9892--- @comment default-config:end
9993
Original file line number Diff line number Diff line change @@ -118,23 +118,12 @@ local default_config = require("rest-nvim.config.default")
118118
119119local check = require (" rest-nvim.config.check" )
120120local opts = vim .g .rest_nvim or {}
121- config = vim .tbl_deep_extend (" force" , {
122- _debug_info = {
123- unrecognized_configs = check .get_unrecognized_keys (opts , default_config ),
124- },
125- }, default_config , opts )
121+ config = vim .tbl_deep_extend (" force" , default_config , opts )
126122--- @cast config rest.Config
127123local ok , err = check .validate (config )
128124
129125if not ok then
130126 vim .notify (err , vim .log .levels .ERROR , { title = " rest.nvim" })
131127end
132128
133- if # config ._debug_info .unrecognized_configs > 0 then
134- vim .notify (
135- " [rest.nvim] Unrecognized configs found in setup: " .. vim .inspect (config ._debug_info .unrecognized_configs ),
136- vim .log .levels .WARN
137- )
138- end
139-
140129return config
Original file line number Diff line number Diff line change 88
99local health = {}
1010
11- local config = require (" rest-nvim.config" )
12-
1311local function install_health ()
1412 vim .health .start (" Installation" )
1513
@@ -55,20 +53,6 @@ local function install_health()
5553 end
5654end
5755
58- local function configuration_health ()
59- vim .health .start (" Configuration" )
60-
61- -- Configuration options
62- local unrecognized_configs = config ._debug_info .unrecognized_configs
63- if not vim .tbl_isempty (unrecognized_configs ) then
64- for _ , config_key in ipairs (unrecognized_configs ) do
65- vim .health .warn (" Unrecognized configuration option `" .. config_key .. " ` found" )
66- end
67- else
68- vim .health .ok (" No unrecognized configuration options were found" )
69- end
70- end
71-
7256local function formatter_health ()
7357 vim .health .start (" Response body formatters" )
7458
9175
9276function health .check ()
9377 install_health ()
94- configuration_health ()
9578 formatter_health ()
9679end
9780
You can’t perform that action at this time.
0 commit comments