summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/.stylua.toml6
-rwxr-xr-xutils/bin/jdtls75
-rwxr-xr-xutils/bin/lvim3
-rw-r--r--utils/desktop/lvim.desktop13
-rwxr-xr-xutils/installer/install.sh266
-rwxr-xr-xutils/installer/install_stylua.sh63
-rw-r--r--utils/installer/lv-config.example-no-ts.lua94
-rw-r--r--utils/installer/lv-config.example.lua101
-rwxr-xr-xutils/installer/uninstall.sh5
-rw-r--r--utils/julia/Manifest.toml182
-rw-r--r--utils/julia/Project.toml3
-rw-r--r--utils/julia/run.jl37
-rw-r--r--utils/vscode_config/settings.json4
13 files changed, 583 insertions, 269 deletions
diff --git a/utils/.stylua.toml b/utils/.stylua.toml
deleted file mode 100644
index df96b7b0..00000000
--- a/utils/.stylua.toml
+++ /dev/null
@@ -1,6 +0,0 @@
-column_width = 120
-line_endings = "Unix"
-indent_type = "Spaces"
-indent_width = 2
-quote_style = "AutoPreferDouble"
-no_call_parentheses = true
diff --git a/utils/bin/jdtls b/utils/bin/jdtls
index cc73e59f..adfd5e20 100755
--- a/utils/bin/jdtls
+++ b/utils/bin/jdtls
@@ -8,32 +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 [ -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
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."
@@ -42,22 +41,22 @@ 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
-
- # for older java versions if you wanna use lombok
- # -Xbootclasspath/a:/usr/local/share/lombok/lombok.jar \
-
- # -javaagent:/usr/local/share/lombok/lombok.jar \
+ -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 \
+
+# -javaagent:/usr/local/share/lombok/lombok.jar \
diff --git a/utils/bin/lvim b/utils/bin/lvim
new file mode 100755
index 00000000..0ef96a90
--- /dev/null
+++ b/utils/bin/lvim
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+nvim -u ~/.local/share/lunarvim/lvim/init.lua --cmd "set runtimepath+=~/.local/share/lunarvim/lvim" "$@"
diff --git a/utils/desktop/lvim.desktop b/utils/desktop/lvim.desktop
new file mode 100644
index 00000000..f4a51b10
--- /dev/null
+++ b/utils/desktop/lvim.desktop
@@ -0,0 +1,13 @@
+[Desktop Entry]
+Name=LunarVim
+GenericName=Text Editor
+Comment=An IDE layer for Neovim with sane defaults. Completely free and community driven.
+TryExec=lvim
+Exec=lvim %F
+Terminal=false
+Type=Application
+Keywords=Text;editor;
+Icon=nvim
+Categories=Utility;TextEditor;
+StartupNotify=false
+MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
diff --git a/utils/installer/install.sh b/utils/installer/install.sh
index 0473bbab..5778fb3a 100755
--- a/utils/installer/install.sh
+++ b/utils/installer/install.sh
@@ -5,219 +5,235 @@ set -o nounset # error when referencing undefined variable
set -o errexit # exit when command fails
installnodemac() {
- brew install lua
- brew install node
- brew install yarn
+ brew install lua
+ brew install node
+ brew install yarn
}
installnodeubuntu() {
- sudo apt install nodejs
- sudo apt install npm
+ sudo apt install nodejs
+ sudo apt install npm
}
-moveoldnvim() {
- echo "Not installing LunarVim"
- echo "Please move your ~/.config/nvim folder before installing"
- exit
+moveoldlvim() {
+ echo "Not installing LunarVim"
+ echo "Please move your ~/.local/share/lunarvim folder before installing"
+ exit
}
installnodearch() {
- sudo pacman -S nodejs
- sudo pacman -S npm
+ sudo pacman -S nodejs
+ sudo pacman -S npm
}
installnodefedora() {
- sudo dnf install -y nodejs
- sudo dnf install -y npm
+ sudo dnf install -y nodejs
+ sudo dnf install -y npm
}
installnodegentoo() {
- echo "Printing current node status..."
- emerge -pqv net-libs/nodejs
- echo "Make sure the npm USE flag is enabled for net-libs/nodejs"
- echo "If it isn't enabled, would you like to enable it with flaggie? (Y/N)"
- read answer
- [ "$answer" != "${answer#[Yy]}" ] && sudo flaggie net-libs/nodejs +npm
- sudo emerge -avnN net-libs/nodejs
+ echo "Printing current node status..."
+ emerge -pqv net-libs/nodejs
+ echo "Make sure the npm USE flag is enabled for net-libs/nodejs"
+ echo "If it isn't enabled, would you like to enable it with flaggie? (Y/N)"
+ read -r answer
+ [ "$answer" != "${answer#[Yy]}" ] && sudo flaggie net-libs/nodejs +npm
+ sudo emerge -avnN net-libs/nodejs
}
installnode() {
- echo "Installing node..."
- [ "$(uname)" == "Darwin" ] && installnodemac
- [ -n "$(cat /etc/os-release | grep Ubuntu)" ] && installnodeubuntu
- [ -f "/etc/arch-release" ] && installnodearch
- [ -f "/etc/artix-release" ] && installnodearch
- [ -f "/etc/fedora-release" ] && installnodefedora
- [ -f "/etc/gentoo-release" ] && installnodegentoo
- [ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ] && echo "Windows not currently supported"
- sudo npm i -g neovim
+ echo "Installing node..."
+ [ "$(uname)" = "Darwin" ] && installnodemac
+ grep -q Ubuntu /etc/os-release && installnodeubuntu
+ [ -f "/etc/arch-release" ] && installnodearch
+ [ -f "/etc/artix-release" ] && installnodearch
+ [ -f "/etc/fedora-release" ] && installnodefedora
+ [ -f "/etc/gentoo-release" ] && installnodegentoo
+ [ "$(uname -s | cut -c 1-10)" = "MINGW64_NT" ] && echo "Windows not currently supported"
+ sudo npm i -g neovim
}
installpiponmac() {
- sudo curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
- python3 get-pip.py
- rm get-pip.py
+ sudo curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
+ python3 get-pip.py
+ rm get-pip.py
}
installpiponubuntu() {
- sudo apt install python3-pip >/dev/null
+ sudo apt install python3-pip >/dev/null
}
installpiponarch() {
- sudo pacman -S python-pip
+ sudo pacman -S python-pip
}
installpiponfedora() {
- sudo dnf install -y pip >/dev/nul
+ sudo dnf install -y pip >/dev/null
}
installpipongentoo() {
- sudo emerge -avn dev-python/pip
+ sudo emerge -avn dev-python/pip
}
installpip() {
- echo "Installing pip..."
- [ "$(uname)" == "Darwin" ] && installpiponmac
- [ -n "$(cat /etc/os-release | grep Ubuntu)" ] && installpiponubuntu
- [ -f "/etc/arch-release" ] && installpiponarch
- [ -f "/etc/fedora-release" ] && installpiponfedora
- [ -f "/etc/gentoo-release" ] && installpipongentoo
- [ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ] && echo "Windows not currently supported"
+ echo "Installing pip..."
+ [ "$(uname)" = "Darwin" ] && installpiponmac
+ grep -q Ubuntu /etc/os-release && installpiponubuntu
+ [ -f "/etc/arch-release" ] && installpiponarch
+ [ -f "/etc/fedora-release" ] && installpiponfedora
+ [ -f "/etc/gentoo-release" ] && installpipongentoo
+ [ "$(uname -s | cut -c 1-10)" = "MINGW64_NT" ] && echo "Windows not currently supported"
}
installpynvim() {
- echo "Installing pynvim..."
- if [ -f "/etc/gentoo-release" ]; then
- echo "Installing using Portage"
- sudo emerge -avn dev-python/pynvim
- else
- pip3 install pynvim --user
- fi
+ echo "Installing pynvim..."
+ if [ -f "/etc/gentoo-release" ]; then
+ echo "Installing using Portage"
+ sudo emerge -avn dev-python/pynvim
+ else
+ pip3 install pynvim --user
+ fi
}
installpacker() {
- git clone https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim
+ git clone https://github.com/wbthomason/packer.nvim ~/.local/share/lunarvim/site/pack/packer/start/packer.nvim
}
cloneconfig() {
- echo "Cloning LunarVim configuration"
- git clone --branch $LVBRANCH https://github.com/ChristianChiarulli/lunarvim.git ~/.config/nvim
- cp $HOME/.config/nvim/utils/installer/lv-config.example-no-ts.lua $HOME/.config/nvim/lv-config.lua
- nvim --headless \
- +'autocmd User PackerComplete sleep 100m | qall' \
- +PackerInstall
+ echo "Cloning LunarVim configuration"
+ mkdir -p ~/.local/share/lunarvim
+ case "$@" in
- nvim --headless \
- +'autocmd User PackerComplete sleep 100m | qall' \
- +PackerSync
+ *--testing*)
+ cp -r "$(pwd)" ~/.local/share/lunarvim/lvim
+ ;;
+ *)
+ git clone --branch "$LVBRANCH" https://github.com/ChristianChiarulli/lunarvim.git ~/.local/share/lunarvim/lvim
+ ;;
+ esac
+ mkdir -p "$HOME/.config/lvim"
+ sudo cp "$HOME/.local/share/lunarvim/lvim/utils/bin/lvim" "/usr/local/bin"
+ cp "$HOME/.local/share/lunarvim/lvim/utils/installer/lv-config.example-no-ts.lua" "$HOME/.config/lvim/lv-config.lua"
+
+ nvim -u ~/.local/share/lunarvim/lvim/init.lua --cmd "set runtimepath+=~/.local/share/lunarvim/lvim" --headless \
+ +'autocmd User PackerComplete sleep 100m | qall' \
+ +PackerInstall
+
+ nvim -u ~/.local/share/lunarvim/lvim/init.lua --cmd "set runtimepath+=~/.local/share/lunarvim/lvim" --headless \
+ +'autocmd User PackerComplete sleep 100m | qall' \
+ +PackerSync
+
+ printf "\nCompile Complete\n"
+
+ if [ -e "$HOME/.local/share/lunarvim/lvim/init.lua" ]; then
+ echo 'lv-config already present'
+ else
+ cp "$HOME/.local/share/lunarvim/lvim/utils/installer/lv-config.example.lua" "$HOME/.config/lvim/lv-config.lua"
+ fi
- echo -e "\nCompile Complete"
- rm $HOME/.config/nvim/lv-config.lua
- cp $HOME/.config/nvim/utils/installer/lv-config.example.lua $HOME/.config/nvim/lv-config.lua
- # nvim --headless -cq ':silent TSUpdate' -cq ':qall' >/dev/null 2>&1
}
asktoinstallnode() {
- echo "node not found"
- echo -n "Would you like to install node now (y/n)? "
- read answer
- [ "$answer" != "${answer#[Yy]}" ] && installnode
+ echo "node not found"
+ printf "Would you like to install node now (y/n)? "
+ read -r answer
+ [ "$answer" != "${answer#[Yy]}" ] && installnode
}
asktoinstallpip() {
- # echo "pip not found"
- # echo -n "Would you like to install pip now (y/n)? "
- # read answer
- # [ "$answer" != "${answer#[Yy]}" ] && installpip
- echo "Please install pip3 before continuing with install"
- exit
+ # echo "pip not found"
+ # echo -n "Would you like to install pip now (y/n)? "
+ # read answer
+ # [ "$answer" != "${answer#[Yy]}" ] && installpip
+ echo "Please install pip3 before continuing with install"
+ exit
}
installonmac() {
- brew install ripgrep fzf ranger
- npm install -g tree-sitter-cli
-}
-
-pipinstallueberzug() {
- which pip3 >/dev/null && pip3 install ueberzug || echo "Not installing ueberzug pip not found"
+ brew install ripgrep fzf
+ npm install -g tree-sitter-cli
}
installonubuntu() {
- sudo apt install ripgrep fzf ranger
- sudo apt install libjpeg8-dev zlib1g-dev python-dev python3-dev libxtst-dev
- pip3 install ueberzug
- pip3 install neovim-remote
- npm install -g tree-sitter-cli
+ sudo apt install ripgrep fzf
+ sudo apt install libjpeg8-dev zlib1g-dev python-dev python3-dev libxtst-dev
+ pip3 install neovim-remote
+ npm install -g tree-sitter-cli
}
installonarch() {
- sudo pacman -S ripgrep fzf ranger
- which yay >/dev/null && yay -S python-ueberzug-git || pipinstallueberzug
- pip3 install neovim-remote
- npm install -g tree-sitter-cli
+ sudo pacman -S ripgrep fzf
+ pip3 install neovim-remote
+ npm install -g tree-sitter-cli
}
installonfedora() {
- sudo dnf groupinstall "X Software Development"
- sudo dnf install -y fzf ripgrep ranger
- pip3 install wheel ueberzug
+ sudo dnf groupinstall "X Software Development"
+ sudo dnf install -y fzf ripgrep
}
installongentoo() {
- sudo emerge -avn sys-apps/ripgrep app-shells/fzf app-misc/ranger dev-python/neovim-remote virtual/jpeg sys-libs/zlib
- pipinstallueberzug
- npm install -g tree-sitter-cli
+ sudo emerge -avn sys-apps/ripgrep app-shells/fzf dev-python/neovim-remote virtual/jpeg sys-libs/zlib
+ npm install -g tree-sitter-cli
}
installextrapackages() {
- [ "$(uname)" == "Darwin" ] && installonmac
- [ -n "$(cat /etc/os-release | grep Ubuntu)" ] && installonubuntu
- [ -f "/etc/arch-release" ] && installonarch
- [ -f "/etc/artix-release" ] && installonarch
- [ -f "/etc/fedora-release" ] && installonfedora
- [ -f "/etc/gentoo-release" ] && installongentoo
- [ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ] && echo "Windows not currently supported"
+ [ "$(uname)" = "Darwin" ] && installonmac
+ grep -q Ubuntu /etc/os-release && installonubuntu
+ [ -f "/etc/arch-release" ] && installonarch
+ [ -f "/etc/artix-release" ] && installonarch
+ [ -f "/etc/fedora-release" ] && installonfedora
+ [ -f "/etc/gentoo-release" ] && installongentoo
+ [ "$(uname -s | cut -c 1-10)" = "MINGW64_NT" ] && echo "Windows not currently supported"
}
# Welcome
echo 'Installing LunarVim'
-if [[ $* == *--overwrite* ]]; then
- echo '!!Warning!! -> Removing all nvim related config because of the --overwrite flag'
- rm -rf "$HOME/.config/nvim"
- rm -rf "$HOME/.cache/nvim"
- rm -rf "$HOME/.local/share/nvim/site/pack/packer"
-fi
+case "$@" in
+*--overwrite*)
+ echo '!!Warning!! -> Removing all lunarvim related config because of the --overwrite flag'
+ rm -rf "$HOME/.local/share/lunarvim"
+ rm -rf "$HOME/.cache/nvim"
+ rm -rf "$HOME/.config/lvim"
+ ;;
+esac
-# move old nvim directory if it exists
-[ -d "$HOME/.config/nvim" ] && moveoldnvim
+# move old lvim directory if it exists
+[ -d "$HOME/.local/share/lunarvim" ] && moveoldlvim
# install pip
-which pip3 >/dev/null && echo "pip installed, moving on..." || asktoinstallpip
+(command -v pip3 >/dev/null && echo "pip installed, moving on...") || asktoinstallpip
# install node and neovim support
-which node >/dev/null && echo "node installed, moving on..." || asktoinstallnode
+(command -v node >/dev/null && echo "node installed, moving on...") || asktoinstallnode
# install pynvim
-pip3 list | grep pynvim >/dev/null && echo "pynvim installed, moving on..." || installpynvim
+(pip3 list | grep pynvim >/dev/null && echo "pynvim installed, moving on...") || installpynvim
-if [ -e "$HOME/.local/share/nvim/site/pack/packer/start/packer.nvim" ]; then
- echo 'packer already installed'
+if [ -e "$HOME/.local/share/lunarvim/site/pack/packer/start/packer.nvim" ]; then
+ echo 'packer already installed'
else
- installpacker
+ installpacker
fi
-if [ -e "$HOME/.config/nvim/init.lua" ]; then
- echo 'LunarVim already installed'
+if [ -e "$HOME/.local/share/lunarvim/lvim/init.lua" ]; then
+ echo 'LunarVim already installed'
else
- # clone config down
- cloneconfig
- # echo 'export PATH=$HOME/.config/nvim/utils/bin:$PATH' >>~/.zshrc
- # echo 'export PATH=$HOME/.config/lunarvim/utils/bin:$PATH' >>~/.bashrc
+ # clone config down
+ cloneconfig "$@"
+ # echo 'export PATH=$HOME/.config/nvim/utils/bin:$PATH' >>~/.zshrc
+ # echo 'export PATH=$HOME/.config/lunarvim/utils/bin:$PATH' >>~/.bashrc
fi
-echo "I recommend you also install and activate a font from here: https://github.com/ryanoasis/nerd-fonts"
-
-# echo "I also recommend you add 'set preview_images_method ueberzug' to ~/.config/ranger/rc.conf"
+if [ "$(uname)" != "Darwin" ]; then
+ if [ -e "$HOME/.local/share/applications/lvim.desktop" ]; then
+ echo 'Desktop file already available'
+ else
+ mkdir -p "$HOME/.local/share/applications"
+ cp "$HOME/.local/share/lunarvim/lvim/utils/desktop/lvim.desktop" "$HOME/.local/share/applications/lvim.desktop"
+ fi
+fi
+echo "I recommend you also install and activate a font from here: https://github.com/ryanoasis/nerd-fonts"
# echo 'export PATH=/home/$USER/.config/lunarvim/utils/bin:$PATH appending to zshrc/bashrc'
diff --git a/utils/installer/install_stylua.sh b/utils/installer/install_stylua.sh
new file mode 100755
index 00000000..cd8b3942
--- /dev/null
+++ b/utils/installer/install_stylua.sh
@@ -0,0 +1,63 @@
+#!/usr/bin/env bash
+
+set -eu pipefall
+
+declare -r INSTALL_DIR="$PWD/utils"
+declare -r RELEASE="0.10.0"
+declare -r OS="linux"
+# declare -r OS="$(uname -s)"
+declare -r FILENAME="stylua-$RELEASE-$OS"
+
+declare -a __deps=("curl" "unzip")
+
+function check_deps() {
+ for dep in "${__deps[@]}"; do
+ if ! command -v "$dep" >/dev/null; then
+ echo "Missing depdendecy!"
+ echo "The \"$dep\" command was not found!. Please install and try again."
+ fi
+ done
+}
+
+function download_stylua() {
+ local DOWNLOAD_DIR
+ local URL="https://github.com/JohnnyMorganz/StyLua/releases/download/v$RELEASE/$FILENAME.zip"
+
+ DOWNLOAD_DIR="$(mktemp -d)"
+ echo "Initiating download for Stylua v$RELEASE"
+ if ! curl --progress-bar --fail -L "$URL" -o "$DOWNLOAD_DIR/$FILENAME.zip"; then
+ echo "Download failed. Check that the release/filename are correct."
+ exit 1
+ fi
+
+ echo "Installtion in progress.."
+ unzip -q "$DOWNLOAD_DIR/$FILENAME.zip" -d "$DOWNLOAD_DIR"
+
+ if [ -f "$DOWNLOAD_DIR/stylua" ]; then
+ mv "$DOWNLOAD_DIR/stylua" "$INSTALL_DIR/stylua"
+ else
+ mv "$DOWNLOAD_DIR/$FILENAME/stylua" "$INSTALL_DIR/."
+ fi
+
+ chmod u+x "$INSTALL_DIR/stylua"
+}
+
+function verify_install() {
+ echo "Verifying installtion.."
+ local DOWNLOADED_VER
+ DOWNLOADED_VER="$("$INSTALL_DIR/stylua" -V | awk '{ print $2 }')"
+ if [ "$DOWNLOADED_VER" != "$RELEASE" ]; then
+ echo "Mismatched version!"
+ echo "Expected: v$RELEASE but got v$DOWNLOADED_VER"
+ exit 1
+ fi
+ echo "Verification complete!"
+}
+
+function main() {
+ check_deps
+ download_stylua
+ verify_install
+}
+
+main "$@"
diff --git a/utils/installer/lv-config.example-no-ts.lua b/utils/installer/lv-config.example-no-ts.lua
index 33d9f433..ab12309d 100644
--- a/utils/installer/lv-config.example-no-ts.lua
+++ b/utils/installer/lv-config.example-no-ts.lua
@@ -1,58 +1,55 @@
---[[
-O is the global options object
-
-Linters should be
-filled in as strings with either
-a global executable or a path to
-an executable
-]]
-- THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT
-- general
+lvim.format_on_save = true
+lvim.lint_on_save = true
+lvim.colorscheme = "spacegray"
-O.format_on_save = true
-O.completion.autocomplete = true
-O.colorscheme = "spacegray"
-O.auto_close_tree = 0
-O.default_options.wrap = true
-O.default_options.timeoutlen = 100
-O.leader_key = " "
+-- keymappings
+lvim.leader = "space"
+-- overwrite the key-mappings provided by LunarVim for any mode, or leave it empty to keep them
+-- lvim.keys.normal_mode = {
+-- Page down/up
+-- {'[d', '<PageUp>'},
+-- {']d', '<PageDown>'},
+--
+-- Navigate buffers
+-- {'<Tab>', ':bnext<CR>'},
+-- {'<S-Tab>', ':bprevious<CR>'},
+-- }
+-- if you just want to augment the existing ones then use the utility function
+-- require("utils").add_keymap_insert_mode({ silent = true }, {
+-- { "<C-s>", ":w<cr>" },
+-- { "<C-c>", "<ESC>" },
+-- })
+-- you can also use the native vim way directly
+-- vim.api.nvim_set_keymap("i", "<C-Space>", "compe#complete()", { noremap = true, silent = true, expr = true })
-- TODO: User Config for predefined plugins
-- After changing plugin config exit and reopen LunarVim, Run :PackerInstall :PackerCompile
-O.plugin.dashboard.active = true
-O.plugin.floatterm.active = true
-O.plugin.zen.active = false
-O.plugin.zen.window.height = 0.90
+lvim.builtin.dashboard.active = true
+lvim.builtin.terminal.active = true
+lvim.builtin.nvimtree.side = "left"
+lvim.builtin.nvimtree.show_icons.git = 0
-- if you don't want all the parsers change this to a table of the ones you want
-O.treesitter.ensure_installed = {}
-O.treesitter.ignore_install = { "haskell" }
-O.treesitter.highlight.enabled = true
-
--- python
--- O.python.linter = 'flake8'
-O.lang.python.isort = true
-O.lang.python.diagnostics.virtual_text = true
-O.lang.python.analysis.use_library_code_types = true
--- to change default formatter from yapf to black
--- O.lang.python.formatter.exe = "black"
--- O.lang.python.formatter.args = {"-"}
-
--- go
--- to change default formatter from gofmt to goimports
--- O.lang.formatter.go.exe = "goimports"
-
--- javascript
-O.lang.tsserver.linter = nil
-
--- latex
--- O.lang.latex.auto_save = false
--- O.lang.latex.ignore_errors = { }
+lvim.builtin.treesitter.ensure_installed = {}
+lvim.builtin.treesitter.ignore_install = { "haskell" }
+lvim.builtin.treesitter.highlight.enabled = true
+-- generic LSP settings
+-- you can set a custom on_attach function that will be used for all the language servers
+-- See <https://github.com/neovim/nvim-lspconfig#keybindings-and-completion>
+-- lvim.lsp.on_attach_callback = function(client, bufnr)
+-- local function buf_set_option(...)
+-- vim.api.nvim_buf_set_option(bufnr, ...)
+-- end
+-- --Enable completion triggered by <c-x><c-o>
+-- buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
+-- end
-- Additional Plugins
--- O.user_plugins = {
+-- lvim.plugins = {
-- {"folke/tokyonight.nvim"}, {
-- "ray-x/lsp_signature.nvim",
-- config = function() require"lsp_signature".on_attach() end,
@@ -61,13 +58,8 @@ O.lang.tsserver.linter = nil
-- }
-- Autocommands (https://neovim.io/doc/user/autocmd.html)
--- O.user_autocommands = {{ "BufWinEnter", "*", "echo \"hi again\""}}
+-- lvim.autocommands.custom_groups = {
+-- { "BufWinEnter", "*.lua", "setlocal ts=8 sw=8" },
+-- }
-- Additional Leader bindings for WhichKey
--- O.user_which_key = {
--- A = {
--- name = "+Custom Leader Keys",
--- a = { "<cmd>echo 'first custom command'<cr>", "Description for a" },
--- b = { "<cmd>echo 'second custom command'<cr>", "Description for b" },
--- },
--- }
diff --git a/utils/installer/lv-config.example.lua b/utils/installer/lv-config.example.lua
index 7072c60c..681f5f65 100644
--- a/utils/installer/lv-config.example.lua
+++ b/utils/installer/lv-config.example.lua
@@ -1,5 +1,5 @@
--[[
-O is the global options object
+lvim is the global options object
Linters should be
filled in as strings with either
@@ -10,54 +10,56 @@ an executable
-- general
-O.format_on_save = true
-O.completion.autocomplete = true
-O.colorscheme = "spacegray"
-O.auto_close_tree = 0
-O.default_options.wrap = true
-O.default_options.timeoutlen = 100
-O.leader_key = " "
+lvim.format_on_save = true
+lvim.lint_on_save = true
+lvim.colorscheme = "spacegray"
+-- keymappings
+lvim.leader = "space"
+-- overwrite the key-mappings provided by LunarVim for any mode, or leave it empty to keep them
+-- lvim.keys.normal_mode = {
+-- Page down/up
+-- {'[d', '<PageUp>'},
+-- {']d', '<PageDown>'},
+--
+-- Navigate buffers
+-- {'<Tab>', ':bnext<CR>'},
+-- {'<S-Tab>', ':bprevious<CR>'},
+-- }
+-- if you just want to augment the existing ones then use the utility function
+-- require("utils").add_keymap_insert_mode({ silent = true }, {
+-- { "<C-s>", ":w<cr>" },
+-- { "<C-c>", "<ESC>" },
+-- })
+-- you can also use the native vim way directly
+-- vim.api.nvim_set_keymap("i", "<C-Space>", "compe#complete()", { noremap = true, silent = true, expr = true })
-- TODO: User Config for predefined plugins
-- After changing plugin config exit and reopen LunarVim, Run :PackerInstall :PackerCompile
-O.plugin.dashboard.active = true
-O.plugin.floatterm.active = true
-O.plugin.zen.active = false
-O.plugin.zen.window.height = 0.90
+lvim.builtin.dashboard.active = true
+lvim.builtin.terminal.active = true
+lvim.builtin.nvimtree.side = "left"
+lvim.builtin.nvimtree.show_icons.git = 0
-- if you don't want all the parsers change this to a table of the ones you want
-O.treesitter.ensure_installed = "maintained"
-O.treesitter.ignore_install = { "haskell" }
-O.treesitter.highlight.enabled = true
-
--- python
--- O.lang.python.linter = 'flake8'
-O.lang.python.isort = true
-O.lang.python.diagnostics.virtual_text = true
-O.lang.python.analysis.use_library_code_types = true
--- to change default formatter from yapf to black
--- O.lang.python.formatter.exe = "black"
--- O.lang.python.formatter.args = {"-"}
-
--- go
--- to change default formatter from gofmt to goimports
--- O.lang.formatter.go.exe = "goimports"
+lvim.builtin.treesitter.ensure_installed = "maintained"
+lvim.builtin.treesitter.ignore_install = { "haskell" }
+lvim.builtin.treesitter.highlight.enabled = true
--- javascript
-O.lang.tsserver.linter = nil
+-- generic LSP settings
+-- you can set a custom on_attach function that will be used for all the language servers
+-- See <https://github.com/neovim/nvim-lspconfig#keybindings-and-completion>
+-- lvim.lsp.on_attach_callback = function(client, bufnr)
+-- local function buf_set_option(...)
+-- vim.api.nvim_buf_set_option(bufnr, ...)
+-- end
+-- --Enable completion triggered by <c-x><c-o>
+-- buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
+-- end
--- rust
--- O.lang.rust.formatter = {
--- exe = "rustfmt",
--- args = {"--emit=stdout", "--edition=2018"},
--- }
-
--- latex
--- O.lang.latex.auto_save = false
--- O.lang.latex.ignore_errors = { }
+-- python
-- Additional Plugins
--- O.user_plugins = {
+-- lvim.plugins = {
-- {"folke/tokyonight.nvim"}, {
-- "ray-x/lsp_signature.nvim",
-- config = function() require"lsp_signature".on_attach() end,
@@ -66,13 +68,18 @@ O.lang.tsserver.linter = nil
-- }
-- Autocommands (https://neovim.io/doc/user/autocmd.html)
--- O.user_autocommands = {{ "BufWinEnter", "*", "echo \"hi again\""}}
+-- lvim.autocommands.custom_groups = {
+-- { "BufWinEnter", "*.lua", "setlocal ts=8 sw=8" },
+-- }
-- Additional Leader bindings for WhichKey
--- O.user_which_key = {
--- A = {
--- name = "+Custom Leader Keys",
--- a = { "<cmd>echo 'first custom command'<cr>", "Description for a" },
--- b = { "<cmd>echo 'second custom command'<cr>", "Description for b" },
--- },
+-- lvim.builtin.which_key.mappings["P"] = { "<cmd>lua require'telescope'.extensions.project.project{}<CR>", "Projects" }
+-- lvim.builtin.which_key.mappings["t"] = {
+-- name = "+Trouble",
+-- r = { "<cmd>Trouble lsp_references<cr>", "References" },
+-- f = { "<cmd>Trouble lsp_definitions<cr>", "Definitions" },
+-- d = { "<cmd>Trouble lsp_document_diagnostics<cr>", "Diagnosticss" },
+-- q = { "<cmd>Trouble quickfix<cr>", "QuickFix" },
+-- l = { "<cmd>Trouble loclist<cr>", "LocationList" },
+-- w = { "<cmd>Trouble lsp_workspace_diagnostics<cr>", "Diagnosticss" },
-- }
diff --git a/utils/installer/uninstall.sh b/utils/installer/uninstall.sh
new file mode 100755
index 00000000..0615e219
--- /dev/null
+++ b/utils/installer/uninstall.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+rm -rf ~/.local/share/lunarvim
+sudo rm /usr/local/bin/lvim
+rm -rf ~/.local/share/applications/lvim.desktop
diff --git a/utils/julia/Manifest.toml b/utils/julia/Manifest.toml
new file mode 100644
index 00000000..c6c12950
--- /dev/null
+++ b/utils/julia/Manifest.toml
@@ -0,0 +1,182 @@
+# This file is machine-generated - editing it directly is not advised
+
+[[ArgTools]]
+uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
+
+[[Artifacts]]
+uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
+
+[[Base64]]
+uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
+
+[[CSTParser]]
+deps = ["Tokenize"]
+git-tree-sha1 = "9723e1c07c1727082e169ca50789644a552fb023"
+uuid = "00ebfdb7-1f24-5e51-bd34-a7502290713f"
+version = "3.2.3"
+
+[[Dates]]
+deps = ["Printf"]
+uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
+
+[[DocumentFormat]]
+deps = ["CSTParser", "FilePathsBase", "Tokenize"]
+git-tree-sha1 = "cf048d65cbcdec70f10745e5801eeb0c6478a7f7"
+uuid = "ffa9a821-9c82-50df-894e-fbcef3ed31cd"
+version = "3.2.4"
+
+[[Downloads]]
+deps = ["ArgTools", "LibCURL", "NetworkOptions"]
+uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
+
+[[FilePathsBase]]
+deps = ["Dates", "Mmap", "Printf", "Test", "UUIDs"]
+git-tree-sha1 = "0f5e8d0cb91a6386ba47bd1527b240bd5725fbae"
+uuid = "48062228-2e41-5def-b9a4-89aafe57970f"
+version = "0.9.10"
+
+[[InteractiveUtils]]
+deps = ["Markdown"]
+uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
+
+[[JSON]]
+deps = ["Dates", "Mmap", "Parsers", "Unicode"]
+git-tree-sha1 = "81690084b6198a2e1da36fcfda16eeca9f9f24e4"
+uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
+version = "0.21.1"
+
+[[JSONRPC]]
+deps = ["JSON", "UUIDs"]
+git-tree-sha1 = "1e9a820a29b37864a6738b8fd00eedf3fb8d772e"
+uuid = "b9b8584e-8fd3-41f9-ad0c-7255d428e418"
+version = "1.3.3"
+
+[[LanguageServer]]
+deps = ["CSTParser", "DocumentFormat", "JSON", "JSONRPC", "Markdown", "Pkg", "REPL", "StaticLint", "SymbolServer", "Tokenize", "URIParser", "UUIDs"]
+git-tree-sha1 = "ac9f7da10fbba9cad8455a3436d121eaf8f308f6"
+uuid = "2b0e0bc5-e4fd-59b4-8912-456d1b03d8d7"
+version = "4.0.0"
+
+[[LibCURL]]
+deps = ["LibCURL_jll", "MozillaCACerts_jll"]
+uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"
+
+[[LibCURL_jll]]
+deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"]
+uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0"
+
+[[LibGit2]]
+deps = ["Base64", "NetworkOptions", "Printf", "SHA"]
+uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
+
+[[LibSSH2_jll]]
+deps = ["Artifacts", "Libdl", "MbedTLS_jll"]
+uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8"
+
+[[Libdl]]
+uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
+
+[[Logging]]
+uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
+
+[[Markdown]]
+deps = ["Base64"]
+uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
+
+[[MbedTLS_jll]]
+deps = ["Artifacts", "Libdl"]
+uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
+
+[[Mmap]]
+uuid = "a63ad114-7e13-5084-954f-fe012c677804"
+
+[[MozillaCACerts_jll]]
+uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
+
+[[NetworkOptions]]
+uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
+
+[[Parsers]]
+deps = ["Dates"]
+git-tree-sha1 = "c8abc88faa3f7a3950832ac5d6e690881590d6dc"
+uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
+version = "1.1.0"
+
+[[Pkg]]
+deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
+uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
+
+[[Printf]]
+deps = ["Unicode"]
+uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"
+
+[[REPL]]
+deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
+uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
+
+[[Random]]
+deps = ["Serialization"]
+uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
+
+[[SHA]]
+uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
+
+[[Serialization]]
+uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
+
+[[Sockets]]
+uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
+
+[[StaticLint]]
+deps = ["CSTParser", "Serialization", "SymbolServer"]
+git-tree-sha1 = "337ca6f234947b31e921a424f7d0ec8dda22ed49"
+uuid = "b3cc710f-9c33-5bdb-a03d-a94903873e97"
+version = "8.0.0"
+
+[[SymbolServer]]
+deps = ["InteractiveUtils", "LibGit2", "Markdown", "Pkg", "REPL", "SHA", "Serialization", "Sockets", "UUIDs"]
+git-tree-sha1 = "9053544866f779dfb87027c52a332e2830e868ab"
+uuid = "cf896787-08d5-524d-9de7-132aaa0cb996"
+version = "7.0.0"
+
+[[TOML]]
+deps = ["Dates"]
+uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
+
+[[Tar]]
+deps = ["ArgTools", "SHA"]
+uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
+
+[[Test]]
+deps = ["InteractiveUtils", "Logging", "Random", "Serialization"]
+uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
+
+[[Tokenize]]
+git-tree-sha1 = "eee92eda3cc8e104b7e56ff4c1fcf0d78ca37c89"
+uuid = "0796e94c-ce3b-5d07-9a54-7f471281c624"
+version = "0.5.18"
+
+[[URIParser]]
+deps = ["Unicode"]
+git-tree-sha1 = "53a9f49546b8d2dd2e688d216421d050c9a31d0d"
+uuid = "30578b45-9adc-5946-b283-645ec420af67"
+version = "0.4.1"
+
+[[UUIDs]]
+deps = ["Random", "SHA"]
+uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
+
+[[Unicode]]
+uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
+
+[[Zlib_jll]]
+deps = ["Libdl"]
+uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
+
+[[nghttp2_jll]]
+deps = ["Artifacts", "Libdl"]
+uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"
+
+[[p7zip_jll]]
+deps = ["Artifacts", "Libdl"]
+uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"
diff --git a/utils/julia/Project.toml b/utils/julia/Project.toml
new file mode 100644
index 00000000..50cd7702
--- /dev/null
+++ b/utils/julia/Project.toml
@@ -0,0 +1,3 @@
+[deps]
+LanguageServer = "2b0e0bc5-e4fd-59b4-8912-456d1b03d8d7"
+SymbolServer = "cf896787-08d5-524d-9de7-132aaa0cb996"
diff --git a/utils/julia/run.jl b/utils/julia/run.jl
new file mode 100644
index 00000000..4662e1b2
--- /dev/null
+++ b/utils/julia/run.jl
@@ -0,0 +1,37 @@
+# Load LanguageServer from the project next to this file
+## Save old load path
+old_load_path = copy(LOAD_PATH)
+push!(empty!(LOAD_PATH), @__DIR__)
+## Load packages
+using LanguageServer, SymbolServer
+## Restore old load path
+append!(empty!(LOAD_PATH), old_load_path)
+
+# Figure out the active project
+## This configuration is a good default
+project_path = let
+ dirname(something(
+ ## 1. Finds an explicitly set project (JULIA_PROJECT)
+ Base.load_path_expand((
+ p = get(ENV, "JULIA_PROJECT", nothing);
+ p === nothing ? nothing : isempty(p) ? nothing : p
+ )),
+ ## 2. Look for a Project.toml file in the current working directory,
+ ## or parent directories, with $HOME as an upper boundary
+ Base.current_project(),
+ ## 3. First entry in the load path
+ get(Base.load_path(), 1, nothing),
+ ## 4. Fallback to default global environment,
+ ## this is more or less unreachable
+ Base.load_path_expand("@v#.#"),
+ ))
+end
+
+# Depot path for the server to index (empty uses default).
+depot_path = get(ENV, "JULIA_DEPOT_PATH", "")
+
+# Start the server
+@info "Running julia language server" VERSION project_path depot_path
+server = LanguageServer.LanguageServerInstance(stdin, stdout, project_path, depot_path)
+server.runlinter = true
+run(server)
diff --git a/utils/vscode_config/settings.json b/utils/vscode_config/settings.json
index 5ba2f460..d8a91c0f 100644
--- a/utils/vscode_config/settings.json
+++ b/utils/vscode_config/settings.json
@@ -1,8 +1,8 @@
{
"vscode-neovim.neovimExecutablePaths.darwin": "/usr/local/bin/nvim",
"vscode-neovim.neovimExecutablePaths.linux": "/usr/local/bin/nvim",
- "vscode-neovim.neovimInitVimPaths.darwin": "$HOME/.config/nvim/vimscript/nv-vscode/init.vim",
- "vscode-neovim.neovimInitVimPaths.linux": "$HOME/.config/nvim/vimscript/nv-vscode/init.vim",
+ "vscode-neovim.neovimInitVimPaths.darwin": "$HOME/.config/nvim/utils/lv-vscode/init.vim",
+ "vscode-neovim.neovimInitVimPaths.linux": "$HOME/.config/nvim/utils/lv-vscode/init.vim",
"whichkey.sortOrder": "alphabetically",
"whichkey.delay": 0,
"whichkey.bindings": [