diff --git a/bootstrap.sh b/bootstrap.sh index e6de0bf..660e4e0 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -89,7 +89,7 @@ install_dependencies() { fi apt_get update - apt_get install -y fzf fd-find ripgrep lua5.1 bat + apt_get install -y neovim fzf fd-find ripgrep lua5.1 bat ;; "macos") if ! command -v brew >/dev/null 2>&1; then @@ -97,7 +97,7 @@ install_dependencies() { exit 1 fi - brew install fzf fd ripgrep lua bat + brew install neovim fzf fd ripgrep lua bat ;; *) echo "error: dependency installation is only supported on Ubuntu and macOS" @@ -106,6 +106,15 @@ install_dependencies() { esac } +bootstrap_neovim() { + if ! command -v nvim >/dev/null 2>&1; then + echo "warning: nvim not found, skipping Neovim bootstrap" + return + fi + + nvim --headless "+qa" +} + bootstrap_dotfiles() { ensure_dir "$CONF" @@ -154,6 +163,7 @@ case "$COMMAND" in "bootstrap") install_dependencies bootstrap_dotfiles + bootstrap_neovim echo "bootstrap completed" ;; "deps"|"install-deps") diff --git a/vim/my.nvim/lazy-lock.json b/vim/my.nvim/lazy-lock.json index 51bd352..774a057 100644 --- a/vim/my.nvim/lazy-lock.json +++ b/vim/my.nvim/lazy-lock.json @@ -23,7 +23,6 @@ "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, "lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, - "mynvim": { "branch": "master", "commit": "a2539d211f0f41a4301220d2b95de9360ba5ab47" }, "nerdcommenter": { "branch": "master", "commit": "02a3b6455fa07b61b9440a78732f1e9b7876c991" }, "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, "nvim-coverage": { "branch": "main", "commit": "a939e425e363319d952a6c35fb3f38b34041ded2" }, diff --git a/vim/my.nvim/lua/setup.lua b/vim/my.nvim/lua/setup.lua index 212fc9e..93bcb6a 100644 --- a/vim/my.nvim/lua/setup.lua +++ b/vim/my.nvim/lua/setup.lua @@ -100,7 +100,6 @@ local function ensure_plugins(dir) "patstockwell/vim-monokai-tasty", "unblevable/quick-scope", {[1] = "beardnick/vim-bookmarks", branch = "feature-relative-path"}, - {[1] = "beardnick/mynvim", build = "make"}, "tpope/vim-fugitive", "ilyachur/cmake4vim", "ojroques/nvim-osc52", diff --git a/vim/my.nvim/ui/banner.lua b/vim/my.nvim/ui/banner.lua index 394dfdb..b6f3198 100644 --- a/vim/my.nvim/ui/banner.lua +++ b/vim/my.nvim/ui/banner.lua @@ -1,5 +1,8 @@ vim.g.startify_padding_left = 10 -if vim.fn.exists("*startify#pad") == 1 then - vim.g.startify_custom_header = vim.fn["startify#pad"](vim.g.mynvim_banner) +if type(vim.g.mynvim_banner) == "table" then + local padding = string.rep(" ", vim.g.startify_padding_left or 0) + vim.g.startify_custom_header = vim.tbl_map(function(line) + return padding .. line + end, vim.g.mynvim_banner) end