@@ -3,16 +3,11 @@ package com.koxudaxi.ruff
3
3
import com.intellij.openapi.options.Configurable
4
4
import com.intellij.openapi.project.Project
5
5
import com.koxudaxi.ruff.lsp.ClientType
6
- import com.koxudaxi.ruff.lsp.intellij.RuffIntellijLspClient
7
- import com.koxudaxi.ruff.lsp.lsp4ij.RuffLsp4IntellijClient
8
6
import javax.swing.JComponent
9
7
10
8
11
9
class RuffConfigurable internal constructor(val project : Project ) : Configurable {
12
- private val ruffConfigService: RuffConfigService = RuffConfigService .getInstance(project)
13
10
private val configPanel: RuffConfigPanel = RuffConfigPanel (project)
14
- private val ruffCacheService: RuffCacheService = RuffCacheService .getInstance(project)
15
- private val ruffLspClientManager = RuffLspClientManager .getInstance(project)
16
11
override fun getDisplayName (): String {
17
12
return " Ruff"
18
13
}
@@ -29,6 +24,7 @@ class RuffConfigurable internal constructor(val project: Project) : Configurable
29
24
override fun reset () {}
30
25
31
26
override fun isModified (): Boolean {
27
+ val ruffConfigService: RuffConfigService = RuffConfigService .getInstance(project)
32
28
return ruffConfigService.runRuffOnSave != configPanel.runRuffOnSave ||
33
29
ruffConfigService.runRuffOnReformatCode != configPanel.runRuffOnReformatCode ||
34
30
ruffConfigService.showRuleCode != configPanel.showRuleCode ||
@@ -46,6 +42,9 @@ class RuffConfigurable internal constructor(val project: Project) : Configurable
46
42
}
47
43
48
44
override fun apply () {
45
+ val ruffConfigService: RuffConfigService = RuffConfigService .getInstance(project)
46
+ val ruffCacheService: RuffCacheService = RuffCacheService .getInstance(project)
47
+ val ruffLspClientManager = RuffLspClientManager .getInstance(project)
49
48
ruffConfigService.runRuffOnSave = configPanel.runRuffOnSave
50
49
ruffConfigService.runRuffOnReformatCode = configPanel.runRuffOnReformatCode
51
50
ruffConfigService.showRuleCode = configPanel.showRuleCode
0 commit comments