mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-06-08 22:34:04 +02:00
64 lines
2.2 KiB
Kotlin
64 lines
2.2 KiB
Kotlin
/*
|
|
* Copyright 2003-2023 The IdeaVim authors
|
|
*
|
|
* Use of this source code is governed by an MIT-style
|
|
* license that can be found in the LICENSE.txt file or at
|
|
* https://opensource.org/licenses/MIT.
|
|
*/
|
|
|
|
package com.maddyhome.idea.vim.group
|
|
|
|
import com.maddyhome.idea.vim.api.VimEditor
|
|
import com.maddyhome.idea.vim.api.VimOptionGroup
|
|
import com.maddyhome.idea.vim.api.VimOptionGroupBase
|
|
import com.maddyhome.idea.vim.options.OptionAccessScope
|
|
|
|
internal interface IjVimOptionGroup: VimOptionGroup {
|
|
/**
|
|
* Return an accessor for options that only have a global value
|
|
*/
|
|
fun getGlobalIjOptions(): GlobalIjOptions
|
|
|
|
/**
|
|
* Return an accessor for the effective value of local options
|
|
*/
|
|
fun getEffectiveIjOptions(editor: VimEditor): EffectiveIjOptions
|
|
}
|
|
|
|
internal class OptionGroup : VimOptionGroupBase(), IjVimOptionGroup {
|
|
override fun initialiseOptions() {
|
|
// We MUST call super!
|
|
super.initialiseOptions()
|
|
IjOptions.initialise()
|
|
}
|
|
|
|
override fun getGlobalIjOptions() = GlobalIjOptions(OptionAccessScope.GLOBAL(null))
|
|
override fun getEffectiveIjOptions(editor: VimEditor) = EffectiveIjOptions(OptionAccessScope.EFFECTIVE(editor))
|
|
}
|
|
|
|
internal class IjOptionConstants {
|
|
@Suppress("SpellCheckingInspection", "MemberVisibilityCanBePrivate")
|
|
companion object {
|
|
|
|
const val idearefactormode_keep = "keep"
|
|
const val idearefactormode_select = "select"
|
|
const val idearefactormode_visual = "visual"
|
|
|
|
const val ideastatusicon_enabled = "enabled"
|
|
const val ideastatusicon_gray = "gray"
|
|
const val ideastatusicon_disabled = "disabled"
|
|
|
|
const val ideavimsupport_dialog = "dialog"
|
|
const val ideavimsupport_singleline = "singleline"
|
|
const val ideavimsupport_dialoglegacy = "dialoglegacy"
|
|
|
|
const val ideawrite_all = "all"
|
|
const val ideawrite_file = "file"
|
|
|
|
val ideaStatusIconValues = setOf(ideastatusicon_enabled, ideastatusicon_gray, ideastatusicon_disabled)
|
|
val ideaRefactorModeValues = setOf(idearefactormode_keep, idearefactormode_select, idearefactormode_visual)
|
|
val ideaWriteValues = setOf(ideawrite_all, ideawrite_file)
|
|
val ideavimsupportValues = setOf(ideavimsupport_dialog, ideavimsupport_singleline, ideavimsupport_dialoglegacy)
|
|
}
|
|
}
|