From 94699474c771e40396d0a86771ab3622836fa8db Mon Sep 17 00:00:00 2001 From: gwbeip Date: Sat, 30 May 2026 15:01:30 +0800 Subject: [PATCH] refactor: simplify startup profiles and ignore local tooling configs --- .gitignore | 20 ++- .neoconf.json | 15 --- README.md | 98 +++++++++----- init.lua | 34 +++-- lua/baremetal/flash.lua | 17 --- lua/baremetal/gitsigns.lua | 59 -------- lua/baremetal/lualine.lua | 83 ------------ lua/baremetal/nvim-surround.lua | 12 -- lua/baremetal/nvim-tree.lua | 11 -- lua/baremetal/nvim-window.lua | 9 -- lua/baremetal/treesitter.lua | 115 ---------------- lua/baremetal/wichkey.lua | 91 ------------- lua/config/autocmds.lua | 8 -- lua/config/keymaps.lua | 3 - lua/config/lazybaremetal.lua | 74 ---------- lua/config/lazynvimide.lua | 53 -------- lua/config/lazyvscode.lua | 217 ------------------------------ lua/config/options.lua | 16 --- lua/lazyvim/dashboard.lua | 35 ----- lua/lazyvim/example.lua | 197 --------------------------- lua/lazyvim/flash.lua | 26 ---- lua/lazyvim/nvim-surround.lua | 12 -- lua/lazyvim/nvim-window.lua | 9 -- lua/lazyvim/tree.lua | 14 -- lua/plugins/native/git.lua | 52 +++++++ lua/plugins/native/statusline.lua | 11 ++ lua/plugins/native/tree.lua | 7 + lua/plugins/native/treesitter.lua | 102 ++++++++++++++ lua/plugins/native/which_key.lua | 36 +++++ lua/plugins/native/window.lua | 9 ++ lua/plugins/pack.lua | 27 ++++ lua/plugins/vscode/actions.lua | 136 +++++++++++++++++++ lua/profiles/native.lua | 77 +++++++++++ lua/profiles/vscode.lua | 49 +++++++ lua/vscodeplugins/vscode.lua | 33 ----- stylua.toml | 3 - 36 files changed, 604 insertions(+), 1166 deletions(-) delete mode 100644 .neoconf.json delete mode 100644 lua/baremetal/flash.lua delete mode 100644 lua/baremetal/gitsigns.lua delete mode 100644 lua/baremetal/lualine.lua delete mode 100644 lua/baremetal/nvim-surround.lua delete mode 100644 lua/baremetal/nvim-tree.lua delete mode 100644 lua/baremetal/nvim-window.lua delete mode 100644 lua/baremetal/treesitter.lua delete mode 100644 lua/baremetal/wichkey.lua delete mode 100644 lua/config/autocmds.lua delete mode 100644 lua/config/keymaps.lua delete mode 100644 lua/config/lazybaremetal.lua delete mode 100644 lua/config/lazynvimide.lua delete mode 100644 lua/config/lazyvscode.lua delete mode 100644 lua/config/options.lua delete mode 100644 lua/lazyvim/dashboard.lua delete mode 100644 lua/lazyvim/example.lua delete mode 100644 lua/lazyvim/flash.lua delete mode 100644 lua/lazyvim/nvim-surround.lua delete mode 100644 lua/lazyvim/nvim-window.lua delete mode 100644 lua/lazyvim/tree.lua create mode 100644 lua/plugins/native/git.lua create mode 100644 lua/plugins/native/statusline.lua create mode 100644 lua/plugins/native/tree.lua create mode 100644 lua/plugins/native/treesitter.lua create mode 100644 lua/plugins/native/which_key.lua create mode 100644 lua/plugins/native/window.lua create mode 100644 lua/plugins/pack.lua create mode 100644 lua/plugins/vscode/actions.lua create mode 100644 lua/profiles/native.lua create mode 100644 lua/profiles/vscode.lua delete mode 100644 lua/vscodeplugins/vscode.lua delete mode 100644 stylua.toml diff --git a/.gitignore b/.gitignore index 1524cea..3936f3d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,18 @@ .vscode/ -lazy-lock.json -lazyvim.json -baremetal \ No newline at end of file +nvim-pack-lock.json + +# Local formatter configuration (not tracked) +stylua.toml +.stylua.toml + +# Local Neovim tooling configuration (not tracked) +.neoconf.json + +# Neovim/Editor temporary files +*.swp +*.swo +*~ + +# OS metadata +.DS_Store +Thumbs.db \ No newline at end of file diff --git a/.neoconf.json b/.neoconf.json deleted file mode 100644 index 7c48087..0000000 --- a/.neoconf.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "neodev": { - "library": { - "enabled": true, - "plugins": true - } - }, - "neoconf": { - "plugins": { - "lua_ls": { - "enabled": true - } - } - } -} diff --git a/README.md b/README.md index 9ab0236..e85ffd7 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,68 @@ # NvimConfig -## Configuration for VSCode-Neovim -### `` + -|L1 |L2 |L3 |Function | -|--- |--- |--- |--- | -|s (search) |s |- | Search Symbols with VSCode Ctrl-P@ | -|s |b |- | Search Breadcrumbs | -|s |e |- | Search Editors Cross-Groups | -|`` |e |- | Toggle Editor Inside Group | -|`` |E |- | Toggle Editor Cross-Groups | -|`` |g |- | Toggle Groups | -|`` |z |- | Toggle Zen Mode | -|`` |/ |- | Toggle Flash.nvim Search | -|b (side bar) |e |- | Open Sidebar Explorer | -|b |s |- | Open Sidebar Search | -|c (code) |f |- | Format Code | -|c |t |- | Flash.nvim Treesitter | -|e (editor) |d |- | Close Editor | -|e |g |- | Search Editor Cross-Groups | -|e |i |- | Search Editor Inside Group | -|e |h |- | Navigate Editors in Group: Previous | -|e |l |- | Navigate Editors in Group: Next | -|e |m |n | Move Editor to Next Group | -|e |m |p | Move Editor to Previous Group | -|g (group) |= |- | Equal Groups Sizes | -|g |d |- | Close Group but Remain Editors | -|g |D |- | Close Group and Editors | -|g |s |- | Split Group Horizontally | -|g |v |- | Split Group Vertically | -|s (search) |f |- | Search Files with VSCode Ctrl-P | -|s |s |- | Search Symbols with VSCode Ctrl-P@ | -|s |b |- | Search Breadcrumbs | -|s |e |- | Search Editors Cross-Groups | +This is a Neovim 0.12+ configuration with no dependency on lazy.nvim or LazyVim. + +## Layout + +```text +init.lua +lua/ + profiles/ + native.lua + vscode.lua + plugins/ + pack.lua + native/ + vscode/ +``` + +## Startup Flow + +- `init.lua` is the only entrypoint. +- If started from VSCode (`vim.g.vscode`), it loads `profiles.vscode`. +- Otherwise it loads `profiles.native`. + +## Plugin Management + +This config uses Neovim built-in `vim.pack` through `lua/plugins/pack.lua`. + +- Plugin declarations live in `lua/profiles/*.lua`. +- Run `:lua vim.pack.update()` to update plugins. +- `nvim-pack-lock.json` is intentionally not tracked. + +## Style Formatting + +Lua formatting is configured in `.stylua.toml`. +This file is for formatting only; runtime/editor options stay in Lua code. + +## VSCode Keybindings + +### `` + + +| L1 | L2 | L3 | Function | +| --- | --- | --- | --- | +| `` | `e` | - | Toggle Editor Inside Group | +| `` | `E` | - | Toggle Editor Cross Groups | +| `` | `g` | - | Focus Next Group | +| `` | `z` | - | Toggle Zen Mode | +| `` | `/` | - | Toggle Flash Search | +| `b` | `e` | - | Open Sidebar Explorer | +| `b` | `s` | - | Open Sidebar Search | +| `c` | `f` | - | Format Code | +| `c` | `t` | - | Flash Treesitter | +| `e` | `d` | - | Close Editor | +| `e` | `g` | - | Search Editor Cross Groups | +| `e` | `i` | - | Search Editor Inside Group | +| `e` | `h` | - | Previous Editor In Group | +| `e` | `l` | - | Next Editor In Group | +| `e` | `m` | `n` | Move Editor To Next Group | +| `e` | `m` | `p` | Move Editor To Previous Group | +| `g` | `=` | - | Equal Group Size | +| `g` | `d` | - | Close Group, Keep Editors | +| `g` | `D` | - | Close Group And Editors | +| `g` | `s` | - | Split Group Horizontally | +| `g` | `v` | - | Split Group Vertically | +| `s` | `f` | - | Search Files | +| `s` | `s` | - | Search Symbols | +| `s` | `b` | - | Search Breadcrumbs | +| `s` | `e` | - | Search Editors Cross Groups | diff --git a/init.lua b/init.lua index 536b1f7..9a0b9bf 100644 --- a/init.lua +++ b/init.lua @@ -1,23 +1,19 @@ --- bootstrap lazy.nvim, LazyVim and your plugins +vim.g.mapleader = " " +vim.g.maplocalleader = "\\" + +vim.opt.clipboard = "unnamedplus" +vim.opt.incsearch = true +vim.opt.hlsearch = true +vim.opt.ignorecase = true +vim.opt.smartcase = true + +vim.opt.tabstop = 4 +vim.opt.softtabstop = 4 +vim.opt.shiftwidth = 4 +vim.opt.expandtab = true if vim.g.vscode then - require('config.lazyvscode') + require("profiles.vscode").setup() else - local info = debug.getinfo(1, "S") - local path_info = info.source:sub(2) - local path - if vim.loop.os_uname().sysname == "Windows_NT" then - -- Windows platform (backslashes or forward slashes) - path = path_info:match("(.*[/\\])") - else - -- Linux/macOS platform (forward slashes only) - path = path_info:match("(.*/)") - end - local file, err = io.open(string.format("%s%s", path, "/baremetal"), "r") - if file then - file:close() - require("config.lazybaremetal") - else - require("config.lazynvimide") - end + require("profiles.native").setup() end diff --git a/lua/baremetal/flash.lua b/lua/baremetal/flash.lua deleted file mode 100644 index 3c24863..0000000 --- a/lua/baremetal/flash.lua +++ /dev/null @@ -1,17 +0,0 @@ -return{ - { - "folke/flash.nvim", - event = "VeryLazy", - ---@type Flash.Config - opts = {}, - modes = {search = {enabled = true}}, - -- stylua: ignore - keys = { - { "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" }, - { "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" }, - -- { "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" }, - -- { "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" }, - -- { "", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" }, - }, - } -} diff --git a/lua/baremetal/gitsigns.lua b/lua/baremetal/gitsigns.lua deleted file mode 100644 index a2289de..0000000 --- a/lua/baremetal/gitsigns.lua +++ /dev/null @@ -1,59 +0,0 @@ -return { - { - "lewis6991/gitsigns.nvim", - event = { "BufReadPre", "BufNewFile" }, - opts = { - signs = { - add = { text = '┃' }, - change = { text = '┃' }, - delete = { text = '_' }, - topdelete = { text = '‾' }, - changedelete = { text = '~' }, - untracked = { text = '┆' }, - }, - signs_staged = { - add = { text = '┃' }, - change = { text = '┃' }, - delete = { text = '_' }, - topdelete = { text = '‾' }, - changedelete = { text = '~' }, - untracked = { text = '┆' }, - }, - signs_staged_enable = true, - signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` - numhl = false, -- Toggle with `:Gitsigns toggle_numhl` - linehl = false, -- Toggle with `:Gitsigns toggle_linehl` - word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` - watch_gitdir = { - follow_files = true - }, - auto_attach = true, - attach_to_untracked = false, - current_line_blame = true, -- Toggle with `:Gitsigns toggle_current_line_blame` - current_line_blame_opts = { - virt_text = true, - virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' - delay = 1000, - ignore_whitespace = false, - virt_text_priority = 100, - use_focus = true, - }, - current_line_blame_formatter = ', - ', - sign_priority = 6, - update_debounce = 100, - status_formatter = nil, -- Use default - max_file_length = 40000, -- Disable if file is longer than this (in lines) - preview_config = { - -- Options passed to nvim_open_win - border = 'single', - style = 'minimal', - relative = 'cursor', - row = 0, - col = 1 - }, - }, - config = function(_, opts) - require('gitsigns').setup(opts) - end - } -} diff --git a/lua/baremetal/lualine.lua b/lua/baremetal/lualine.lua deleted file mode 100644 index 366f840..0000000 --- a/lua/baremetal/lualine.lua +++ /dev/null @@ -1,83 +0,0 @@ -return { - { - 'nvim-lualine/lualine.nvim', - dependencies = { 'nvim-tree/nvim-web-devicons' }, - opts = { - options = { - theme = "auto", - }, - -- sections = { - -- lualine_c = { - -- -- 显示当前窗口编号(格式:[窗口号] 文件名) - -- function() - -- return "[" .. tostring(vim.api.nvim_win_get_number(0)) .. "] " .. vim.fn.expand("%:t") - -- end, - -- }, - -- }, - } - } -} - --- local colors = { --- blue = '#80a0ff', --- cyan = '#79dac8', --- black = '#080808', --- white = '#c6c6c6', --- red = '#ff5189', --- violet = '#d183e8', --- grey = '#303030', --- } - --- local bubbles_theme = { --- normal = { --- a = { fg = colors.black, bg = colors.violet }, --- b = { fg = colors.white, bg = colors.grey }, --- c = { fg = colors.white }, --- }, - --- insert = { a = { fg = colors.black, bg = colors.blue } }, --- visual = { a = { fg = colors.black, bg = colors.cyan } }, --- replace = { a = { fg = colors.black, bg = colors.red } }, - --- inactive = { --- a = { fg = colors.white, bg = colors.black }, --- b = { fg = colors.white, bg = colors.black }, --- c = { fg = colors.white }, --- }, --- } - --- return { --- { --- 'nvim-lualine/lualine.nvim', --- dependencies = { 'nvim-tree/nvim-web-devicons' }, --- opts = { --- options = { --- theme = bubbles_theme, --- component_separators = '', --- section_separators = { left = '', right = '' }, --- }, --- }, --- sections = { --- lualine_a = { { 'mode', separator = { left = '' }, right_padding = 2 } }, --- lualine_b = { 'filename', 'branch' }, --- lualine_c = { --- '%=', --[[ add your center components here in place of this comment ]] --- }, --- lualine_x = {}, --- lualine_y = { 'filetype', 'progress' }, --- lualine_z = { --- { 'location', separator = { right = '' }, left_padding = 2 }, --- }, --- }, --- inactive_sections = { --- lualine_a = { 'filename' }, --- lualine_b = {}, --- lualine_c = {}, --- lualine_x = {}, --- lualine_y = {}, --- lualine_z = { 'location' }, --- }, --- tabline = {}, --- extensions = {}, --- } --- } diff --git a/lua/baremetal/nvim-surround.lua b/lua/baremetal/nvim-surround.lua deleted file mode 100644 index 95c49ab..0000000 --- a/lua/baremetal/nvim-surround.lua +++ /dev/null @@ -1,12 +0,0 @@ -return{ - { - "kylechui/nvim-surround", - version = "^3.0.0", -- Use for stability; omit to use `main` branch for the latest features - event = "VeryLazy", - config = function() - require("nvim-surround").setup({ - -- Configuration here, or leave empty to use defaults - }) - end - } -} diff --git a/lua/baremetal/nvim-tree.lua b/lua/baremetal/nvim-tree.lua deleted file mode 100644 index 2918733..0000000 --- a/lua/baremetal/nvim-tree.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - "nvim-tree/nvim-tree.lua", - version = "*", - lazy = false, - dependencies = { - "nvim-tree/nvim-web-devicons", - }, - config = function() - require("nvim-tree").setup {} - end, - } \ No newline at end of file diff --git a/lua/baremetal/nvim-window.lua b/lua/baremetal/nvim-window.lua deleted file mode 100644 index 0032cd9..0000000 --- a/lua/baremetal/nvim-window.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - { - "yorickpeterse/nvim-window", - keys = { - { "w", "lua require('nvim-window').pick()", desc = "nvim-window: Jump to window" }, - }, - config = true, - } -} diff --git a/lua/baremetal/treesitter.lua b/lua/baremetal/treesitter.lua deleted file mode 100644 index 25f3434..0000000 --- a/lua/baremetal/treesitter.lua +++ /dev/null @@ -1,115 +0,0 @@ -return { - { - "nvim-treesitter/nvim-treesitter", - version = false, -- last release is way too old and doesn't work on Windows - build = ":TSUpdate", - event = { "VeryLazy" }, - lazy = vim.fn.argc(-1) == 0, -- load treesitter early when opening a file from the cmdline - init = function(plugin) - -- PERF: add nvim-treesitter queries to the rtp and it's custom query predicates early - -- This is needed because a bunch of plugins no longer `require("nvim-treesitter")`, which - -- no longer trigger the **nvim-treesitter** module to be loaded in time. - -- Luckily, the only things that those plugins need are the custom queries, which we make available - -- during startup. - require("lazy.core.loader").add_to_rtp(plugin) - require("nvim-treesitter.query_predicates") - end, - cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" }, - keys = { - { "", desc = "Increment Selection" }, - { "", desc = "Decrement Selection", mode = "x" }, - }, - opts_extend = { "ensure_installed" }, - ---@type TSConfig - ---@diagnostic disable-next-line: missing-fields - opts = { - highlight = { enable = true }, - indent = { enable = true }, - ensure_installed = { - "bash", - "c", - "diff", - "html", - "javascript", - "jsdoc", - "json", - "jsonc", - "lua", - "luadoc", - "luap", - "markdown", - "markdown_inline", - "printf", - "python", - "query", - "regex", - "toml", - "tsx", - "typescript", - "vim", - "vimdoc", - "xml", - "yaml", - }, - incremental_selection = { - enable = true, - keymaps = { - init_selection = "", - node_incremental = "", - scope_incremental = false, - node_decremental = "", - }, - }, - textobjects = { - move = { - enable = true, - goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer", ["]a"] = "@parameter.inner" }, - goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer", ["]A"] = "@parameter.inner" }, - goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer", ["[a"] = "@parameter.inner" }, - goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer", ["[A"] = "@parameter.inner" }, - }, - }, - }, - -- ---@param opts TSConfig - -- config = function(_, opts) - -- if type(opts.ensure_installed) == "table" then - -- opts.ensure_installed = LazyVim.dedup(opts.ensure_installed) - -- end - -- require("nvim-treesitter.configs").setup(opts) - -- end, - }, - - { - "nvim-treesitter/nvim-treesitter-textobjects", - event = "VeryLazy", - enabled = true, - config = function() - -- If treesitter is already loaded, we need to run config again for textobjects - -- if LazyVim.is_loaded("nvim-treesitter") then - -- local opts = leLazyVim.opts("nvim-treesitter") - -- require("nvim-treesitter.configs").setup({ textobjects = opts.textobjects }) - -- end - - -- When in diff mode, we want to use the default - -- vim text objects c & C instead of the treesitter ones. - local move = require("nvim-treesitter.textobjects.move") ---@type table - local configs = require("nvim-treesitter.configs") - for name, fn in pairs(move) do - if name:find("goto") == 1 then - move[name] = function(q, ...) - if vim.wo.diff then - local config = configs.get_module("textobjects.move")[name] ---@type table - for key, query in pairs(config or {}) do - if q == query and key:find("[%]%[][cC]") then - vim.cmd("normal! " .. key) - return - end - end - end - return fn(q, ...) - end - end - end - end, - }, -} diff --git a/lua/baremetal/wichkey.lua b/lua/baremetal/wichkey.lua deleted file mode 100644 index f65d844..0000000 --- a/lua/baremetal/wichkey.lua +++ /dev/null @@ -1,91 +0,0 @@ -return { - -- { - -- "folke/which-key.nvim", - -- event = "VeryLazy", - -- opts = { - -- -- your configuration comes here - -- -- or leave it empty to use the default settings - -- -- refer to the configuration section below - -- }, - -- keys = { - -- { - -- "?", - -- function() - -- require("which-key").show({ global = false }) - -- end, - -- desc = "Buffer Local Keymaps (which-key)", - -- }, - -- }, - -- }, - { - "folke/which-key.nvim", - event = "VeryLazy", - opts_extend = { "spec" }, - opts = { - preset = "helix", - defaults = {}, - spec = { - { - mode = { "n", "v" }, - -- { "", group = "tabs" }, - { "c", group = "code" }, - -- { "d", group = "debug" }, - -- { "dp", group = "profiler" }, - { "f", group = "file/find" }, - { "g", group = "git" }, - -- { "gh", group = "hunks" }, - { "q", group = "quit/session" }, - { "s", group = "search" }, - { "u", group = "ui", icon = { icon = "󰙵 ", color = "cyan" } }, - { "x", group = "diagnostics/quickfix", icon = { icon = "󱖫 ", color = "green" } }, - { "[", group = "prev" }, - { "]", group = "next" }, - { "g", group = "goto" }, - { "gs", group = "surround" }, - { "z", group = "fold" }, - { - "b", - group = "buffer", - expand = function() - return require("which-key.extras").expand.buf() - end, - }, - -- { - -- "w", - -- group = "windows", - -- proxy = "", - -- expand = function() - -- return require("which-key.extras").expand.win() - -- end, - -- }, - -- better descriptions - { "gx", desc = "Open with system app" }, - }, - }, - }, - keys = { - { - "?", - function() - require("which-key").show({ global = false }) - end, - desc = "Buffer Keymaps (which-key)", - }, - { - "", - function() - require("which-key").show({ keys = "", loop = true }) - end, - desc = "Window Hydra Mode (which-key)", - }, - }, - config = function(_, opts) - local wk = require("which-key") - wk.setup(opts) - if not vim.tbl_isempty(opts.defaults) then - -- LazyVim.warn("which-key: opts.defaults is deprecated. Please use opts.spec instead.") - wk.register(opts.defaults) - end - end, - }, -} diff --git a/lua/config/autocmds.lua b/lua/config/autocmds.lua deleted file mode 100644 index 4221e75..0000000 --- a/lua/config/autocmds.lua +++ /dev/null @@ -1,8 +0,0 @@ --- Autocmds are automatically loaded on the VeryLazy event --- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua --- --- Add any additional autocmds here --- with `vim.api.nvim_create_autocmd` --- --- Or remove existing autocmds by their group name (which is prefixed with `lazyvim_` for the defaults) --- e.g. vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell") diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua deleted file mode 100644 index 2c134f7..0000000 --- a/lua/config/keymaps.lua +++ /dev/null @@ -1,3 +0,0 @@ --- Keymaps are automatically loaded on the VeryLazy event --- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua --- Add any additional keymaps here diff --git a/lua/config/lazybaremetal.lua b/lua/config/lazybaremetal.lua deleted file mode 100644 index 0e4357c..0000000 --- a/lua/config/lazybaremetal.lua +++ /dev/null @@ -1,74 +0,0 @@ -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end -end -vim.opt.rtp:prepend(lazypath) - --- 1.options --- Hint: use `:h