mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-04-30 05:34:02 +02:00
Remove notifications about configuration options
This commit is contained in:
parent
fe37a69544
commit
14d313907b
@ -34,15 +34,12 @@ import com.intellij.openapi.ui.Messages
|
||||
import com.intellij.openapi.util.SystemInfo
|
||||
import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.api.globalOptions
|
||||
import com.maddyhome.idea.vim.api.injector
|
||||
import com.maddyhome.idea.vim.handler.KeyMapIssue
|
||||
import com.maddyhome.idea.vim.helper.MessageHelper
|
||||
import com.maddyhome.idea.vim.key.ShortcutOwner
|
||||
import com.maddyhome.idea.vim.key.ShortcutOwnerInfo
|
||||
import com.maddyhome.idea.vim.newapi.globalIjOptions
|
||||
import com.maddyhome.idea.vim.newapi.ijOptions
|
||||
import com.maddyhome.idea.vim.options.OptionConstants
|
||||
import com.maddyhome.idea.vim.statistic.ActionTracker
|
||||
import com.maddyhome.idea.vim.ui.VimEmulationConfigurable
|
||||
import com.maddyhome.idea.vim.vimscript.services.VimRcService
|
||||
@ -62,55 +59,11 @@ internal class NotificationService(private val project: Project?) {
|
||||
@Suppress("unused")
|
||||
constructor() : this(null)
|
||||
|
||||
fun notifyAboutIdeaPut() {
|
||||
val notification = Notification(
|
||||
IDEAVIM_NOTIFICATION_ID,
|
||||
IDEAVIM_NOTIFICATION_TITLE,
|
||||
"""Add <code>ideaput</code> to <code>clipboard</code> option to perform a put via the IDE<br/><b><code>set clipboard+=ideaput</code></b>""",
|
||||
NotificationType.INFORMATION,
|
||||
)
|
||||
fun notifyAboutNewUndo() {}
|
||||
|
||||
notification.addAction(OpenIdeaVimRcAction(notification))
|
||||
fun notifyAboutIdeaPut() {}
|
||||
|
||||
notification.addAction(
|
||||
AppendToIdeaVimRcAction(
|
||||
notification,
|
||||
"set clipboard^=ideaput",
|
||||
"ideaput",
|
||||
) {
|
||||
// Technically, we're supposed to prepend values to clipboard so that it's not added to the "exclude" item.
|
||||
// Since we don't handle exclude, it's safe to append. But let's be clean.
|
||||
injector.globalOptions().clipboard.prependValue(OptionConstants.clipboard_ideaput)
|
||||
},
|
||||
)
|
||||
|
||||
notification.notify(project)
|
||||
}
|
||||
|
||||
fun notifyAboutIdeaJoin(editor: VimEditor) {
|
||||
val notification = Notification(
|
||||
IDEAVIM_NOTIFICATION_ID,
|
||||
IDEAVIM_NOTIFICATION_TITLE,
|
||||
"""Put <b><code>set ideajoin</code></b> into your <code>~/.ideavimrc</code> to perform a join via the IDE""",
|
||||
NotificationType.INFORMATION,
|
||||
)
|
||||
|
||||
notification.addAction(OpenIdeaVimRcAction(notification))
|
||||
|
||||
notification.addAction(
|
||||
AppendToIdeaVimRcAction(
|
||||
notification,
|
||||
"set ideajoin",
|
||||
"ideajoin"
|
||||
) {
|
||||
// This is a global-local option. Setting it will always set the global value
|
||||
injector.ijOptions(editor).ideajoin = true
|
||||
},
|
||||
)
|
||||
|
||||
notification.addAction(HelpLink(ideajoinExamplesUrl))
|
||||
notification.notify(project)
|
||||
}
|
||||
fun notifyAboutIdeaJoin(editor: VimEditor) {}
|
||||
|
||||
fun enableRepeatingMode() = Messages.showYesNoDialog(
|
||||
"Do you want to enable repeating keys in macOS on press and hold?\n\n" +
|
||||
|
Loading…
Reference in New Issue
Block a user