From 655fd1b0ca5405ce67f3f8083ef6a4f7d2dedea0 Mon Sep 17 00:00:00 2001 From: Abouzar Parvan Date: Thu, 23 Dec 2021 13:03:20 +0330 Subject: refactor: uplift neovim's minimum version requirement to 0.6.0 (#2093) Co-authored-by: kylo252 <59826753+kylo252@users.noreply.github.com> --- utils/installer/config.example.lua | 4 +--- utils/installer/install.sh | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'utils') diff --git a/utils/installer/config.example.lua b/utils/installer/config.example.lua index 03906ada..51b5f349 100644 --- a/utils/installer/config.example.lua +++ b/utils/installer/config.example.lua @@ -100,9 +100,7 @@ lvim.builtin.treesitter.highlight.enabled = true -- buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") -- end -- you can overwrite the null_ls setup table (useful for setting the root_dir function) --- lvim.lsp.null_ls.setup = { --- root_dir = require("lspconfig").util.root_pattern("Makefile", ".git", "node_modules"), --- } +-- lvim.lsp.null_ls.setup.root_dir = require("lspconfig").util.root_pattern("Makefile", ".git", "node_modules") -- or if you need something more advanced -- lvim.lsp.null_ls.setup.root_dir = function(fname) -- if vim.bo.filetype == "javascript" then diff --git a/utils/installer/install.sh b/utils/installer/install.sh index 1dc77513..fbe920cf 100755 --- a/utils/installer/install.sh +++ b/utils/installer/install.sh @@ -171,12 +171,11 @@ function print_missing_dep_msg() { } function check_neovim_min_version() { - # TODO: consider locking the requirement to 0.6+ - local verify_version_cmd='if !has("nvim-0.5.1") | cquit | else | quit | endif' + local verify_version_cmd='if !has("nvim-0.6.0") | cquit | else | quit | endif' # exit with an error if min_version not found if ! nvim --headless -u NONE -c "$verify_version_cmd"; then - echo "[ERROR]: LunarVim requires at least Neovim v0.5.1 or higher" + echo "[ERROR]: LunarVim requires at least Neovim v0.6.0 or higher" exit 1 fi } -- cgit v1.2.3 From a79de08d40f08e9a3b753175df11283ed737067c Mon Sep 17 00:00:00 2001 From: Stone Preston Date: Thu, 23 Dec 2021 03:46:14 -0600 Subject: refactor(install.sh): fix typo in node error message (#2107) --- utils/installer/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils') diff --git a/utils/installer/install.sh b/utils/installer/install.sh index fbe920cf..cfedd777 100755 --- a/utils/installer/install.sh +++ b/utils/installer/install.sh @@ -225,7 +225,7 @@ function __validate_node_installation() { manager_home="$($pkg_manager config get prefix 2>/dev/null)" if [ ! -d "$manager_home" ] || [ ! -w "$manager_home" ]; then - echo "[ERROR] Unable to install without administrative privilages. Please set you NPM_HOME correctly and try again." + echo "[ERROR] Unable to install without administrative privileges. Please set your NPM_HOME correctly and try again." exit 1 fi } -- cgit v1.2.3 From 5333cb3de320a13af7db305960247f66ec7f2624 Mon Sep 17 00:00:00 2001 From: Felipe Baltor Date: Sun, 26 Dec 2021 08:56:31 -0300 Subject: fix(installer): more robust yarn validation (#2113) --- utils/installer/install.sh | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'utils') diff --git a/utils/installer/install.sh b/utils/installer/install.sh index cfedd777..1987a519 100755 --- a/utils/installer/install.sh +++ b/utils/installer/install.sh @@ -222,19 +222,29 @@ function __install_nodejs_deps_yarn() { function __validate_node_installation() { local pkg_manager="$1" local manager_home - manager_home="$($pkg_manager config get prefix 2>/dev/null)" + + if ! command -v "$pkg_manager" &>/dev/null; then + return 1 + fi + + if [ "$pkg_manager" == "npm" ]; then + manager_home="$(npm config get prefix 2>/dev/null)" + else + manager_home="$(yarn global bin 2>/dev/null)" + fi if [ ! -d "$manager_home" ] || [ ! -w "$manager_home" ]; then - echo "[ERROR] Unable to install without administrative privileges. Please set your NPM_HOME correctly and try again." - exit 1 + echo "[ERROR] Unable to install using [$pkg_manager] without administrative privileges." + return 1 fi + + return 0 } function install_nodejs_deps() { local -a pkg_managers=("yarn" "npm") for pkg_manager in "${pkg_managers[@]}"; do - if command -v "$pkg_manager" &>/dev/null; then - __validate_node_installation "$pkg_manager" + if __validate_node_installation "$pkg_manager"; then eval "__install_nodejs_deps_$pkg_manager" return fi -- cgit v1.2.3 From 9017389766ff1ce31c8f0a21fe667653a7ab6b3a Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Sun, 2 Jan 2022 10:25:20 +0100 Subject: feat: lazyload notify's configuration (#1855) Co-authored-by: Luc Sinet --- utils/installer/config.example.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'utils') diff --git a/utils/installer/config.example.lua b/utils/installer/config.example.lua index 51b5f349..e3d9fa23 100644 --- a/utils/installer/config.example.lua +++ b/utils/installer/config.example.lua @@ -55,6 +55,7 @@ lvim.keys.normal_mode[""] = ":w" -- TODO: User Config for predefined plugins -- After changing plugin config exit and reopen LunarVim, Run :PackerInstall :PackerCompile lvim.builtin.dashboard.active = true +lvim.builtin.notify.active = true lvim.builtin.terminal.active = true lvim.builtin.nvimtree.setup.view.side = "left" lvim.builtin.nvimtree.show_icons.git = 0 -- cgit v1.2.3 From b3cfd165fbca4c8b595ed577027a5171e33a00e9 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Sun, 2 Jan 2022 14:53:01 +0100 Subject: refactor(test): cleanup test utilities (#2132) --- utils/bin/test_runner.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils') diff --git a/utils/bin/test_runner.sh b/utils/bin/test_runner.sh index 6fc6858b..5b7f81ac 100644 --- a/utils/bin/test_runner.sh +++ b/utils/bin/test_runner.sh @@ -18,7 +18,7 @@ lvim() { if [ -n "$1" ]; then lvim --headless -c "lua require('plenary.busted').run('$1')" else - lvim --headless -c "PlenaryBustedDirectory tests/ { minimal_init = './tests/minimal_init.lua' }" + lvim --headless -c "PlenaryBustedDirectory tests/specs { minimal_init = './tests/minimal_init.lua' }" fi rm -rf "$TEST_BASE_DIR" -- cgit v1.2.3 From 21b41688ee8c5056ffbb2b07df141ce1ccb4b213 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Mon, 3 Jan 2022 15:47:58 +0100 Subject: refactor: use a static lvim binary template (#1444) --- utils/bin/lvim | 6 ------ utils/bin/lvim.template | 7 +++++++ utils/installer/install.sh | 13 +----------- utils/installer/install_bin.sh | 46 +++++++++++++++++++++++------------------- 4 files changed, 33 insertions(+), 39 deletions(-) delete mode 100644 utils/bin/lvim create mode 100644 utils/bin/lvim.template (limited to 'utils') diff --git a/utils/bin/lvim b/utils/bin/lvim deleted file mode 100644 index e4cd9c75..00000000 --- a/utils/bin/lvim +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -export LUNARVIM_RUNTIME_DIR="${LUNARVIM_RUNTIME_DIR:-$HOME/.local/share/lunarvim}" -export LUNARVIM_CONFIG_DIR="${LUNARVIM_CONFIG_DIR:-$HOME/.config/lvim}" - -exec nvim -u "$LUNARVIM_RUNTIME_DIR/lvim/init.lua" "$@" diff --git a/utils/bin/lvim.template b/utils/bin/lvim.template new file mode 100644 index 00000000..1b18977d --- /dev/null +++ b/utils/bin/lvim.template @@ -0,0 +1,7 @@ +#!/bin/sh + +export LUNARVIM_RUNTIME_DIR="${LUNARVIM_RUNTIME_DIR:-RUNTIME_DIR_VAR}" +export LUNARVIM_CONFIG_DIR="${LUNARVIM_CONFIG_DIR:-CONFIG_DIR_VAR}" +export LUNARVIM_CACHE_DIR="${LUNARVIM_CACHE_DIR:-CACHE_DIR_VAR}" + +exec nvim -u "$LUNARVIM_RUNTIME_DIR/lvim/init.lua" "$@" diff --git a/utils/installer/install.sh b/utils/installer/install.sh index 1987a519..c30f2efe 100755 --- a/utils/installer/install.sh +++ b/utils/installer/install.sh @@ -352,18 +352,7 @@ function link_local_lvim() { } function setup_shim() { - if [ ! -d "$INSTALL_PREFIX/bin" ]; then - mkdir -p "$INSTALL_PREFIX/bin" - fi - cat >"$INSTALL_PREFIX/bin/lvim" <"$INSTALL_PREFIX/bin/lvim" </dev/null + + chmod u+x "$dst" } setup_shim "$@" + echo "You can start LunarVim by running: $INSTALL_PREFIX/bin/lvim" -- cgit v1.2.3