From 6f4dd8471b24f71ed6712fb6b9acc0ac79b9137a Mon Sep 17 00:00:00 2001 From: Manpreet Singh Date: Fri, 30 Jul 2021 12:01:54 -0700 Subject: Protect against a strict umask (#1168) --- utils/installer/install.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'utils/installer') diff --git a/utils/installer/install.sh b/utils/installer/install.sh index 5778fb3a..abb35b99 100755 --- a/utils/installer/install.sh +++ b/utils/installer/install.sh @@ -113,6 +113,7 @@ cloneconfig() { esac mkdir -p "$HOME/.config/lvim" sudo cp "$HOME/.local/share/lunarvim/lvim/utils/bin/lvim" "/usr/local/bin" + sudo chmod a+rx /usr/local/bin/lvim 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 \ -- cgit v1.2.3 From 9d89929d9bb47d1f78c2d3945b761da2f24a5643 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Sat, 31 Jul 2021 06:06:08 +0200 Subject: Enable querying lang-server formatting capabilities (#1078) --- utils/installer/lv-config.example-no-ts.lua | 15 +++++++++++++++ utils/installer/lv-config.example.lua | 15 ++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) (limited to 'utils/installer') diff --git a/utils/installer/lv-config.example-no-ts.lua b/utils/installer/lv-config.example-no-ts.lua index ab12309d..c0df5b8b 100644 --- a/utils/installer/lv-config.example-no-ts.lua +++ b/utils/installer/lv-config.example-no-ts.lua @@ -48,6 +48,21 @@ lvim.builtin.treesitter.highlight.enabled = true -- buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") -- end +-- set a formatter if you want to override the default lsp one (if it exists) +-- lvim.lang.python.formatters = { +-- { +-- exe = "black", +-- args = {} +-- } +-- } +-- set an additional linter +-- lvim.lang.python.linters = { +-- { +-- exe = "flake8", +-- args = {} +-- } +-- } + -- Additional Plugins -- lvim.plugins = { -- {"folke/tokyonight.nvim"}, { diff --git a/utils/installer/lv-config.example.lua b/utils/installer/lv-config.example.lua index 681f5f65..843917a7 100644 --- a/utils/installer/lv-config.example.lua +++ b/utils/installer/lv-config.example.lua @@ -56,7 +56,20 @@ lvim.builtin.treesitter.highlight.enabled = true -- buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") -- end --- python +-- set a formatter if you want to override the default lsp one (if it exists) +-- lvim.lang.python.formatters = { +-- { +-- exe = "black", +-- args = {} +-- } +-- } +-- set an additional linter +-- lvim.lang.python.linters = { +-- { +-- exe = "flake8", +-- args = {} +-- } +-- } -- Additional Plugins -- lvim.plugins = { -- cgit v1.2.3 From 213e3961fa637e4dbe4ef1ea5fceadcb372e020e Mon Sep 17 00:00:00 2001 From: chaeing Date: Sat, 31 Jul 2021 11:28:59 -0700 Subject: [Feature] Rename lv-config.lua to config.lua (#1193) * Rename example config files * Update user config path in installer * Update user config path with a variable * Update default user config file to config.lua * Add fallback to lv-config if config.lua not found * Add global variable USER_CONFIG_PATH --- utils/installer/config.example-no-ts.lua | 80 +++++++++++++++++++++++ utils/installer/config.example.lua | 98 +++++++++++++++++++++++++++++ utils/installer/install.sh | 6 +- utils/installer/lv-config.example-no-ts.lua | 80 ----------------------- utils/installer/lv-config.example.lua | 98 ----------------------------- 5 files changed, 181 insertions(+), 181 deletions(-) create mode 100644 utils/installer/config.example-no-ts.lua create mode 100644 utils/installer/config.example.lua delete mode 100644 utils/installer/lv-config.example-no-ts.lua delete mode 100644 utils/installer/lv-config.example.lua (limited to 'utils/installer') diff --git a/utils/installer/config.example-no-ts.lua b/utils/installer/config.example-no-ts.lua new file mode 100644 index 00000000..c0df5b8b --- /dev/null +++ b/utils/installer/config.example-no-ts.lua @@ -0,0 +1,80 @@ +-- 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" + +-- 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', ''}, +-- {']d', ''}, +-- +-- Navigate buffers +-- {'', ':bnext'}, +-- {'', ':bprevious'}, +-- } +-- if you just want to augment the existing ones then use the utility function +-- require("utils").add_keymap_insert_mode({ silent = true }, { +-- { "", ":w" }, +-- { "", "" }, +-- }) +-- you can also use the native vim way directly +-- vim.api.nvim_set_keymap("i", "", "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 +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 +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 +-- 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 +-- buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") +-- end + +-- set a formatter if you want to override the default lsp one (if it exists) +-- lvim.lang.python.formatters = { +-- { +-- exe = "black", +-- args = {} +-- } +-- } +-- set an additional linter +-- lvim.lang.python.linters = { +-- { +-- exe = "flake8", +-- args = {} +-- } +-- } + +-- Additional Plugins +-- lvim.plugins = { +-- {"folke/tokyonight.nvim"}, { +-- "ray-x/lsp_signature.nvim", +-- config = function() require"lsp_signature".on_attach() end, +-- event = "InsertEnter" +-- } +-- } + +-- Autocommands (https://neovim.io/doc/user/autocmd.html) +-- lvim.autocommands.custom_groups = { +-- { "BufWinEnter", "*.lua", "setlocal ts=8 sw=8" }, +-- } + +-- Additional Leader bindings for WhichKey diff --git a/utils/installer/config.example.lua b/utils/installer/config.example.lua new file mode 100644 index 00000000..843917a7 --- /dev/null +++ b/utils/installer/config.example.lua @@ -0,0 +1,98 @@ +--[[ +lvim 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" +-- 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', ''}, +-- {']d', ''}, +-- +-- Navigate buffers +-- {'', ':bnext'}, +-- {'', ':bprevious'}, +-- } +-- if you just want to augment the existing ones then use the utility function +-- require("utils").add_keymap_insert_mode({ silent = true }, { +-- { "", ":w" }, +-- { "", "" }, +-- }) +-- you can also use the native vim way directly +-- vim.api.nvim_set_keymap("i", "", "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 +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 +lvim.builtin.treesitter.ensure_installed = "maintained" +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 +-- 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 +-- buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") +-- end + +-- set a formatter if you want to override the default lsp one (if it exists) +-- lvim.lang.python.formatters = { +-- { +-- exe = "black", +-- args = {} +-- } +-- } +-- set an additional linter +-- lvim.lang.python.linters = { +-- { +-- exe = "flake8", +-- args = {} +-- } +-- } + +-- Additional Plugins +-- lvim.plugins = { +-- {"folke/tokyonight.nvim"}, { +-- "ray-x/lsp_signature.nvim", +-- config = function() require"lsp_signature".on_attach() end, +-- event = "InsertEnter" +-- } +-- } + +-- Autocommands (https://neovim.io/doc/user/autocmd.html) +-- lvim.autocommands.custom_groups = { +-- { "BufWinEnter", "*.lua", "setlocal ts=8 sw=8" }, +-- } + +-- Additional Leader bindings for WhichKey +-- lvim.builtin.which_key.mappings["P"] = { "lua require'telescope'.extensions.project.project{}", "Projects" } +-- lvim.builtin.which_key.mappings["t"] = { +-- name = "+Trouble", +-- r = { "Trouble lsp_references", "References" }, +-- f = { "Trouble lsp_definitions", "Definitions" }, +-- d = { "Trouble lsp_document_diagnostics", "Diagnosticss" }, +-- q = { "Trouble quickfix", "QuickFix" }, +-- l = { "Trouble loclist", "LocationList" }, +-- w = { "Trouble lsp_workspace_diagnostics", "Diagnosticss" }, +-- } diff --git a/utils/installer/install.sh b/utils/installer/install.sh index abb35b99..d6691a92 100755 --- a/utils/installer/install.sh +++ b/utils/installer/install.sh @@ -114,7 +114,7 @@ cloneconfig() { mkdir -p "$HOME/.config/lvim" sudo cp "$HOME/.local/share/lunarvim/lvim/utils/bin/lvim" "/usr/local/bin" sudo chmod a+rx /usr/local/bin/lvim - cp "$HOME/.local/share/lunarvim/lvim/utils/installer/lv-config.example-no-ts.lua" "$HOME/.config/lvim/lv-config.lua" + cp "$HOME/.local/share/lunarvim/lvim/utils/installer/config.example-no-ts.lua" "$HOME/.config/lvim/config.lua" nvim -u ~/.local/share/lunarvim/lvim/init.lua --cmd "set runtimepath+=~/.local/share/lunarvim/lvim" --headless \ +'autocmd User PackerComplete sleep 100m | qall' \ @@ -127,9 +127,9 @@ cloneconfig() { printf "\nCompile Complete\n" if [ -e "$HOME/.local/share/lunarvim/lvim/init.lua" ]; then - echo 'lv-config already present' + echo 'config.lua already present' else - cp "$HOME/.local/share/lunarvim/lvim/utils/installer/lv-config.example.lua" "$HOME/.config/lvim/lv-config.lua" + cp "$HOME/.local/share/lunarvim/lvim/utils/installer/config.example.lua" "$HOME/.config/lvim/config.lua" fi } diff --git a/utils/installer/lv-config.example-no-ts.lua b/utils/installer/lv-config.example-no-ts.lua deleted file mode 100644 index c0df5b8b..00000000 --- a/utils/installer/lv-config.example-no-ts.lua +++ /dev/null @@ -1,80 +0,0 @@ --- 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" - --- 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', ''}, --- {']d', ''}, --- --- Navigate buffers --- {'', ':bnext'}, --- {'', ':bprevious'}, --- } --- if you just want to augment the existing ones then use the utility function --- require("utils").add_keymap_insert_mode({ silent = true }, { --- { "", ":w" }, --- { "", "" }, --- }) --- you can also use the native vim way directly --- vim.api.nvim_set_keymap("i", "", "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 -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 -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 --- 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 --- buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") --- end - --- set a formatter if you want to override the default lsp one (if it exists) --- lvim.lang.python.formatters = { --- { --- exe = "black", --- args = {} --- } --- } --- set an additional linter --- lvim.lang.python.linters = { --- { --- exe = "flake8", --- args = {} --- } --- } - --- Additional Plugins --- lvim.plugins = { --- {"folke/tokyonight.nvim"}, { --- "ray-x/lsp_signature.nvim", --- config = function() require"lsp_signature".on_attach() end, --- event = "InsertEnter" --- } --- } - --- Autocommands (https://neovim.io/doc/user/autocmd.html) --- lvim.autocommands.custom_groups = { --- { "BufWinEnter", "*.lua", "setlocal ts=8 sw=8" }, --- } - --- Additional Leader bindings for WhichKey diff --git a/utils/installer/lv-config.example.lua b/utils/installer/lv-config.example.lua deleted file mode 100644 index 843917a7..00000000 --- a/utils/installer/lv-config.example.lua +++ /dev/null @@ -1,98 +0,0 @@ ---[[ -lvim 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" --- 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', ''}, --- {']d', ''}, --- --- Navigate buffers --- {'', ':bnext'}, --- {'', ':bprevious'}, --- } --- if you just want to augment the existing ones then use the utility function --- require("utils").add_keymap_insert_mode({ silent = true }, { --- { "", ":w" }, --- { "", "" }, --- }) --- you can also use the native vim way directly --- vim.api.nvim_set_keymap("i", "", "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 -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 -lvim.builtin.treesitter.ensure_installed = "maintained" -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 --- 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 --- buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") --- end - --- set a formatter if you want to override the default lsp one (if it exists) --- lvim.lang.python.formatters = { --- { --- exe = "black", --- args = {} --- } --- } --- set an additional linter --- lvim.lang.python.linters = { --- { --- exe = "flake8", --- args = {} --- } --- } - --- Additional Plugins --- lvim.plugins = { --- {"folke/tokyonight.nvim"}, { --- "ray-x/lsp_signature.nvim", --- config = function() require"lsp_signature".on_attach() end, --- event = "InsertEnter" --- } --- } - --- Autocommands (https://neovim.io/doc/user/autocmd.html) --- lvim.autocommands.custom_groups = { --- { "BufWinEnter", "*.lua", "setlocal ts=8 sw=8" }, --- } - --- Additional Leader bindings for WhichKey --- lvim.builtin.which_key.mappings["P"] = { "lua require'telescope'.extensions.project.project{}", "Projects" } --- lvim.builtin.which_key.mappings["t"] = { --- name = "+Trouble", --- r = { "Trouble lsp_references", "References" }, --- f = { "Trouble lsp_definitions", "Definitions" }, --- d = { "Trouble lsp_document_diagnostics", "Diagnosticss" }, --- q = { "Trouble quickfix", "QuickFix" }, --- l = { "Trouble loclist", "LocationList" }, --- w = { "Trouble lsp_workspace_diagnostics", "Diagnosticss" }, --- } -- cgit v1.2.3 From 6d14d7b5da54fffabfec18b2b09a488d3661d7f9 Mon Sep 17 00:00:00 2001 From: Luc Sinet Date: Mon, 2 Aug 2021 17:19:44 +0200 Subject: [Refactor] Adopt which key mapping style (#1210) * Refactor keymappings to match which-key style * Update confif example + remove redundant way of registering mappings --- utils/installer/config.example-no-ts.lua | 21 +++++++-------------- utils/installer/config.example.lua | 21 +++++++-------------- 2 files changed, 14 insertions(+), 28 deletions(-) (limited to 'utils/installer') diff --git a/utils/installer/config.example-no-ts.lua b/utils/installer/config.example-no-ts.lua index c0df5b8b..c74548dc 100644 --- a/utils/installer/config.example-no-ts.lua +++ b/utils/installer/config.example-no-ts.lua @@ -7,23 +7,16 @@ lvim.colorscheme = "spacegray" -- keymappings lvim.leader = "space" --- overwrite the key-mappings provided by LunarVim for any mode, or leave it empty to keep them +-- overwrite/augment the key-mappings provided by LunarVim for any mode, or leave empty to keep the defaults. -- lvim.keys.normal_mode = { --- Page down/up --- {'[d', ''}, --- {']d', ''}, +-- -- Page down/up +-- ["[d"] = { "" }, +-- ["]d"] = { "" }, -- --- Navigate buffers --- {'', ':bnext'}, --- {'', ':bprevious'}, +-- -- Navigate buffers +-- [""] = { ":bnext" }, +-- [""] = { ":bprevious" }, -- } --- if you just want to augment the existing ones then use the utility function --- require("utils").add_keymap_insert_mode({ silent = true }, { --- { "", ":w" }, --- { "", "" }, --- }) --- you can also use the native vim way directly --- vim.api.nvim_set_keymap("i", "", "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 diff --git a/utils/installer/config.example.lua b/utils/installer/config.example.lua index 843917a7..a7a55874 100644 --- a/utils/installer/config.example.lua +++ b/utils/installer/config.example.lua @@ -15,23 +15,16 @@ 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 +-- overwrite/augment the key-mappings provided by LunarVim for any mode, or leave empty to keep the defaults. -- lvim.keys.normal_mode = { --- Page down/up --- {'[d', ''}, --- {']d', ''}, +-- -- Page down/up +-- ["[d"] = { "" }, +-- ["]d"] = { "" }, -- --- Navigate buffers --- {'', ':bnext'}, --- {'', ':bprevious'}, +-- -- Navigate buffers +-- [""] = { ":bnext" }, +-- [""] = { ":bprevious" }, -- } --- if you just want to augment the existing ones then use the utility function --- require("utils").add_keymap_insert_mode({ silent = true }, { --- { "", ":w" }, --- { "", "" }, --- }) --- you can also use the native vim way directly --- vim.api.nvim_set_keymap("i", "", "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 -- cgit v1.2.3 From c2ef6f43e25b419955e0235f5fa1dbf1da161bbc Mon Sep 17 00:00:00 2001 From: rayane866 Date: Mon, 2 Aug 2021 17:04:26 +0100 Subject: [Feature]: Termux Support (#1206) --- utils/installer/install.sh | 28 ++++++++++++++++++++++++++-- utils/installer/uninstall.sh | 10 ++++++++-- 2 files changed, 34 insertions(+), 4 deletions(-) (limited to 'utils/installer') diff --git a/utils/installer/install.sh b/utils/installer/install.sh index d6691a92..72a8cabb 100755 --- a/utils/installer/install.sh +++ b/utils/installer/install.sh @@ -1,6 +1,7 @@ #!/bin/sh #Set Variable to master is not set differently LVBRANCH="${LVBRANCH:-master}" +USER_BIN_DIR="/usr/local/bin" set -o nounset # error when referencing undefined variable set -o errexit # exit when command fails @@ -15,6 +16,10 @@ installnodeubuntu() { sudo apt install npm } +installnodetermux() { + apt install nodejs +} + moveoldlvim() { echo "Not installing LunarVim" echo "Please move your ~/.local/share/lunarvim folder before installing" @@ -49,6 +54,7 @@ installnode() { [ -f "/etc/artix-release" ] && installnodearch [ -f "/etc/fedora-release" ] && installnodefedora [ -f "/etc/gentoo-release" ] && installnodegentoo + [ -d "/data/data/com.termux" ] && installnodetermux [ "$(uname -s | cut -c 1-10)" = "MINGW64_NT" ] && echo "Windows not currently supported" sudo npm i -g neovim } @@ -63,6 +69,10 @@ installpiponubuntu() { sudo apt install python3-pip >/dev/null } +installpipontermux() { + apt install python +} + installpiponarch() { sudo pacman -S python-pip } @@ -82,6 +92,7 @@ installpip() { [ -f "/etc/arch-release" ] && installpiponarch [ -f "/etc/fedora-release" ] && installpiponfedora [ -f "/etc/gentoo-release" ] && installpipongentoo + [ -d "/data/data/com.termux" ] && installpipontermux [ "$(uname -s | cut -c 1-10)" = "MINGW64_NT" ] && echo "Windows not currently supported" } @@ -100,6 +111,12 @@ installpacker() { } cloneconfig() { + if [ -d "/data/data/com.termux" ]; then + sudo() { + eval "$@" + } + USER_BIN_DIR="$HOME/../usr/bin" + fi echo "Cloning LunarVim configuration" mkdir -p ~/.local/share/lunarvim case "$@" in @@ -112,8 +129,8 @@ cloneconfig() { ;; esac mkdir -p "$HOME/.config/lvim" - sudo cp "$HOME/.local/share/lunarvim/lvim/utils/bin/lvim" "/usr/local/bin" - sudo chmod a+rx /usr/local/bin/lvim + sudo cp "$HOME/.local/share/lunarvim/lvim/utils/bin/lvim" "$USER_BIN_DIR" + sudo chmod a+rx "$USER_BIN_DIR"/lvim cp "$HOME/.local/share/lunarvim/lvim/utils/installer/config.example-no-ts.lua" "$HOME/.config/lvim/config.lua" nvim -u ~/.local/share/lunarvim/lvim/init.lua --cmd "set runtimepath+=~/.local/share/lunarvim/lvim" --headless \ @@ -162,6 +179,12 @@ installonubuntu() { npm install -g tree-sitter-cli } +installtermux() { + apt install ripgrep fzf + pip install neovim-remote + npm install -g tree-sitter-cli +} + installonarch() { sudo pacman -S ripgrep fzf pip3 install neovim-remote @@ -185,6 +208,7 @@ installextrapackages() { [ -f "/etc/artix-release" ] && installonarch [ -f "/etc/fedora-release" ] && installonfedora [ -f "/etc/gentoo-release" ] && installongentoo + [ -d "/data/data/com.termux" ] && installtermux [ "$(uname -s | cut -c 1-10)" = "MINGW64_NT" ] && echo "Windows not currently supported" } diff --git a/utils/installer/uninstall.sh b/utils/installer/uninstall.sh index 0615e219..b9a27252 100755 --- a/utils/installer/uninstall.sh +++ b/utils/installer/uninstall.sh @@ -1,5 +1,11 @@ #!/bin/sh - +USER_BIN_DIR="/usr/local/bin" +if [ -d "/data/data/com.termux" ]; then + sudo() { + eval "$@" + } + USER_BIN_DIR="$HOME/../usr/bin" +fi rm -rf ~/.local/share/lunarvim -sudo rm /usr/local/bin/lvim +sudo rm "$USER_BIN_DIR"/lvim rm -rf ~/.local/share/applications/lvim.desktop -- cgit v1.2.3 From 77e283bd9c33166937756250918b12e349caf050 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Mon, 2 Aug 2021 23:42:56 +0200 Subject: [Refactor] Allow editing default keymaps (#1213) --- utils/installer/config.example-no-ts.lua | 30 +++++++++++++---------- utils/installer/config.example.lua | 41 +++++++++++++++----------------- 2 files changed, 37 insertions(+), 34 deletions(-) (limited to 'utils/installer') diff --git a/utils/installer/config.example-no-ts.lua b/utils/installer/config.example-no-ts.lua index c74548dc..4303d264 100644 --- a/utils/installer/config.example-no-ts.lua +++ b/utils/installer/config.example-no-ts.lua @@ -5,17 +5,25 @@ lvim.format_on_save = true lvim.lint_on_save = true lvim.colorscheme = "spacegray" --- keymappings +-- keymappings [view all the defaults by pressing Lk] lvim.leader = "space" --- overwrite/augment the key-mappings provided by LunarVim for any mode, or leave empty to keep the defaults. --- lvim.keys.normal_mode = { --- -- Page down/up --- ["[d"] = { "" }, --- ["]d"] = { "" }, --- --- -- Navigate buffers --- [""] = { ":bnext" }, --- [""] = { ":bprevious" }, +-- add your own keymapping +lvim.keys.normal_mode[""] = ":w" +-- unmap a default keymapping +-- lvim.keys.normal_mode[""] = "" +-- edit a default keymapping +-- lvim.keys.normal_mode[""] = ":q" + +-- Use which-key to add extra bindings with the leader-key prefix +-- lvim.builtin.which_key.mappings["P"] = { "lua require'telescope'.extensions.project.project{}", "Projects" } +-- lvim.builtin.which_key.mappings["t"] = { +-- name = "+Trouble", +-- r = { "Trouble lsp_references", "References" }, +-- f = { "Trouble lsp_definitions", "Definitions" }, +-- d = { "Trouble lsp_document_diagnostics", "Diagnosticss" }, +-- q = { "Trouble quickfix", "QuickFix" }, +-- l = { "Trouble loclist", "LocationList" }, +-- w = { "Trouble lsp_workspace_diagnostics", "Diagnosticss" }, -- } -- TODO: User Config for predefined plugins @@ -69,5 +77,3 @@ lvim.builtin.treesitter.highlight.enabled = true -- lvim.autocommands.custom_groups = { -- { "BufWinEnter", "*.lua", "setlocal ts=8 sw=8" }, -- } - --- Additional Leader bindings for WhichKey diff --git a/utils/installer/config.example.lua b/utils/installer/config.example.lua index a7a55874..90bf6c92 100644 --- a/utils/installer/config.example.lua +++ b/utils/installer/config.example.lua @@ -13,17 +13,26 @@ an executable lvim.format_on_save = true lvim.lint_on_save = true lvim.colorscheme = "spacegray" --- keymappings + +-- keymappings [view all the defaults by pressing Lk] lvim.leader = "space" --- overwrite/augment the key-mappings provided by LunarVim for any mode, or leave empty to keep the defaults. --- lvim.keys.normal_mode = { --- -- Page down/up --- ["[d"] = { "" }, --- ["]d"] = { "" }, --- --- -- Navigate buffers --- [""] = { ":bnext" }, --- [""] = { ":bprevious" }, +-- add your own keymapping +lvim.keys.normal_mode[""] = ":w" +-- unmap a default keymapping +-- lvim.keys.normal_mode[""] = "" +-- edit a default keymapping +-- lvim.keys.normal_mode[""] = ":q" + +-- Use which-key to add extra bindings with the leader-key prefix +-- lvim.builtin.which_key.mappings["P"] = { "lua require'telescope'.extensions.project.project{}", "Projects" } +-- lvim.builtin.which_key.mappings["t"] = { +-- name = "+Trouble", +-- r = { "Trouble lsp_references", "References" }, +-- f = { "Trouble lsp_definitions", "Definitions" }, +-- d = { "Trouble lsp_document_diagnostics", "Diagnosticss" }, +-- q = { "Trouble quickfix", "QuickFix" }, +-- l = { "Trouble loclist", "LocationList" }, +-- w = { "Trouble lsp_workspace_diagnostics", "Diagnosticss" }, -- } -- TODO: User Config for predefined plugins @@ -77,15 +86,3 @@ lvim.builtin.treesitter.highlight.enabled = true -- lvim.autocommands.custom_groups = { -- { "BufWinEnter", "*.lua", "setlocal ts=8 sw=8" }, -- } - --- Additional Leader bindings for WhichKey --- lvim.builtin.which_key.mappings["P"] = { "lua require'telescope'.extensions.project.project{}", "Projects" } --- lvim.builtin.which_key.mappings["t"] = { --- name = "+Trouble", --- r = { "Trouble lsp_references", "References" }, --- f = { "Trouble lsp_definitions", "Definitions" }, --- d = { "Trouble lsp_document_diagnostics", "Diagnosticss" }, --- q = { "Trouble quickfix", "QuickFix" }, --- l = { "Trouble loclist", "LocationList" }, --- w = { "Trouble lsp_workspace_diagnostics", "Diagnosticss" }, --- } -- cgit v1.2.3 From 686e54ab0dfa5ffcac37599e5de7984f1d9e738f Mon Sep 17 00:00:00 2001 From: christianchiarulli Date: Tue, 3 Aug 2021 23:12:05 -0400 Subject: check if git is installed --- utils/installer/install.sh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'utils/installer') diff --git a/utils/installer/install.sh b/utils/installer/install.sh index 72a8cabb..37be7ad5 100755 --- a/utils/installer/install.sh +++ b/utils/installer/install.sh @@ -158,6 +158,11 @@ asktoinstallnode() { [ "$answer" != "${answer#[Yy]}" ] && installnode } +asktoinstallgit() { + echo "git not found, please install git" + exit +} + asktoinstallpip() { # echo "pip not found" # echo -n "Would you like to install pip now (y/n)? " @@ -227,6 +232,9 @@ esac # move old lvim directory if it exists [ -d "$HOME/.local/share/lunarvim" ] && moveoldlvim +# install node and neovim support +(command -v git >/dev/null && echo "git installed, moving on...") || asktoinstallgit + # install pip (command -v pip3 >/dev/null && echo "pip installed, moving on...") || asktoinstallpip -- cgit v1.2.3 From 3bfa31aaa0f4353b474348c262ab17b3caa367e0 Mon Sep 17 00:00:00 2001 From: Abouzar Parvan Date: Wed, 4 Aug 2021 05:32:45 +0000 Subject: fix shfmt issue --- utils/installer/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils/installer') diff --git a/utils/installer/install.sh b/utils/installer/install.sh index 37be7ad5..2488ed51 100755 --- a/utils/installer/install.sh +++ b/utils/installer/install.sh @@ -160,7 +160,7 @@ asktoinstallnode() { asktoinstallgit() { echo "git not found, please install git" - exit + exit } asktoinstallpip() { -- cgit v1.2.3 From 120590b8eca0d94d88272bf7a8db7c8cb7a0f530 Mon Sep 17 00:00:00 2001 From: Abouzar Parvan Date: Wed, 4 Aug 2021 10:05:02 +0430 Subject: shfmt correct fix (#1221) --- utils/installer/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils/installer') diff --git a/utils/installer/install.sh b/utils/installer/install.sh index 2488ed51..b3929409 100755 --- a/utils/installer/install.sh +++ b/utils/installer/install.sh @@ -160,7 +160,7 @@ asktoinstallnode() { asktoinstallgit() { echo "git not found, please install git" - exit + exit } asktoinstallpip() { -- cgit v1.2.3 From 97fa3d9ec9e7d2416ed2d169eea757096db4581b Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 4 Aug 2021 15:20:09 -0400 Subject: update for lunarvim org --- utils/installer/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils/installer') diff --git a/utils/installer/install.sh b/utils/installer/install.sh index b3929409..25b67f12 100755 --- a/utils/installer/install.sh +++ b/utils/installer/install.sh @@ -125,7 +125,7 @@ cloneconfig() { cp -r "$(pwd)" ~/.local/share/lunarvim/lvim ;; *) - git clone --branch "$LVBRANCH" https://github.com/ChristianChiarulli/lunarvim.git ~/.local/share/lunarvim/lvim + git clone --branch "$LVBRANCH" https://github.com/lunarvim/lunarvim.git ~/.local/share/lunarvim/lvim ;; esac mkdir -p "$HOME/.config/lvim" -- cgit v1.2.3 From f3c44ce3a91b0abc448071d152e0781c4c1465e7 Mon Sep 17 00:00:00 2001 From: grvxs Date: Fri, 6 Aug 2021 16:49:52 +0530 Subject: fix: typo in install_stylua.sh --- utils/installer/install_stylua.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'utils/installer') diff --git a/utils/installer/install_stylua.sh b/utils/installer/install_stylua.sh index cd8b3942..2a33de7e 100755 --- a/utils/installer/install_stylua.sh +++ b/utils/installer/install_stylua.sh @@ -30,7 +30,7 @@ function download_stylua() { exit 1 fi - echo "Installtion in progress.." + echo "Installation in progress.." unzip -q "$DOWNLOAD_DIR/$FILENAME.zip" -d "$DOWNLOAD_DIR" if [ -f "$DOWNLOAD_DIR/stylua" ]; then @@ -43,7 +43,7 @@ function download_stylua() { } function verify_install() { - echo "Verifying installtion.." + echo "Verifying installation.." local DOWNLOADED_VER DOWNLOADED_VER="$("$INSTALL_DIR/stylua" -V | awk '{ print $2 }')" if [ "$DOWNLOADED_VER" != "$RELEASE" ]; then -- cgit v1.2.3 From 405423108fc31981c40116a827e845a1179c9053 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Mon, 9 Aug 2021 19:02:37 +0200 Subject: feat: Add an async logger using plenary (#1207) Co-authored-by: rebuilt --- utils/installer/config.example.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils/installer') diff --git a/utils/installer/config.example.lua b/utils/installer/config.example.lua index 90bf6c92..0aee0275 100644 --- a/utils/installer/config.example.lua +++ b/utils/installer/config.example.lua @@ -9,7 +9,7 @@ an executable -- THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT -- general - +lvim.log.level = "warn" lvim.format_on_save = true lvim.lint_on_save = true lvim.colorscheme = "spacegray" -- cgit v1.2.3