From 03b7da74eee555064741fbc54e667eb918e8aa52 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Thu, 12 Aug 2021 11:31:31 +0200 Subject: Fix formatting according to style-guide (#1057) --- utils/bin/jdtls | 62 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'utils/bin') diff --git a/utils/bin/jdtls b/utils/bin/jdtls index adfd5e20..2b0f226a 100755 --- a/utils/bin/jdtls +++ b/utils/bin/jdtls @@ -8,31 +8,31 @@ # to point to the `config_mac' or `config_win` folders depending on your system. case Darwin in -Linux) - CONFIG="$HOME/.local/share/nvim/lspinstall/java/config_linux" - ;; -Darwin) - CONFIG="$HOME/.local/share/nvim/lspinstall/java/config_mac" - ;; + Linux) + CONFIG="$HOME/.local/share/nvim/lspinstall/java/config_linux" + ;; + Darwin) + CONFIG="$HOME/.local/share/nvim/lspinstall/java/config_mac" + ;; esac # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ]; then - if [ -x "$JAVA_HOME/jre/sh/java" ]; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ]; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + if [ -x "$JAVA_HOME/jre/sh/java" ]; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ]; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME Please set the JAVA_HOME variable in your environment to match the location of your Java installation." - fi + fi else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." @@ -41,20 +41,20 @@ fi # JAR="$HOME/.config/nvim/.language-servers/eclipse.jdt.ls/org.eclipse.jdt.ls.product/target/repository/plugins/org.eclipse.equinox.launcher_*.jar" JAR="$HOME/.local/share/nvim/lspinstall/java/plugins/org.eclipse.equinox.launcher_*.jar" GRADLE_HOME=$HOME/gradle "$JAVACMD" \ - -Declipse.application=org.eclipse.jdt.ls.core.id1 \ - -Dosgi.bundles.defaultStartLevel=4 \ - -Declipse.product=org.eclipse.jdt.ls.core.product \ - -Dlog.protocol=true \ - -Dlog.level=ALL \ - -javaagent:$HOME/.local/share/nvim/lspinstall/java/lombok.jar \ - -Xms1g \ - -Xmx2G \ - -jar $(echo "$JAR") \ - -configuration "$CONFIG" \ - -data "${1:-$HOME/workspace}" \ - --add-modules=ALL-SYSTEM \ - --add-opens java.base/java.util=ALL-UNNAMED \ - --add-opens java.base/java.lang=ALL-UNNAMED + -Declipse.application=org.eclipse.jdt.ls.core.id1 \ + -Dosgi.bundles.defaultStartLevel=4 \ + -Declipse.product=org.eclipse.jdt.ls.core.product \ + -Dlog.protocol=true \ + -Dlog.level=ALL \ + -javaagent:$HOME/.local/share/nvim/lspinstall/java/lombok.jar \ + -Xms1g \ + -Xmx2G \ + -jar $(echo "$JAR") \ + -configuration "$CONFIG" \ + -data "${1:-$HOME/workspace}" \ + --add-modules=ALL-SYSTEM \ + --add-opens java.base/java.util=ALL-UNNAMED \ + --add-opens java.base/java.lang=ALL-UNNAMED # for older java versions if you wanna use lombok # -Xbootclasspath/a:/usr/local/share/lombok/lombok.jar \ -- cgit v1.2.3 From 988c74ec5665250c572dcc6bae018ed0ea180c25 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Fri, 13 Aug 2021 12:11:18 +0200 Subject: feat: Add pre-commit hook for linting and formatting (#1132) * feat: Add pre-commit hook for linting and formatting * format with prettier --- utils/bin/jdtls | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'utils/bin') diff --git a/utils/bin/jdtls b/utils/bin/jdtls index 2b0f226a..961d2df5 100755 --- a/utils/bin/jdtls +++ b/utils/bin/jdtls @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# shellcheck disable=SC2116 # NOTE: # This doesn't work as is on Windows. You'll need to create an equivalent `.bat` file instead @@ -7,7 +8,8 @@ # If you're not using Linux you'll need to adjust the `-configuration` option # to point to the `config_mac' or `config_win` folders depending on your system. -case Darwin in +OS="$(uname -s)" +case "$OS" in Linux) CONFIG="$HOME/.local/share/nvim/lspinstall/java/config_linux" ;; @@ -32,7 +34,7 @@ location of your Java installation." fi else JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + command -v java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." @@ -46,10 +48,10 @@ GRADLE_HOME=$HOME/gradle "$JAVACMD" \ -Declipse.product=org.eclipse.jdt.ls.core.product \ -Dlog.protocol=true \ -Dlog.level=ALL \ - -javaagent:$HOME/.local/share/nvim/lspinstall/java/lombok.jar \ + -javaagent:"$HOME/.local/share/nvim/lspinstall/java/lombok.jar" \ -Xms1g \ -Xmx2G \ - -jar $(echo "$JAR") \ + -jar "$(echo "$JAR")" \ -configuration "$CONFIG" \ -data "${1:-$HOME/workspace}" \ --add-modules=ALL-SYSTEM \ -- cgit v1.2.3 From 1fbc34cf1d3c2ec5500ddb6e14f04751680d969f Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Sun, 15 Aug 2021 18:01:37 +0200 Subject: Fix slow CI by installing a neovim binary directly (#1059) --- utils/bin/install-latest-neovim | 9 --------- 1 file changed, 9 deletions(-) delete mode 100755 utils/bin/install-latest-neovim (limited to 'utils/bin') diff --git a/utils/bin/install-latest-neovim b/utils/bin/install-latest-neovim deleted file mode 100755 index 8d1d95fd..00000000 --- a/utils/bin/install-latest-neovim +++ /dev/null @@ -1,9 +0,0 @@ -!#/bin/bash -cd ~ -sudo rm -r neovim -git clone --branch master --depth 1 https://github.com/neovim/neovim -cd neovim -sudo make CMAKE_BUILD_TYPE=Release install -cd ~ -sudo rm -r neovim - -- cgit v1.2.3 From c76cc0ea8ae793b4feb0c28407d0f0de104aef43 Mon Sep 17 00:00:00 2001 From: christianchiarulli Date: Mon, 16 Aug 2021 20:10:53 -0400 Subject: fix java again, this file cannot be formatted, don't ask me why, because I have no idea --- utils/bin/jdtls | 66 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 32 insertions(+), 34 deletions(-) (limited to 'utils/bin') diff --git a/utils/bin/jdtls b/utils/bin/jdtls index 961d2df5..adfd5e20 100755 --- a/utils/bin/jdtls +++ b/utils/bin/jdtls @@ -1,5 +1,4 @@ #!/usr/bin/env bash -# shellcheck disable=SC2116 # NOTE: # This doesn't work as is on Windows. You'll need to create an equivalent `.bat` file instead @@ -8,33 +7,32 @@ # If you're not using Linux you'll need to adjust the `-configuration` option # to point to the `config_mac' or `config_win` folders depending on your system. -OS="$(uname -s)" -case "$OS" in - Linux) - CONFIG="$HOME/.local/share/nvim/lspinstall/java/config_linux" - ;; - Darwin) - CONFIG="$HOME/.local/share/nvim/lspinstall/java/config_mac" - ;; +case Darwin in +Linux) + CONFIG="$HOME/.local/share/nvim/lspinstall/java/config_linux" + ;; +Darwin) + CONFIG="$HOME/.local/share/nvim/lspinstall/java/config_mac" + ;; esac # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ]; then - if [ -x "$JAVA_HOME/jre/sh/java" ]; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ]; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + if [ -x "$JAVA_HOME/jre/sh/java" ]; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ]; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME Please set the JAVA_HOME variable in your environment to match the location of your Java installation." - fi + fi else - JAVACMD="java" - command -v java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." @@ -43,20 +41,20 @@ fi # JAR="$HOME/.config/nvim/.language-servers/eclipse.jdt.ls/org.eclipse.jdt.ls.product/target/repository/plugins/org.eclipse.equinox.launcher_*.jar" JAR="$HOME/.local/share/nvim/lspinstall/java/plugins/org.eclipse.equinox.launcher_*.jar" GRADLE_HOME=$HOME/gradle "$JAVACMD" \ - -Declipse.application=org.eclipse.jdt.ls.core.id1 \ - -Dosgi.bundles.defaultStartLevel=4 \ - -Declipse.product=org.eclipse.jdt.ls.core.product \ - -Dlog.protocol=true \ - -Dlog.level=ALL \ - -javaagent:"$HOME/.local/share/nvim/lspinstall/java/lombok.jar" \ - -Xms1g \ - -Xmx2G \ - -jar "$(echo "$JAR")" \ - -configuration "$CONFIG" \ - -data "${1:-$HOME/workspace}" \ - --add-modules=ALL-SYSTEM \ - --add-opens java.base/java.util=ALL-UNNAMED \ - --add-opens java.base/java.lang=ALL-UNNAMED + -Declipse.application=org.eclipse.jdt.ls.core.id1 \ + -Dosgi.bundles.defaultStartLevel=4 \ + -Declipse.product=org.eclipse.jdt.ls.core.product \ + -Dlog.protocol=true \ + -Dlog.level=ALL \ + -javaagent:$HOME/.local/share/nvim/lspinstall/java/lombok.jar \ + -Xms1g \ + -Xmx2G \ + -jar $(echo "$JAR") \ + -configuration "$CONFIG" \ + -data "${1:-$HOME/workspace}" \ + --add-modules=ALL-SYSTEM \ + --add-opens java.base/java.util=ALL-UNNAMED \ + --add-opens java.base/java.lang=ALL-UNNAMED # for older java versions if you wanna use lombok # -Xbootclasspath/a:/usr/local/share/lombok/lombok.jar \ -- cgit v1.2.3 From 33640834e4b07a8e9c5a6707ec0eadd863011ac0 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Fri, 20 Aug 2021 22:59:40 +0200 Subject: fix: set runtime directories correctly (#1354) * fix: set runtime directories correctly This also simplifies the way to invoke LunarVim to just be: `nvim -u "$LUNARVIM_RUNTIME_DIR/lvim/init.lua"` Fixes #1352 * use libuv to get homedir path --- utils/bin/lvim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'utils/bin') diff --git a/utils/bin/lvim b/utils/bin/lvim index b94d544f..c55ddda7 100755 --- a/utils/bin/lvim +++ b/utils/bin/lvim @@ -1,3 +1,5 @@ #!/bin/sh -exec nvim -u ~/.local/share/lunarvim/lvim/init.lua --cmd "set runtimepath+=~/.local/share/lunarvim/lvim" "$@" +LUNARVIM_RUNTIME_DIR=${LUNARVIM_RUNTIME_DIR:-"$HOME/.local/share/lunarvim"} + +exec nvim -u "$LUNARVIM_RUNTIME_DIR"/lvim/init.lua "$@" -- cgit v1.2.3 From 101c6834333ffb06856155054ea77747819ef5fc Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Mon, 23 Aug 2021 17:18:42 +0200 Subject: [Refactor] Installer v2 with support for backup (#1052) --- utils/bin/lvim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) mode change 100755 => 100644 utils/bin/lvim (limited to 'utils/bin') diff --git a/utils/bin/lvim b/utils/bin/lvim old mode 100755 new mode 100644 index c55ddda7..2303be3c --- a/utils/bin/lvim +++ b/utils/bin/lvim @@ -1,5 +1,6 @@ #!/bin/sh -LUNARVIM_RUNTIME_DIR=${LUNARVIM_RUNTIME_DIR:-"$HOME/.local/share/lunarvim"} +export LUNARVIM_RUNTIME_DIR="${LUNARVIM_RUNTIME_DIR:-$HOME/.local/share/lunarvim}" +export LUNARVIM_CONFIG_DIR="${LUNARVIM_RUNTIME_DIR:-$HOME/.config/lvim}" -exec nvim -u "$LUNARVIM_RUNTIME_DIR"/lvim/init.lua "$@" +exec nvim -u "$LUNARVIM_RUNTIME_DIR/lvim/init.lua" "$@" -- cgit v1.2.3