File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,13 @@ All notable changes to this project will be documented in this file.
66The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
77and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
88
9+ ## [ Unreleased]
10+
11+ ### Fixed
12+
13+ - Health: Check if ` vim.g.rustaceanvim ` is set,
14+ but hasn't been sourced before initialization.
15+
916## [ 3.7.1] - 2023-11-28
1017
1118### Fixed
Original file line number Diff line number Diff line change @@ -247,6 +247,7 @@ local RustaceanDefaultConfig = {
247247 return should_enable_dap_config_value (RustaceanConfig .dap .adapter )
248248 end ,
249249 },
250+ was_g_rustaceanvim_sourced = vim .g .rustaceanvim ~= nil ,
250251}
251252
252253local rustaceanvim = vim .g .rustaceanvim or {}
Original file line number Diff line number Diff line change 180180
181181local function check_config ()
182182 start (' Checking config' )
183- if vim .g .rustaceanvim then
184- ok (' vim.g.rustaceanvim is set' )
185- else
186- ok (' vim.g.rustaceanvim is not set' )
183+ if vim .g .rustaceanvim and not config .was_g_rustaceanvim_sourced then
184+ error (' vim.g.rustaceanvim is set, but it was sourced after rustaceanvim was initialized.' )
187185 end
188186 local valid , err = require (' rustaceanvim.config.check' ).validate (config )
189187 if valid then
You can’t perform that action at this time.
0 commit comments