summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorkylo252 <[email protected]>2022-08-29 14:35:15 +0200
committerkylo252 <[email protected]>2022-08-29 14:35:15 +0200
commit439e0c205a4c09545f08816ab5100fb5d9a93d3b (patch)
tree4d3767b7e921dd707fe859b98bbaa5081fce205c /utils
parent47e4e5b83808f784010aa480753beaaef16ac579 (diff)
parentdf84e4ecce5a7c8838fd21d5de939128f3214ef4 (diff)
Merge remote-tracking branch 'origin/rolling'
Diffstat (limited to 'utils')
-rw-r--r--utils/ci/generate_new_lockfile.lua3
-rw-r--r--utils/installer/config.example.lua6
-rw-r--r--utils/installer/config_win.example.lua18
-rw-r--r--utils/installer/install.ps17
-rwxr-xr-xutils/installer/install.sh33
5 files changed, 49 insertions, 18 deletions
diff --git a/utils/ci/generate_new_lockfile.lua b/utils/ci/generate_new_lockfile.lua
index fd10775c..8eef5184 100644
--- a/utils/ci/generate_new_lockfile.lua
+++ b/utils/ci/generate_new_lockfile.lua
@@ -70,6 +70,7 @@ local function write_lockfile(verbose)
name = name,
url = url,
commit = commit,
+ branch = plugin.branch or "HEAD",
})
end
@@ -90,7 +91,7 @@ local function write_lockfile(verbose)
}
end
- local handle = call_proc("git", { args = { "ls-remote", entry.url, "HEAD" } }, on_done)
+ local handle = call_proc("git", { args = { "ls-remote", entry.url, entry.branch } }, on_done)
assert(handle)
table.insert(active_jobs, handle)
end
diff --git a/utils/installer/config.example.lua b/utils/installer/config.example.lua
index 036b8ec2..65662794 100644
--- a/utils/installer/config.example.lua
+++ b/utils/installer/config.example.lua
@@ -19,6 +19,8 @@ lvim.colorscheme = "onedarker"
lvim.leader = "space"
-- add your own keymapping
lvim.keys.normal_mode["<C-s>"] = ":w<cr>"
+-- lvim.keys.normal_mode["<S-l>"] = ":BufferLineCycleNext<CR>"
+-- lvim.keys.normal_mode["<S-h>"] = ":BufferLineCyclePrev<CR>"
-- unmap a default keymapping
-- vim.keymap.del("n", "<C-Up>")
-- override a default keymapping
@@ -51,7 +53,7 @@ lvim.keys.normal_mode["<C-s>"] = ":w<cr>"
-- d = { "<cmd>Trouble document_diagnostics<cr>", "Diagnostics" },
-- q = { "<cmd>Trouble quickfix<cr>", "QuickFix" },
-- l = { "<cmd>Trouble loclist<cr>", "LocationList" },
--- w = { "<cmd>Trouble workspace_diagnostics<cr>", "Wordspace Diagnostics" },
+-- w = { "<cmd>Trouble workspace_diagnostics<cr>", "Workspace Diagnostics" },
-- }
-- TODO: User Config for predefined plugins
@@ -99,7 +101,7 @@ lvim.builtin.treesitter.highlight.enabled = true
-- }
-- ---@usage disable automatic installation of servers
--- lvim.lsp.automatic_servers_installation = false
+-- lvim.lsp.installer.setup.automatic_installation = false
-- ---configure a server manually. !!Requires `:LvimCacheReset` to take effect!!
-- ---see the full default list `:lua print(vim.inspect(lvim.lsp.automatic_configuration.skipped_servers))`
diff --git a/utils/installer/config_win.example.lua b/utils/installer/config_win.example.lua
index cb110664..6e9a1ba0 100644
--- a/utils/installer/config_win.example.lua
+++ b/utils/installer/config_win.example.lua
@@ -36,6 +36,8 @@ lvim.colorscheme = "onedarker"
lvim.leader = "space"
-- add your own keymapping
lvim.keys.normal_mode["<C-s>"] = ":w<cr>"
+-- lvim.keys.normal_mode["<S-l>"] = ":BufferLineCycleNext<CR>"
+-- lvim.keys.normal_mode["<S-h>"] = ":BufferLineCyclePrev<CR>"
-- unmap a default keymapping
-- vim.keymap.del("n", "<C-Up>")
-- override a default keymapping
@@ -79,14 +81,14 @@ lvim.builtin.terminal.active = false
-- lvim.builtin.terminal.shell = "pwsh.exe -NoLogo"
-- nvim-tree has some performance issues on windows, see kyazdani42/nvim-tree.lua#549
-lvim.builtin.nvimtree.setup.diagnostics.enable = false
-lvim.builtin.nvimtree.setup.filters.custom = false
-lvim.builtin.nvimtree.setup.git.enable = false
-lvim.builtin.nvimtree.setup.update_cwd = false
-lvim.builtin.nvimtree.setup.update_focused_file.update_cwd = false
+lvim.builtin.nvimtree.setup.diagnostics.enable = nil
+lvim.builtin.nvimtree.setup.filters.custom = nil
+lvim.builtin.nvimtree.setup.git.enable = nil
+lvim.builtin.nvimtree.setup.update_cwd = nil
+lvim.builtin.nvimtree.setup.update_focused_file.update_cwd = nil
lvim.builtin.nvimtree.setup.view.side = "left"
-lvim.builtin.nvimtree.setup.renderer.highlight_git = false
-lvim.builtin.nvimtree.setup.renderer.icons.show.git = false
+lvim.builtin.nvimtree.setup.renderer.highlight_git = nil
+lvim.builtin.nvimtree.setup.renderer.icons.show.git = nil
-- if you don't want all the parsers change this to a table of the ones you want
lvim.builtin.treesitter.ensure_installed = {
@@ -114,7 +116,7 @@ lvim.builtin.treesitter.highlight.enabled = true
-- }
-- ---@usage disable automatic installation of servers
--- lvim.lsp.automatic_servers_installation = false
+-- lvim.lsp.installer.setup.automatic_installation = false
-- ---configure a server manually. !!Requires `:LvimCacheReset` to take effect!!
-- ---see the full default list `:lua print(vim.inspect(lvim.lsp.automatic_configuration.skipped_servers))`
diff --git a/utils/installer/install.ps1 b/utils/installer/install.ps1
index dcfa47f4..320e377c 100644
--- a/utils/installer/install.ps1
+++ b/utils/installer/install.ps1
@@ -264,6 +264,13 @@ function create_alias {
return
}
+ try {
+ Get-Content $PROFILE -ErrorAction Stop
+ }
+ catch {
+ New-Item -Path $PROFILE -ItemType "file" -Force
+ }
+
Add-Content -Path $PROFILE -Value $("`r`nSet-Alias lvim $lvim_bin")
Write-Host 'To use the new alias in this window reload your profile with: `. $PROFILE`' -ForegroundColor Green
diff --git a/utils/installer/install.sh b/utils/installer/install.sh
index dc342d12..620d46f5 100755
--- a/utils/installer/install.sh
+++ b/utils/installer/install.sh
@@ -26,6 +26,7 @@ declare ARGS_LOCAL=0
declare ARGS_OVERWRITE=0
declare ARGS_INSTALL_DEPENDENCIES=1
declare INTERACTIVE_MODE=1
+declare ADDITIONAL_WARNINGS=""
declare -a __lvim_dirs=(
"$LUNARVIM_CONFIG_DIR"
@@ -148,6 +149,7 @@ function main() {
setup_lvim
+ msg "$ADDITIONAL_WARNINGS"
msg "Thank you for installing LunarVim!!"
echo "You can start it by running: $INSTALL_PREFIX/bin/lvim"
echo "Do not forget to use a font with glyphs (icons) support [https://github.com/ryanoasis/nerd-fonts]"
@@ -226,7 +228,25 @@ function validate_lunarvim_files() {
fi
}
+function validate_install_prefix() {
+ local prefix="$1"
+ case $PATH in
+ *"$prefix/bin"*)
+ return
+ ;;
+ esac
+ local profile="$HOME/.profile"
+ test -z "$ZSH_VERSION" && profile="$HOME/.zshenv"
+ ADDITIONAL_WARNINGS="[WARN] the folder $prefix/bin is not on PATH, consider adding 'export PATH=$prefix/bin:\$PATH' to your $profile"
+
+ # avoid problems when calling any verify_* function
+ export PATH="$prefix/bin:$PATH"
+}
+
function check_system_deps() {
+
+ validate_install_prefix "$INSTALL_PREFIX"
+
if ! command -v git &>/dev/null; then
print_missing_dep_msg "git"
exit 1
@@ -279,7 +299,6 @@ function __validate_node_installation() {
fi
if [ ! -d "$manager_home" ] || [ ! -w "$manager_home" ]; then
- echo "[ERROR] Unable to install using [$pkg_manager] without administrative privileges."
return 1
fi
@@ -294,21 +313,21 @@ function install_nodejs_deps() {
return
fi
done
- print_missing_dep_msg "${pkg_managers[@]}"
- exit 1
+ echo "[WARN]: skipping installing optional nodejs dependencies due to insufficient permissions."
+ echo "check how to solve it: https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally"
}
function install_python_deps() {
echo "Verifying that pip is available.."
- if ! python3 -m ensurepip &>/dev/null; then
+ if ! python3 -m ensurepip >/dev/null; then
if ! python3 -m pip --version &>/dev/null; then
- print_missing_dep_msg "pip"
- exit 1
+ echo "[WARN]: skipping installing optional python dependencies"
+ return 1
fi
fi
echo "Installing with pip.."
for dep in "${__pip_deps[@]}"; do
- python3 -m pip install --user "$dep"
+ python3 -m pip install --user "$dep" || return 1
done
echo "All Python dependencies are successfully installed"
}