mirror of
https://github.com/harivansh-afk/nvim.git
synced 2026-04-15 07:04:47 +00:00
installation wiz
This commit is contained in:
parent
2cfd4358fb
commit
9666bfb715
3 changed files with 43 additions and 7 deletions
19
README.md
19
README.md
|
|
@ -1,5 +1,24 @@
|
||||||
# nvim
|
# nvim
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
**Minimal (default)** - lightweight, no LSP, no AI completion:
|
||||||
|
```bash
|
||||||
|
curl -fsSL https://raw.githubusercontent.com/harivansh-afk/nvim/main/install.sh | bash
|
||||||
|
```
|
||||||
|
|
||||||
|
**Full install** - includes LSP + supermaven AI completion:
|
||||||
|
```bash
|
||||||
|
curl -fsSL https://raw.githubusercontent.com/harivansh-afk/nvim/main/install.sh | bash -s -- --bells-and-whistles
|
||||||
|
```
|
||||||
|
|
||||||
|
Other options:
|
||||||
|
```bash
|
||||||
|
--skip-nvim # Config only (skip nvim install)
|
||||||
|
--skip-config # Nvim only (skip config install)
|
||||||
|
--no-path # Don't modify shell rc files
|
||||||
|
```
|
||||||
|
|
||||||
## Repo tree
|
## Repo tree
|
||||||
|
|
||||||
```text
|
```text
|
||||||
|
|
|
||||||
3
init.lua
3
init.lua
|
|
@ -51,9 +51,6 @@ vim.opt.ruler = false -- Disable native ruler (NvChad statusline shows position
|
||||||
vim.opt.cmdheight = 0 -- Hide command line when not in use
|
vim.opt.cmdheight = 0 -- Hide command line when not in use
|
||||||
vim.opt.laststatus = 3 -- Global statusline at the very bottom
|
vim.opt.laststatus = 3 -- Global statusline at the very bottom
|
||||||
|
|
||||||
-- Enable cursor blinking
|
|
||||||
vim.opt.guicursor = "n-v-c:block-blinkwait700-blinkoff400-blinkon250,i-ci-ve:ver25-blinkwait700-blinkoff400-blinkon250,r-cr:hor20-blinkwait700-blinkoff400-blinkon250"
|
|
||||||
|
|
||||||
-- Keymaps
|
-- Keymaps
|
||||||
vim.keymap.set("n", "<leader>q", ":q<CR>", { desc = "Quit" })
|
vim.keymap.set("n", "<leader>q", ":q<CR>", { desc = "Quit" })
|
||||||
|
|
||||||
|
|
|
||||||
20
install.sh
20
install.sh
|
|
@ -22,6 +22,7 @@ REPO_URL="https://github.com/harivansh-afk/nvim.git"
|
||||||
SKIP_NVIM=0
|
SKIP_NVIM=0
|
||||||
SKIP_CONFIG=0
|
SKIP_CONFIG=0
|
||||||
NO_PATH=0
|
NO_PATH=0
|
||||||
|
FULL_INSTALL=0
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
|
@ -33,6 +34,7 @@ while [[ $# -gt 0 ]]; do
|
||||||
--skip-nvim) SKIP_NVIM=1; shift ;;
|
--skip-nvim) SKIP_NVIM=1; shift ;;
|
||||||
--skip-config) SKIP_CONFIG=1; shift ;;
|
--skip-config) SKIP_CONFIG=1; shift ;;
|
||||||
--no-path) NO_PATH=1; shift ;;
|
--no-path) NO_PATH=1; shift ;;
|
||||||
|
--bells-and-whistles) FULL_INSTALL=1; shift ;;
|
||||||
-h|--help)
|
-h|--help)
|
||||||
cat <<'EOF'
|
cat <<'EOF'
|
||||||
Usage: install.sh [options]
|
Usage: install.sh [options]
|
||||||
|
|
@ -42,6 +44,7 @@ Options:
|
||||||
--skip-nvim Do not install Neovim
|
--skip-nvim Do not install Neovim
|
||||||
--skip-config Do not install config
|
--skip-config Do not install config
|
||||||
--no-path Do not modify shell rc files
|
--no-path Do not modify shell rc files
|
||||||
|
--bells-and-whistles Full install with LSP and AI completion (default: minimal)
|
||||||
EOF
|
EOF
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
|
@ -224,6 +227,20 @@ install_config() {
|
||||||
mkdir -p "${CONFIG_DIR}/undodir"
|
mkdir -p "${CONFIG_DIR}/undodir"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
strip_heavy_plugins() {
|
||||||
|
local plugins_dir="${CONFIG_DIR}/lua/plugins"
|
||||||
|
local heavy_plugins=(
|
||||||
|
"supermaven.lua"
|
||||||
|
"lsp.lua"
|
||||||
|
)
|
||||||
|
for plugin in "${heavy_plugins[@]}"; do
|
||||||
|
if [[ -f "${plugins_dir}/${plugin}" ]]; then
|
||||||
|
rm "${plugins_dir}/${plugin}"
|
||||||
|
log "Removed ${plugin} (minimal install)"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
log "Installing nvim config from ${REPO_URL} (${OS}/${ARCH})"
|
log "Installing nvim config from ${REPO_URL} (${OS}/${ARCH})"
|
||||||
ensure_local_bin_path
|
ensure_local_bin_path
|
||||||
|
|
||||||
|
|
@ -233,6 +250,9 @@ fi
|
||||||
|
|
||||||
if [[ "$SKIP_CONFIG" -eq 0 ]]; then
|
if [[ "$SKIP_CONFIG" -eq 0 ]]; then
|
||||||
install_config
|
install_config
|
||||||
|
if [[ "$FULL_INSTALL" -eq 0 ]]; then
|
||||||
|
strip_heavy_plugins
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if have nvim; then
|
if have nvim; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue