File tree 3 files changed +1
-35
lines changed
3 files changed +1
-35
lines changed Original file line number Diff line number Diff line change @@ -88,12 +88,6 @@ local default_config = {
88
88
--- @see vim.log.levels
89
89
--- @type integer log level
90
90
_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
- },
97
91
}
98
92
--- @comment default-config:end
99
93
Original file line number Diff line number Diff line change @@ -118,23 +118,12 @@ local default_config = require("rest-nvim.config.default")
118
118
119
119
local check = require (" rest-nvim.config.check" )
120
120
local 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 )
126
122
--- @cast config rest.Config
127
123
local ok , err = check .validate (config )
128
124
129
125
if not ok then
130
126
vim .notify (err , vim .log .levels .ERROR , { title = " rest.nvim" })
131
127
end
132
128
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
-
140
129
return config
Original file line number Diff line number Diff line change 8
8
9
9
local health = {}
10
10
11
- local config = require (" rest-nvim.config" )
12
-
13
11
local function install_health ()
14
12
vim .health .start (" Installation" )
15
13
@@ -55,20 +53,6 @@ local function install_health()
55
53
end
56
54
end
57
55
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
-
72
56
local function formatter_health ()
73
57
vim .health .start (" Response body formatters" )
74
58
91
75
92
76
function health .check ()
93
77
install_health ()
94
- configuration_health ()
95
78
formatter_health ()
96
79
end
97
80
You can’t perform that action at this time.
0 commit comments