Skip to content

Commit

Permalink
Merge pull request #43 from whitecostume/master
Browse files Browse the repository at this point in the history
修复不加载的情况
  • Loading branch information
CppCXY committed Jul 4, 2023
2 parents 4d60c4d + 123ed9a commit 3d2222b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class LuaWorkspaceService : WorkspaceService, IWorkspace {
private val project: Project = WProject()
private val fileManager = FileManager(project)
private val fileScopeProvider = WorkspaceRootFileScopeProvider()
private var initWorkspace = true
private val rwl = ReentrantReadWriteLock()

inner class WProject : UserDataHolderBase(), Project {
Expand Down Expand Up @@ -96,7 +97,8 @@ class LuaWorkspaceService : WorkspaceService, IWorkspace {
override fun didChangeConfiguration(params: DidChangeConfigurationParams) {
val settings = params.settings as? JsonObject ?: return
val ret = VSCodeSettings.update(settings)
if (ret.associationChanged) {
if (ret.associationChanged || initWorkspace) {
initWorkspace = false
loadWorkspace()
refreshWorkspace()
}
Expand Down

0 comments on commit 3d2222b

Please sign in to comment.