mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-09-13 20:32:09 +02:00
Compare commits
9 Commits
customized
...
2e8f0da0e4
Author | SHA1 | Date | |
---|---|---|---|
2e8f0da0e4
|
|||
3659aabb70
|
|||
7490c270d4
|
|||
e2f6f0d5bc
|
|||
15124fd7dd
|
|||
4de683db34
|
|||
5a9c8345cc
|
|||
69229fca8c
|
|||
03bcceb09b
|
@@ -11,13 +11,11 @@
|
|||||||
ideaVersion=2023.2.1
|
ideaVersion=2023.2.1
|
||||||
downloadIdeaSources=true
|
downloadIdeaSources=true
|
||||||
instrumentPluginCode=true
|
instrumentPluginCode=true
|
||||||
version=chylex-17
|
version=chylex-16
|
||||||
javaVersion=17
|
javaVersion=17
|
||||||
remoteRobotVersion=0.11.17
|
remoteRobotVersion=0.11.17
|
||||||
antlrVersion=4.10.1
|
antlrVersion=4.10.1
|
||||||
|
|
||||||
kotlin.incremental.useClasspathSnapshot=false
|
|
||||||
|
|
||||||
# Please don't forget to update kotlin version in buildscript section
|
# Please don't forget to update kotlin version in buildscript section
|
||||||
kotlinVersion=1.8.21
|
kotlinVersion=1.8.21
|
||||||
publishToken=token
|
publishToken=token
|
||||||
|
@@ -8,8 +8,6 @@
|
|||||||
|
|
||||||
package com.maddyhome.idea.vim.vimscript.model.functions.handlers
|
package com.maddyhome.idea.vim.vimscript.model.functions.handlers
|
||||||
|
|
||||||
import com.intellij.openapi.util.SystemInfoRt
|
|
||||||
import com.intellij.util.system.CpuArch
|
|
||||||
import com.intellij.vim.annotations.VimscriptFunction
|
import com.intellij.vim.annotations.VimscriptFunction
|
||||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||||
import com.maddyhome.idea.vim.api.VimEditor
|
import com.maddyhome.idea.vim.api.VimEditor
|
||||||
@@ -25,7 +23,7 @@ internal class HasFunctionHandler : FunctionHandler() {
|
|||||||
override val minimumNumberOfArguments = 1
|
override val minimumNumberOfArguments = 1
|
||||||
override val maximumNumberOfArguments = 2
|
override val maximumNumberOfArguments = 2
|
||||||
|
|
||||||
private val supportedFeatures = Features.discover()
|
private val supportedFeatures = setOf("ide")
|
||||||
|
|
||||||
override fun doFunction(
|
override fun doFunction(
|
||||||
argumentValues: List<Expression>,
|
argumentValues: List<Expression>,
|
||||||
@@ -43,40 +41,4 @@ internal class HasFunctionHandler : FunctionHandler() {
|
|||||||
VimInt.ZERO
|
VimInt.ZERO
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private object Features {
|
|
||||||
fun discover(): Set<String> {
|
|
||||||
val features = mutableSetOf("ide")
|
|
||||||
collectOperatingSystemType(features)
|
|
||||||
return features
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun collectOperatingSystemType(target: MutableSet<String>) {
|
|
||||||
if (SystemInfoRt.isWindows) {
|
|
||||||
target.add("win32")
|
|
||||||
if (CpuArch.CURRENT.width == 64) {
|
|
||||||
target.add("win64")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (SystemInfoRt.isLinux) {
|
|
||||||
target.add("linux")
|
|
||||||
}
|
|
||||||
else if (SystemInfoRt.isMac) {
|
|
||||||
target.add("mac")
|
|
||||||
target.add("macunix")
|
|
||||||
target.add("osx")
|
|
||||||
target.add("osxdarwin")
|
|
||||||
}
|
|
||||||
else if (SystemInfoRt.isFreeBSD) {
|
|
||||||
target.add("bsd")
|
|
||||||
}
|
|
||||||
else if (SystemInfoRt.isSolaris) {
|
|
||||||
target.add("sun")
|
|
||||||
}
|
|
||||||
|
|
||||||
if (SystemInfoRt.isUnix) {
|
|
||||||
target.add("unix")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user