Compare commits
24 Commits
0372e79b79
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 2e1dee9fdf | |||
| 2044bb9449 | |||
| a465785583 | |||
| d3b7c61afd | |||
| b5d3dcf1ac | |||
| c2c0373b3e | |||
| 47599ecb8e | |||
| 587d2c25c4 | |||
| a61a3de603 | |||
| ce27e4a87d | |||
| 9b3b13f06e | |||
| 13c0b1fc67 | |||
| 36fe97222a | |||
| 14da6a657b | |||
| 4b6c04c74b | |||
| 2b726ea843 | |||
| c773c6e230 | |||
| 4fd57ec9c4 | |||
| 92e60d0698 | |||
| 9bf11643e2 | |||
| 09f7ea2120 | |||
| 8077029290 | |||
| 43b72217c1 | |||
| c8d4ea3cd1 |
@@ -2,3 +2,5 @@
|
|||||||
*.swo
|
*.swo
|
||||||
undo/
|
undo/
|
||||||
view/
|
view/
|
||||||
|
.DS_Store
|
||||||
|
**/.DS_Store
|
||||||
|
|||||||
6
.nvimlog
6
.nvimlog
@@ -0,0 +1,6 @@
|
|||||||
|
WRN 2026-04-17T11:59:07.367 ?.87100 server_start:199: Failed to start server: operation not permitted: /var/folders/2m/swywvgx56d3605sg4w8sngww0000gn/T/nvim.yaso_meth/KxW1Fr/nvim.87100.0
|
||||||
|
WRN 2026-04-17T11:59:11.612 ?.87111 server_start:199: Failed to start server: operation not permitted: /var/folders/2m/swywvgx56d3605sg4w8sngww0000gn/T/nvim.yaso_meth/JWMbgP/nvim.87111.0
|
||||||
|
WRN 2026-04-17T11:59:19.290 ?.87136 server_start:199: Failed to start server: operation not permitted: /var/folders/2m/swywvgx56d3605sg4w8sngww0000gn/T/nvim.yaso_meth/OzOmzX/nvim.87136.0
|
||||||
|
WRN 2026-04-17T12:02:53.603 ?.88346 server_start:199: Failed to start server: operation not permitted: /var/folders/2m/swywvgx56d3605sg4w8sngww0000gn/T/nvim.yaso_meth/svFBSD/nvim.88346.0
|
||||||
|
WRN 2026-04-17T12:12:45.385 ?.90272 server_start:199: Failed to start server: operation not permitted: /var/folders/2m/swywvgx56d3605sg4w8sngww0000gn/T/nvim.yaso_meth/Jd4YdQ/nvim.90272.0
|
||||||
|
WRN 2026-04-17T12:31:44.853 ?.5405 server_start:199: Failed to start server: operation not permitted: /var/folders/2m/swywvgx56d3605sg4w8sngww0000gn/T/nvim.yaso_meth/FFDhfK/nvim.5405.0
|
||||||
|
|||||||
51
README.md
51
README.md
@@ -23,7 +23,7 @@ The **Leader Key** is set to `Space`.
|
|||||||
### Dashboard
|
### Dashboard
|
||||||
| Action | Keybinding | Description |
|
| Action | Keybinding | Description |
|
||||||
| :--- | :--- | :--- |
|
| :--- | :--- | :--- |
|
||||||
| **File Explorer** | `cd` | Open Netrw directly from the dashboard. |
|
| **File Explorer** | `cd` | Open Yazi directly from the dashboard. |
|
||||||
| **Find Files** | `ff` | Fuzzy find files via Telescope. |
|
| **Find Files** | `ff` | Fuzzy find files via Telescope. |
|
||||||
| **Live Grep** | `fg` | Search across all files via Telescope. |
|
| **Live Grep** | `fg` | Search across all files via Telescope. |
|
||||||
| **Harpoon Menu** | `e` | Open the Harpoon quick menu. |
|
| **Harpoon Menu** | `e` | Open the Harpoon quick menu. |
|
||||||
@@ -37,11 +37,32 @@ The **Leader Key** is set to `Space`.
|
|||||||
| Action | Keybinding | Description |
|
| Action | Keybinding | Description |
|
||||||
| :--- | :--- | :--- |
|
| :--- | :--- | :--- |
|
||||||
| **Dashboard** | `<leader>;` | Open the MzansiVim Dasboard. |
|
| **Dashboard** | `<leader>;` | Open the MzansiVim Dasboard. |
|
||||||
| **File Explorer** | `<leader>cd` | Open the built-in Netrw explorer. |
|
| **File Explorer (Current Directory)** | `<leader>cd` | Open the Yazi explorer in current directory. |
|
||||||
|
| **File Explorer (Working Directory)** | `<leader>cw` | Open the Yazi explorer in working directory. |
|
||||||
| **Find Files** | `<leader>ff` | Fuzzy find files in your project. |
|
| **Find Files** | `<leader>ff` | Fuzzy find files in your project. |
|
||||||
| **Live Grep** | `<leader>fg` | Search for specific text across all files. |
|
| **Live Grep** | `<leader>fg` | Search for specific text across all files. |
|
||||||
| **Help Tags** | `<leader>fh` | Search through Neovim help documentation. |
|
| **Help Tags** | `<leader>fh` | Search through Neovim help documentation. |
|
||||||
|
|
||||||
|
### Yazi (File Explorer)
|
||||||
|
| Action | Keybinding | Description |
|
||||||
|
| :--- | :--- | :--- |
|
||||||
|
| **File Explorer** | `<leader>cd` | Open the Yazi explorer in file location. |
|
||||||
|
| **File Explorer** | `<leader>cw` | Open the Yazi explorer in working directory location. |
|
||||||
|
| **Navigation** | `h / j / k / l` | Move left (parent folder)/ down/ up/ or right (enter folder/open file). |
|
||||||
|
| **Open file** | `Enter` | Open file in new buffer. |
|
||||||
|
| **Open File (Horizontal Split)** | `Ctrl + x` | open file in horizontal split. |
|
||||||
|
| **Open File (Vertical Split)** | `Ctrl + v` | open file in horizontal split. |
|
||||||
|
| **Add file/ folder** | `a` | Create a new file (append / for a folder). |
|
||||||
|
| **Rename file/ folder** | `r` | Rename the highlighted file or directory. |
|
||||||
|
| **Delete file/ folder** | `d` | Move the selected item(s) to the system trash. |
|
||||||
|
| **Permanent Delete file/ folder** | `D` | Delete item(s) permanently (skips trash). |
|
||||||
|
| **Select file/ folder** | `space` | Toggle selection for the current file (allows batch actions). |
|
||||||
|
| **Bulk Select file/ folder** | `v` | Enter visual mode to select multiple files with `j/k` |
|
||||||
|
| **Copy / Cut** | `y / x` | Copy (Yank) or Cut the selected files. |
|
||||||
|
| **Paste** | `p` | Paste copied or cut files into the current directory. |
|
||||||
|
| **Help Menu** | `F1` | Open the help menu for keybindings. |
|
||||||
|
| **Close / Quit** | `q` | Exit Yazi and return to the Neovim buffer. |
|
||||||
|
|
||||||
### Harpoon (Quick-Switching)
|
### Harpoon (Quick-Switching)
|
||||||
| Action | Keybinding | Description |
|
| Action | Keybinding | Description |
|
||||||
| :--- | :--- | :--- |
|
| :--- | :--- | :--- |
|
||||||
@@ -60,6 +81,29 @@ The **Leader Key** is set to `Space`.
|
|||||||
| **References** | `gr` | List all places where a symbol is used. |
|
| **References** | `gr` | List all places where a symbol is used. |
|
||||||
| **Rename** | `<leader>rn` | Rename all occurrences of the symbol. |
|
| **Rename** | `<leader>rn` | Rename all occurrences of the symbol. |
|
||||||
|
|
||||||
|
### Flutter Development
|
||||||
|
| Action | Keybinding | Description |
|
||||||
|
| :--- | :--- | :--- |
|
||||||
|
| **Run App** | `:FRun` | Start the flutter application. |
|
||||||
|
| **Run Target**| `:FRunT <path to file>` | Run Flutter with a specific target file (e.g., main_dev.dart). |
|
||||||
|
| **Hot Reload** | `:FReload` | Trigger a Hot Reload for the running app. |
|
||||||
|
| **Hot Restart** | `:FRestart` | Trigger a Hot Restart for the running app. |
|
||||||
|
| **Quit App** | `:FQuit` | Stop the running Flutter session. |
|
||||||
|
| **List Emulators** | `:FEmulators` | Show and launch available emulators. |
|
||||||
|
| **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. |
|
||||||
|
|
||||||
|
### Copilot Code Completion
|
||||||
|
| Action | Keybinding | Description |
|
||||||
|
| :--- | :--- | :--- |
|
||||||
|
| **:Accept suggestion** | `Ctrl + l` | Accept suggested code from Copilot. |
|
||||||
|
| **:Setup Copilot** | `:Copilot setup` | Authenticate and enable GitHub Copilot (disable cmd popups before proceeding with setup). |
|
||||||
|
| **:Enable Copilot** | `:Copilot enable` | Enable GitHub Copilot after :Copilot disable. |
|
||||||
|
| **:Disable Copilot** | `:Copilot disable` | Disable GitHub Copilot inline suggestions. |
|
||||||
|
| **:Check Status of Copilot** | `:Copilot status` | Check if GitHub Copilot is operational and report on any issues. |
|
||||||
|
| **:Signout of Copilot** | `:Copilot signout` | Sign out of GitHub Copilot. |
|
||||||
|
|
||||||
### Diagnostics (Errors & Warnings)
|
### Diagnostics (Errors & Warnings)
|
||||||
| Action | Keybinding | Description |
|
| Action | Keybinding | Description |
|
||||||
| :--- | :--- | :--- |
|
| :--- | :--- | :--- |
|
||||||
@@ -72,7 +116,7 @@ The **Leader Key** is set to `Space`.
|
|||||||
### Window Management
|
### Window Management
|
||||||
| Action | Keybinding | Description |
|
| Action | Keybinding | Description |
|
||||||
| :--- | :--- | :--- |
|
| :--- | :--- | :--- |
|
||||||
| **Cycle Windows** | `Ctrl + w w` | Cycle focus between open windows (). |
|
| **Cycle Windows** | `Ctrl + w w` | Cycle focus between open windows. |
|
||||||
| **Move Down** | `Ctrl + w j` | Move focus to the window below. |
|
| **Move Down** | `Ctrl + w j` | Move focus to the window below. |
|
||||||
| **Move Up** | `Ctrl + w k` | Move focus to the window above. |
|
| **Move Up** | `Ctrl + w k` | Move focus to the window above. |
|
||||||
| **Move Up** | `Ctrl + w s` | Duplicate window (horizontal). |
|
| **Move Up** | `Ctrl + w s` | Duplicate window (horizontal). |
|
||||||
@@ -101,6 +145,7 @@ To ensure all plugins (LSP, Tree-sitter, and Telescope) function correctly, plea
|
|||||||
* **Git** (For cloning the repo and managing plugins)
|
* **Git** (For cloning the repo and managing plugins)
|
||||||
* **Tree-sitter-cli** (For syntax highlighting)
|
* **Tree-sitter-cli** (For syntax highlighting)
|
||||||
* **Ripgrep** (Required for Telescope live grep)
|
* **Ripgrep** (Required for Telescope live grep)
|
||||||
|
* **Yazi** (Required for file expolorer)
|
||||||
* **Node & NPM** (Required for various LSP servers like `html` and `eslint`)
|
* **Node & NPM** (Required for various LSP servers like `html` and `eslint`)
|
||||||
* **Go** (Required for certain internal tools)
|
* **Go** (Required for certain internal tools)
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +1,34 @@
|
|||||||
{
|
{
|
||||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||||
"LuaSnip": { "branch": "master", "commit": "dae4f5aaa3574bd0c2b9dd20fb9542a02c10471c" },
|
"LuaSnip": { "branch": "master", "commit": "a62e1083a3cfe8b6b206e7d3d33a51091df25357" },
|
||||||
|
"ansi.nvim": { "branch": "main", "commit": "95de464c315ecbe9d7ca3d9a203ef85def0cf6aa" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
|
||||||
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||||
"dashboard-nvim": { "branch": "master", "commit": "0775e567b6c0be96d01a61795f7b64c1758262f6" },
|
"copilot.vim": { "branch": "release", "commit": "a12fd5672110c8aa7e3c8419e28c96943ca179be" },
|
||||||
|
"dashboard-nvim": { "branch": "master", "commit": "f787e3462c2ee2b6117b17c1aa4ddf66cb6f57fe" },
|
||||||
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
|
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
|
||||||
"flutter-tools.nvim": { "branch": "main", "commit": "677cc07c16e8b89999108d2ebeefcfc5f539b73c" },
|
"flutter-tools.nvim": { "branch": "main", "commit": "7fc434e99297af83cba10deff008be53a008a6d5" },
|
||||||
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
|
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
|
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
"log-highlight.nvim": { "branch": "main", "commit": "ca88628f6dd3b9bb46f9a7401669e24cf7de47a4" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "a979821a975897b88493843301950c456a725982" },
|
"lualine.nvim": { "branch": "master", "commit": "131a558e13f9f28b15cd235557150ccb23f89286" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "0c2823e0418f3d9230ff8b201c976e84de1cb401" },
|
||||||
|
"mason.nvim": { "branch": "main", "commit": "cb8445f8ce85d957416c106b780efd51c6298f89" },
|
||||||
"mini.ai": { "branch": "main", "commit": "bfb26d9072670c3aaefab0f53024b2f3729c8083" },
|
"mini.ai": { "branch": "main", "commit": "bfb26d9072670c3aaefab0f53024b2f3729c8083" },
|
||||||
|
"noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" },
|
||||||
|
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
|
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "da88697d7f45d16852c6b2769dc52387d1ddc45f" },
|
"nvim-cmp": { "branch": "main", "commit": "a1d504892f2bc56c2e79b65c6faded2fd21f3eca" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "841c6d4139aedb8a3f2baf30cef5327371385b93" },
|
"nvim-lspconfig": { "branch": "master", "commit": "b66a8ce16b141cd26576267e2d1f371d658b7bb7" },
|
||||||
"nvim-treesitter": { "branch": "main", "commit": "53f6ce29df5841ce26e5a9f06fb371088b8d8031" },
|
"nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" },
|
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
"nvim-web-devicons": { "branch": "master", "commit": "4fc505ac7bd7692824a142e96e5f529c133862f8" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "3333a52ff548ba0a68af6d8da1e54f9cd96e9179" },
|
"telescope.nvim": { "branch": "master", "commit": "5255aa27c422de944791318024167ad5d40aad20" },
|
||||||
"tokyonight.nvim": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" },
|
"tokyonight.nvim": { "branch": "main", "commit": "cdc07ac78467a233fd62c493de29a17e0cf2b2b6" },
|
||||||
"vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" }
|
"vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" },
|
||||||
|
"yazi.nvim": { "branch": "main", "commit": "25f370e6e84ca7ebca5927ec66cd93e2fa16fd3d" }
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
lua/.DS_Store
vendored
Normal file
BIN
lua/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -1,32 +1,33 @@
|
|||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
vim.keymap.set("n", "<leader>cd", vim.cmd.Ex)
|
-- vim.keymap.set("n", "<leader>cd", vim.cmd.Ex)
|
||||||
vim.keymap.set("n", "<leader>;", ":Dashboard<CR>", { desc = "Return to Dashboard", silent = true })
|
vim.keymap.set("n", "<leader>;", ":Dashboard<CR>", { desc = "Return to Dashboard", silent = true })
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
pattern = "netrw",
|
pattern = "netrw",
|
||||||
callback = function(event)
|
callback = function(event)
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
vim.keymap.set("n", "<Esc>", function()
|
vim.keymap.set("n", "<Esc>", function()
|
||||||
vim.cmd("enew")
|
vim.cmd("enew")
|
||||||
vim.cmd("Dashboard")
|
vim.cmd("Dashboard")
|
||||||
end, {
|
end, {
|
||||||
buffer = event.buf,
|
buffer = event.buf,
|
||||||
nowait = true,
|
nowait = true,
|
||||||
desc = "Return to Dashboard"
|
desc = "Return to Dashboard"
|
||||||
})
|
})
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
pattern = "netrw",
|
pattern = "netrw",
|
||||||
callback = function(event)
|
callback = function(event)
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
vim.keymap.set("n", "<leader>;", function()
|
vim.keymap.set("n", "<leader>;", function()
|
||||||
vim.cmd("enew")
|
vim.cmd("enew")
|
||||||
vim.cmd("Dashboard")
|
vim.cmd("Dashboard")
|
||||||
end, {
|
end, {
|
||||||
buffer = event.buf,
|
buffer = event.buf,
|
||||||
nowait = true, desc = "Return to Dashboard"
|
nowait = true,
|
||||||
})
|
desc = "Return to Dashboard"
|
||||||
end)
|
})
|
||||||
end,
|
end)
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -2,3 +2,8 @@ vim.opt.number = true
|
|||||||
vim.opt.cursorline = true
|
vim.opt.cursorline = true
|
||||||
vim.opt.relativenumber = true
|
vim.opt.relativenumber = true
|
||||||
vim.opt.shiftwidth = 4
|
vim.opt.shiftwidth = 4
|
||||||
|
-- disable netrw at the very start
|
||||||
|
vim.g.loaded_netrw = 1
|
||||||
|
vim.g.loaded_netrwPlugin = 1
|
||||||
|
vim.opt.splitbelow = true -- Opens horizontal splits below
|
||||||
|
vim.opt.splitright = true -- Opens vertical splits to the right
|
||||||
|
|||||||
34
lua/plugins/cmd_popup.lua
Normal file
34
lua/plugins/cmd_popup.lua
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
return {
|
||||||
|
"folke/noice.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {
|
||||||
|
cmdline = {
|
||||||
|
view = "cmdline_popup", -- This ensures it's a popup and not at the bottom
|
||||||
|
},
|
||||||
|
routes = {
|
||||||
|
{
|
||||||
|
filter = {
|
||||||
|
event = "lsp",
|
||||||
|
kind = "progress",
|
||||||
|
},
|
||||||
|
opts = { skip = true },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
presets = {
|
||||||
|
bottom_search = false, -- use a classic bottom cmdline for search
|
||||||
|
command_palette = true, -- position the cmdline and popupmenu together
|
||||||
|
long_message_to_split = true, -- render entities like :help in a split
|
||||||
|
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
||||||
|
lsp_doc_border = true, -- add a border to hover docs and signature help
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dependencies = {
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
{
|
||||||
|
"rcarriga/nvim-notify",
|
||||||
|
opts = {
|
||||||
|
timeout = 2000, -- Set this to your preferred time in milliseconds (e.g., 3000 = 3 seconds)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
12
lua/plugins/copilot.lua
Normal file
12
lua/plugins/copilot.lua
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
return {
|
||||||
|
"github/copilot.vim",
|
||||||
|
lazy = false,
|
||||||
|
config = function()
|
||||||
|
vim.g.copilot_enabled = false
|
||||||
|
vim.g.copilot_no_tab_map = true
|
||||||
|
vim.keymap.set('i', '<C-l>', 'copilot#Accept("\\<CR>")', {
|
||||||
|
expr = true,
|
||||||
|
replace_keycodes = false
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -19,7 +19,14 @@ return {
|
|||||||
header = vim.split(logo, "\n"),
|
header = vim.split(logo, "\n"),
|
||||||
center = {
|
center = {
|
||||||
-- Aligned to Mzansi Vim Essential Keybindings
|
-- Aligned to Mzansi Vim Essential Keybindings
|
||||||
{ icon = " ", desc = " File Explorer ", key = "cd", action = "Explore" },
|
{
|
||||||
|
icon = " ",
|
||||||
|
desc = " File Explorer ",
|
||||||
|
key = "cd",
|
||||||
|
action = function()
|
||||||
|
require("yazi").yazi(nil, vim.fn.getcwd())
|
||||||
|
end
|
||||||
|
},
|
||||||
{ icon = " ", desc = " Find Files ", key = "ff", action = "Telescope find_files" },
|
{ icon = " ", desc = " Find Files ", key = "ff", action = "Telescope find_files" },
|
||||||
{ icon = " ", desc = " Live Grep ", key = "fg", action = "Telescope live_grep" },
|
{ icon = " ", desc = " Live Grep ", key = "fg", action = "Telescope live_grep" },
|
||||||
{
|
{
|
||||||
|
|||||||
86
lua/plugins/flutter.lua
Normal file
86
lua/plugins/flutter.lua
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-flutter/flutter-tools.nvim",
|
||||||
|
lazy = false,
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"stevearc/dressing.nvim",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
vim.opt.termguicolors = true
|
||||||
|
-- vim.env.FLUTTER_FORCE_COLOR = "1"
|
||||||
|
|
||||||
|
-- Auto scroll & Color logs when new logs appear
|
||||||
|
vim.api.nvim_create_autocmd({ "TextChanged", "BufWinEnter" }, {
|
||||||
|
pattern = "*__FLUTTER_DEV_LOG__*",
|
||||||
|
callback = function()
|
||||||
|
local buf = vim.api.nvim_get_current_buf()
|
||||||
|
|
||||||
|
-- Auto-scroll logic
|
||||||
|
if vim.bo[buf].filetype == "log" or vim.fn.bufname(buf):match("flutter%-dev%.log") then
|
||||||
|
local win = vim.api.nvim_get_current_win()
|
||||||
|
local last_line = vim.api.nvim_buf_line_count(buf)
|
||||||
|
if vim.api.nvim_get_mode().mode ~= 'i' then
|
||||||
|
vim.api.nvim_win_set_cursor(win, { last_line, 0 })
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
require("flutter-tools").setup({
|
||||||
|
ui = {
|
||||||
|
border = "rounded",
|
||||||
|
notification_style = "plugin",
|
||||||
|
},
|
||||||
|
decorations = {
|
||||||
|
statusline = {
|
||||||
|
app_version = true,
|
||||||
|
device = true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
lsp = {
|
||||||
|
capabilities = require("cmp_nvim_lsp").default_capabilities(),
|
||||||
|
settings = {
|
||||||
|
showTodos = true,
|
||||||
|
completeFunctionCalls = true,
|
||||||
|
updateImportsOnRename = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
widget_guides = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
dev_log = {
|
||||||
|
enabled = true,
|
||||||
|
notify_errors = false,
|
||||||
|
open_cmd = "vertical rightbelow vsplit",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
-- Custom Shorthand Commands
|
||||||
|
local user_command = vim.api.nvim_create_user_command
|
||||||
|
|
||||||
|
-- Simple Aliases
|
||||||
|
-- user_command("FRun", "FlutterRun", {})
|
||||||
|
-- user_command("FRun", "FlutterRun --color", {})
|
||||||
|
user_command("FRun", "FlutterRun --web-port 1995", {})
|
||||||
|
|
||||||
|
user_command("FReload", "FlutterReload", {})
|
||||||
|
user_command("FRestart", "FlutterRestart", {})
|
||||||
|
user_command("FQuit", "FlutterQuit", {})
|
||||||
|
user_command("FDevices", "FlutterDevices", {})
|
||||||
|
user_command("FEmulators", "FlutterEmulators", {})
|
||||||
|
user_command("FLogs", "FlutterLogToggle", {})
|
||||||
|
user_command("FLogsClear", "FlutterLogClear", {})
|
||||||
|
|
||||||
|
-- Target-specific Run Command
|
||||||
|
user_command("FRunT", function(opts)
|
||||||
|
vim.cmd("FlutterRun --web-port 1995 --target=" .. opts.args)
|
||||||
|
end, {
|
||||||
|
nargs = 1,
|
||||||
|
complete = "file",
|
||||||
|
desc = "Run Flutter with a specific target file",
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
16
lua/plugins/log_highlighting.lua
Normal file
16
lua/plugins/log_highlighting.lua
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
'fei6409/log-highlight.nvim',
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'0xferrous/ansi.nvim',
|
||||||
|
config = function()
|
||||||
|
require('ansi').setup({
|
||||||
|
auto_enable = true, -- Auto-enable for configured filetypes
|
||||||
|
auto_enable_stdin = true, -- Auto-enable for piped stdin content
|
||||||
|
filetypes = { 'log', 'ansi' },
|
||||||
|
})
|
||||||
|
end
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -8,10 +8,12 @@ return {
|
|||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("mason").setup()
|
require("mason").setup()
|
||||||
|
|
||||||
local mason_lspconfig = require("mason-lspconfig")
|
local mason_lspconfig = require("mason-lspconfig")
|
||||||
-- We no longer need: local lspconfig = require("lspconfig")
|
|
||||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
-- Register global capabilities for all servers
|
||||||
|
vim.lsp.config("*", {
|
||||||
|
capabilities = require("cmp_nvim_lsp").default_capabilities(),
|
||||||
|
})
|
||||||
|
|
||||||
local servers = {
|
local servers = {
|
||||||
"lua_ls",
|
"lua_ls",
|
||||||
@@ -31,41 +33,38 @@ return {
|
|||||||
ensure_installed = servers,
|
ensure_installed = servers,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Neovim 0.11+ approach: Use vim.lsp.config
|
-- Neovim 0.11+ approach: Configure and Enable
|
||||||
for _, server_name in ipairs(servers) do
|
for _, server_name in ipairs(servers) do
|
||||||
local config = {
|
|
||||||
capabilities = capabilities,
|
|
||||||
}
|
|
||||||
|
|
||||||
if server_name == "lua_ls" then
|
if server_name == "lua_ls" then
|
||||||
config.settings = {
|
vim.lsp.config("lua_ls", {
|
||||||
Lua = {
|
settings = {
|
||||||
diagnostics = { globals = { "vim" } },
|
Lua = {
|
||||||
|
diagnostics = { globals = { "vim" } },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
})
|
||||||
|
end
|
||||||
|
-- Activate the server
|
||||||
|
if server_name ~= "dartls" then
|
||||||
|
vim.lsp.enable(server_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Enable the server configuration natively
|
|
||||||
vim.lsp.config(server_name, config)
|
|
||||||
vim.lsp.enable(server_name)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Diagnostic display config
|
-- Diagnostic display config
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
virtual_text = true, -- show error inline at end of line
|
virtual_text = true,
|
||||||
signs = true,
|
signs = true,
|
||||||
underline = true,
|
underline = true,
|
||||||
update_in_insert = false, -- only update after leaving insert mode
|
update_in_insert = false,
|
||||||
float = {
|
float = { border = "rounded", source = true },
|
||||||
border = "rounded",
|
|
||||||
source = true, -- shows which LSP reported the error
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Keybindings (unchanged)
|
-- Keybindings & Formatting
|
||||||
vim.api.nvim_create_autocmd("LspAttach", {
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
callback = function(ev)
|
callback = function(ev)
|
||||||
local opts = { buffer = ev.buf }
|
local opts = { buffer = ev.buf }
|
||||||
|
-- Neovim 0.11+ provides some defaults like 'grn' (rename),
|
||||||
|
-- but keeping your custom ones is fine.
|
||||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
|
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
|
||||||
vim.keymap.set("n", "<C-k>", vim.lsp.buf.hover, opts)
|
vim.keymap.set("n", "<C-k>", vim.lsp.buf.hover, opts)
|
||||||
vim.keymap.set("n", "gr", vim.lsp.buf.references, opts)
|
vim.keymap.set("n", "gr", vim.lsp.buf.references, opts)
|
||||||
@@ -78,8 +77,7 @@ return {
|
|||||||
vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts) -- jump to next error
|
vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts) -- jump to next error
|
||||||
vim.keymap.set("n", "<leader>el", vim.diagnostic.setloclist, opts) -- all errors in quickfix list
|
vim.keymap.set("n", "<leader>el", vim.diagnostic.setloclist, opts) -- all errors in quickfix list
|
||||||
vim.keymap.set("n", "<leader>af", vim.lsp.buf.format, { desc = "Format file" }) -- manual format
|
vim.keymap.set("n", "<leader>af", vim.lsp.buf.format, { desc = "Format file" }) -- manual format
|
||||||
|
-- Format on save (with filter to prevent multi-client conflicts)
|
||||||
-- Format on save
|
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
buffer = ev.buf,
|
buffer = ev.buf,
|
||||||
callback = function()
|
callback = function()
|
||||||
@@ -90,34 +88,13 @@ return {
|
|||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"nvim-flutter/flutter-tools.nvim",
|
|
||||||
lazy = false, -- Load on startup to ensure it handles dartls correctly
|
|
||||||
dependencies = {
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
"stevearc/dressing.nvim", -- Optional but highly recommended for better UI
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("flutter-tools").setup({
|
|
||||||
lsp = {
|
|
||||||
-- Pass your existing capabilities to the flutter-tools LSP config
|
|
||||||
capabilities = require("cmp_nvim_lsp").default_capabilities(),
|
|
||||||
-- You can add specific dartls settings here if needed
|
|
||||||
settings = {
|
|
||||||
showTodos = true,
|
|
||||||
completeFunctionCalls = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
"hrsh7th/cmp-buffer",
|
"hrsh7th/cmp-buffer",
|
||||||
"hrsh7th/cmp-path",
|
"hrsh7th/cmp-path",
|
||||||
"L3MON4D3/LuaSnip", -- Snippet engine is usually required by cmp configs
|
"L3MON4D3/LuaSnip",
|
||||||
"saadparwaiz1/cmp_luasnip",
|
"saadparwaiz1/cmp_luasnip",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
@@ -129,11 +106,9 @@ return {
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
mapping = cmp.mapping.preset.insert({
|
mapping = cmp.mapping.preset.insert({
|
||||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
|
||||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
|
||||||
["<C-Space>"] = cmp.mapping.complete(),
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||||
["<Tab>"] = cmp.mapping(function(fallback) -- add this
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.confirm({ select = true })
|
cmp.confirm({ select = true })
|
||||||
else
|
else
|
||||||
@@ -146,6 +121,7 @@ return {
|
|||||||
{ name = "luasnip" },
|
{ name = "luasnip" },
|
||||||
}, {
|
}, {
|
||||||
{ name = "buffer" },
|
{ name = "buffer" },
|
||||||
|
{ name = "path" },
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -1,31 +1,30 @@
|
|||||||
return {
|
return {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
lazy = false,
|
lazy = false, -- Treesitter must not be lazy-loaded in the new version
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
config = function()
|
config = function()
|
||||||
require("nvim-treesitter").setup({
|
local ts = require("nvim-treesitter")
|
||||||
|
local supported_languages = {
|
||||||
|
"lua", "vim", "vimdoc", "query", "dart", "python",
|
||||||
|
"dockerfile", "yaml", "bash", "json", "html",
|
||||||
|
"css", "javascript", "sql", "markdown", "markdown_inline",
|
||||||
|
}
|
||||||
|
-- 1. Global Settings
|
||||||
|
ts.setup({
|
||||||
install_dir = vim.fn.stdpath("data") .. "/site",
|
install_dir = vim.fn.stdpath("data") .. "/site",
|
||||||
highlight = { enable = true },
|
auto_install = true,
|
||||||
indent = { enable = true },
|
})
|
||||||
autotag = { enable = true },
|
-- 2. Bulk Install Parsers (Asynchronous)
|
||||||
ensure_installed = {
|
ts.install(supported_languages)
|
||||||
"lua",
|
-- 3. Enable Highlighting
|
||||||
"vim",
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
"vimdoc",
|
pattern = supported_languages,
|
||||||
"query",
|
callback = function()
|
||||||
"dart",
|
local lang = vim.treesitter.language.get_lang(vim.bo.filetype)
|
||||||
"python",
|
if lang then
|
||||||
"dockerfile",
|
vim.treesitter.start()
|
||||||
"yaml",
|
end
|
||||||
"bash",
|
end,
|
||||||
"json",
|
|
||||||
"html",
|
|
||||||
"css",
|
|
||||||
"javascript",
|
|
||||||
"sql",
|
|
||||||
"markdown",
|
|
||||||
"markdown_inline",
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
29
lua/plugins/yazi.lua
Normal file
29
lua/plugins/yazi.lua
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
return {
|
||||||
|
"mikavilpas/yazi.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
keys = {
|
||||||
|
-- Customize these keymaps to your liking!
|
||||||
|
{
|
||||||
|
"<leader>cd",
|
||||||
|
function()
|
||||||
|
require("yazi").yazi()
|
||||||
|
end,
|
||||||
|
desc = "Open yazi at the current file",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
-- Open in the current working directory
|
||||||
|
"<leader>cw",
|
||||||
|
function()
|
||||||
|
require("yazi").yazi(nil, vim.fn.getcwd())
|
||||||
|
end,
|
||||||
|
desc = "Open yazi in cwd",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
-- if you want to replace netrw entirely with yazi
|
||||||
|
open_for_directories = true,
|
||||||
|
keymaps = {
|
||||||
|
show_help = "<f1>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user