@@ -136,6 +136,9 @@ return {
136136 local Libraries = {}
137137 local Parent = GetParentDirectory (Context .filePath )
138138
139+ local OvertureCalls = 0
140+ local MuteOverture = false
141+
139142 for Index , Library in GetLibraries () do
140143 if string.find (Library , "^@game" ) then
141144 Libraries [Index ] = Library
@@ -150,6 +153,11 @@ return {
150153 LineStart = (Index + 1 )
151154 end
152155
156+ if string.find (Source , "^Overture[:.]" , Index ) then
157+ OvertureCalls += 1
158+ MuteOverture = true
159+ end
160+
153161 local Match = string.match (Source , "^Overture:LoadLibrary%b()" , Index )
154162
155163 if Match then
@@ -207,6 +215,35 @@ return {
207215 newText = `require("{Libraries [Library ]}")` ,
208216 })
209217 end
218+
219+ OvertureCalls -= 1
220+ end
221+ end
222+
223+ lsp .client .sendLogMessage ("log" , `{OvertureCalls } Overture calls remaining in {Context .filePath }` )
224+
225+ if MuteOverture and OvertureCalls == 0 then
226+ Line , LineStart = 1 , 1
227+
228+ for Index = 1 , # Source do
229+ if string.sub (Source , Index , Index ) == "\n " then
230+ Line += 1
231+ LineStart = (Index + 1 )
232+ end
233+
234+ local Column = (Index - LineStart + 1 )
235+
236+ if string.find (Source , "^Overture ?=" , Index ) then
237+ table.insert (Changes , {
238+ startLine = Line ,
239+ startColumn = Column ,
240+ endLine = Line ,
241+ endColumn = Column ,
242+ newText = "_" ,
243+ })
244+
245+ break
246+ end
210247 end
211248 end
212249
0 commit comments