diff --git a/README.md b/README.md index 11a3077..cd1475b 100644 --- a/README.md +++ b/README.md @@ -4,61 +4,6 @@ A pre-configured, performance-oriented Neovim setup designed to get you from zero to coding in minutes. Built for local developers who want a powerful IDE experience without the manual overhead of a 500-line `init.lua`. -## Get Started - -### Prerequisites -To ensure all plugins (LSP, Tree-sitter, and Telescope) function correctly, please install the following: - -* **Neovim** (v0.10+ recommended) -* **Git** (For cloning the repo and managing plugins) -* **Tree-sitter-cli** (For syntax highlighting) -* **Ripgrep** (Required for Telescope live grep) -* **Yazi** (Required for file expolorer) -* **Node & NPM** (Required for various LSP servers like `html` and `eslint`) -* **Go** (Required for certain internal tools) - -For the best results, we recommend you install and use the Ghostty terminal with the following configuration: - -```Ini, TOML -theme = Adwaita Dark -font-size = 18 -background-opacity = 0.85 -background-blur-radius = 20 -``` - -### Installation - -#### 1. Prepare Configuration Directory -Depending on whether you have an existing setup, follow the appropriate step below: - -**For a Fresh Install:** -If you have never configured Neovim, create the configuration folder: -```bash -mkdir ~/.config/nvim -``` - -**For an Existing Setup:** -If you have configured Neovim already, create a backup folder: -```bash -mv ~/.config/nvim ~/.config/nvim.bak -mkdir ~/.config/nvim -``` - -#### 2. Clone the Repository -Clone the Mzansi Vim configuration into your config folder: - -```bash -cd ~/.config/nvim -git clone https://git.mzansi-innovation-hub.co.za/yaso_meth/mzansi_vim.git . -``` - -#### 3. Initialize -Simply launch Neovim: - -```bash -nvim -``` - ## Key Features * **LSP & Auto-completion:** Powered by `mason.nvim` and `nvim-cmp`, featuring out-of-the-box support for Python, Lua, Docker, SQL, and more. @@ -171,12 +116,6 @@ The **Leader Key** is set to `Space`. | **List Devices** | `:FDevices` | Show a list of available physical/virtual devices. | | **Toggle Logs** | `:FLogs` | Open or close the Flutter Dev Log split. | | **Clear Logs** | `:FLogsClear` | Clear the current Flutter Dev Log buffer. | -| **Clean Project** | `:FClean` | Execute flutter clean in split terminal. | -| **Pub Get** | `:FPubGet` | Fetches project dependencies. | -| **Start DevTools** | `:FDevToolsStart` | Start the local Flutter DevTools server | -| **Open DevTools** | `:FDevToolsOpen` | Open Flutter DevTools in your default browser. | -| **Build Runner** | `:FBuild` | Execute dart run build_runner build in split terminal. | -| **Watch Runner** | `:FWatch` | Execute dart run build_runner watch in split terminal. | ### Copilot Code Completion | Action | Keybinding | Description | @@ -222,42 +161,60 @@ The **Leader Key** is set to `Space`. | **Confirm Completion**| `Enter` | Accept the current suggestion in the popup menu. | | **Scroll Docs** | `Ctrl + f / b` | Scroll up/down in the LSP documentation window. | -### Lazygit Navigation & Commands +## Get Started -| Action | Keybinding | Description | -| :--- | :--- | :--- | -| **Switch Panels** | `H` / `L` or `←` / `→` | Move between the left side panels (Status, Files, Branches, Commits, Stash). | -| **Navigate List** | `J` / `K` or `↑` / `↓` | Move up and down within a panel's list. | -| **Quit** | `q` | Close lazygit. | -| **Help Menu** | `?` | Open the contextual keybindings help menu. | +### Prerequisites +To ensure all plugins (LSP, Tree-sitter, and Telescope) function correctly, please install the following: -### Lazygit Files Panel +* **Neovim** (v0.10+ recommended) +* **Git** (For cloning the repo and managing plugins) +* **Tree-sitter-cli** (For syntax highlighting) +* **Ripgrep** (Required for Telescope live grep) +* **Yazi** (Required for file expolorer) +* **Node & NPM** (Required for various LSP servers like `html` and `eslint`) +* **Go** (Required for certain internal tools) -| Action | Keybinding | Description | -| :--- | :--- | :--- | -| **Stage / Unstage File** | `Space` | Toggle staging for the highlighted file. | -| **Stage All** | `a` | Stage or unstage all changes in the working directory. | -| **Commit Changes** | `c` | Open the commit message prompt. | -| **Discard Changes** | `d` | Open options to discard local changes to the file. | -| **Ignore File** | `i` | Add the highlighted file to `.gitignore`. | -| **Stash Changes** | `s` | Stash current changes. | +For the best results, we recommend you install and use the Ghostty terminal with the following configuration: -### Lazygit Branches Panel +```Ini, TOML +theme = Adwaita Dark +font-size = 18 +background-opacity = 0.85 +background-blur-radius = 20 +``` -| Action | Keybinding | Description | -| :--- | :--- | :--- | -| **Checkout Branch** | `Space` | Switch to the highlighted branch. | -| **New Branch** | `n` | Create a new branch off the currently selected one. | -| **Delete Branch** | `d` | Delete the highlighted branch. | +### Installation -### Lazygit Remotes, Push & Pull +#### 1. Prepare Configuration Directory +Depending on whether you have an existing setup, follow the appropriate step below: -| Action | Keybinding | Description | -| :--- | :--- | :--- | -| **Pull** | `p` | Fetch and pull changes from the remote branch. | -| **Push** | `P` | Push current commits to the remote branch. | -| **Force Push** | `F` | Safe force push (`--force-with-lease`). | +**For a Fresh Install:** +If you have never configured Neovim, create the configuration folder: +```bash +mkdir ~/.config/nvim +``` +**For an Existing Setup:** +If you have configured Neovim already, create a backup folder: +```bash +mv ~/.config/nvim ~/.config/nvim.bak +mkdir ~/.config/nvim +``` + +#### 2. Clone the Repository +Clone the Mzansi Vim configuration into your config folder: + +```bash +cd ~/.config/nvim +git clone https://git.mzansi-innovation-hub.co.za/yaso_meth/mzansi_vim.git . +``` + +#### 3. Initialize +Simply launch Neovim: + +```bash +nvim +``` ## Additional information diff --git a/lazy-lock.json b/lazy-lock.json index 2135922..9b2b724 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,7 +1,7 @@ { "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, "LuaSnip": { "branch": "master", "commit": "0abc8f390b278c3b4aabc4c004ac8a088b65cf24" }, - "ansi.nvim": { "branch": "main", "commit": "195b64c3da1c22c2e95648dcbdc6ed075d507064" }, + "ansi.nvim": { "branch": "main", "commit": "95de464c315ecbe9d7ca3d9a203ef85def0cf6aa" }, "bigfile.nvim": { "branch": "main", "commit": "33eb067e3d7029ac77e081cfe7c45361887a311a" }, "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, "cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" }, @@ -13,23 +13,23 @@ "flutter-tools.nvim": { "branch": "main", "commit": "7d1acfd139215e02d2784733af69a61aaebe06e8" }, "harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, - "lazygit.nvim": { "branch": "main", "commit": "a04ad0dbc725134edbee3a5eea29290976695357" }, "log-highlight.nvim": { "branch": "main", "commit": "b2e00cfd41ca94338265a595f3f3f423d9f9322e" }, "lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "47059d71b42d74b0a1e9f61c1d99d301039c3b5b" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "21c5b3ebeaa0412e28096bb0701434c51c1fbf76" }, "mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" }, "mini.ai": { "branch": "main", "commit": "d73c36349aa7b0bab5f77ad71701a1d42211a1df" }, "noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim-autopairs": { "branch": "master", "commit": "7b9923abad60b903ece7c52940e1321d39eccc79" }, "nvim-cmp": { "branch": "main", "commit": "a1d504892f2bc56c2e79b65c6faded2fd21f3eca" }, - "nvim-lspconfig": { "branch": "master", "commit": "292f44408498103c47996ff5c18fd366293840d8" }, + "nvim-lspconfig": { "branch": "master", "commit": "bfcc0171a43f22afa61d927ffe9fcb6cb85dc99e" }, "nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" }, "nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" }, - "nvim-web-devicons": { "branch": "master", "commit": "dad71387de386a946b123079d0e53f23028f3abd" }, + "nvim-web-devicons": { "branch": "master", "commit": "dfbfaa967a6f7ec50789bead7ef87e336c1fa63c" }, "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "b25b749b9db64d375d782094e2b9dce53ad53a40" }, "telescope.nvim": { "branch": "master", "commit": "5255aa27c422de944791318024167ad5d40aad20" }, "tokyonight.nvim": { "branch": "main", "commit": "cdc07ac78467a233fd62c493de29a17e0cf2b2b6" }, - "yazi.nvim": { "branch": "main", "commit": "2314e0eb074996acc30183e3e9dfbfefd82f24aa" } + "vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" }, + "yazi.nvim": { "branch": "main", "commit": "4b167eeafcf84cc78a9d9cd4b1f945533e0cc5b9" } } diff --git a/lua/plugins/big_files.lua b/lua/plugins/big_files.lua index 360794a..deaa172 100644 --- a/lua/plugins/big_files.lua +++ b/lua/plugins/big_files.lua @@ -4,7 +4,7 @@ return { event = { "BufReadPre", "BufNewFile" }, opts = { -- Fallback size if the function doesn't intercept it - filesize = 1, + filesize = 2, -- Use a detection function to unconditionally catch generated files pattern = function(bufnr, _) local buf_name = vim.api.nvim_buf_get_name(bufnr) diff --git a/lua/plugins/comments.lua b/lua/plugins/comments.lua deleted file mode 100644 index 2816d89..0000000 --- a/lua/plugins/comments.lua +++ /dev/null @@ -1,10 +0,0 @@ -return { - { - "numToStr/Comment.nvim", - config = function() - require("Comment").setup() - vim.keymap.set("n", "", "gcc", { remap = true, desc = "Toggle comment" }) - vim.keymap.set("v", "", "gc", { remap = true, desc = "Toggle comment" }) - end, - }, -} diff --git a/lua/plugins/dashboard.lua b/lua/plugins/dashboard.lua index 2335abe..0fc5ee8 100644 --- a/lua/plugins/dashboard.lua +++ b/lua/plugins/dashboard.lua @@ -39,7 +39,6 @@ return { end }, { icon = "󱗘 ", desc = " Harpoon Search ", key = "fl", action = "Telescope harpoon marks" }, - { icon = " ", desc = " Lazy Git ", key = "lg", action = "LazyGit" }, { icon = "󰒲 ", desc = " Lazy Manager ", key = "z", action = "Lazy" }, { icon = "󰌵 ", desc = " Help Tags ", key = "fh", action = "Telescope help_tags" }, { icon = " ", desc = " Quit ", key = "q", action = "qa" }, diff --git a/lua/plugins/flutter.lua b/lua/plugins/flutter.lua index d912dd2..f2c5c57 100644 --- a/lua/plugins/flutter.lua +++ b/lua/plugins/flutter.lua @@ -92,12 +92,8 @@ return { user_command("FEmulators", "FlutterEmulators", {}) user_command("FLogs", "FlutterLogToggle", {}) user_command("FLogsClear", "FlutterLogClear", {}) - user_command("FPubGet", "FlutterPubGet", {}) - user_command("FDevToolsStart", "FlutterDevTools", {}) - user_command("FDevToolsOpen", "FlutterOpenDevTools", {}) user_command("FBuild", "split | term dart run build_runner build", {}) user_command("FWatch", "split | term dart run build_runner watch", {}) - user_command("FClean", "split | term flutter clean", {}) -- Target-specific Run Command user_command("FRunT", function(opts) vim.cmd("FlutterRun --web-port 1995 --target=" .. opts.args) diff --git a/lua/plugins/lazygit.lua b/lua/plugins/lazygit.lua deleted file mode 100644 index 97d42d9..0000000 --- a/lua/plugins/lazygit.lua +++ /dev/null @@ -1,20 +0,0 @@ -return { - "kdheepak/lazygit.nvim", - lazy = true, - cmd = { - "LazyGit", - "LazyGitConfig", - "LazyGitCurrentFile", - "LazyGitFilter", - "LazyGitFilterCurrentFile", - }, - -- optional for floating window border decoration - dependencies = { - "nvim-lua/plenary.nvim", - }, - -- setting the keybinding for LazyGit with 'keys' is recommended in - -- order to load the plugin when the command is run for the first time - keys = { - { "lg", "LazyGit", desc = "LazyGit" } - } -} diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 62d45a0..63f915b 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -129,7 +129,7 @@ return { { name = "luasnip", keyword_length = 2 }, { name = "buffer", - keyword_length = 2, + keyword_length = 3, -- Limit indexing to only the active visible buffer to stop lag on Enter option = { get_bufnrs = function() diff --git a/lua/plugins/auto_pairs.lua b/lua/plugins/oneliners.lua similarity index 62% rename from lua/plugins/auto_pairs.lua rename to lua/plugins/oneliners.lua index e2b6423..58eda14 100644 --- a/lua/plugins/auto_pairs.lua +++ b/lua/plugins/oneliners.lua @@ -1,4 +1,16 @@ return { + { + -- Git Plugin + 'tpope/vim-fugitive', + }, + { + "numToStr/Comment.nvim", + config = function() + require("Comment").setup() + vim.keymap.set("n", "", "gcc", { remap = true, desc = "Toggle comment" }) + vim.keymap.set("v", "", "gc", { remap = true, desc = "Toggle comment" }) + end, + }, { 'windwp/nvim-autopairs', event = "InsertEnter",