diff --git a/7.-Contoh-Custom-Plugins.md b/7.-Contoh-Custom-Plugins.md index 0b98360..7098212 100644 --- a/7.-Contoh-Custom-Plugins.md +++ b/7.-Contoh-Custom-Plugins.md @@ -1368,4 +1368,50 @@ return { } ``` summer : -https://github.com/adalessa/laravel.nvim \ No newline at end of file +https://github.com/adalessa/laravel.nvim + +# CMP Cmdline +- but file lua/plugin/cmdline.lua +```lua +return { + { "gelguy/wilder.nvim", enabled = false }, + { + "folke/noice.nvim", + dependencies = { + "MunifTanjim/nui.nvim", + "rcarriga/nvim-notify", + "nvim-treesitter/nvim-treesitter", + }, + event = "BufWinEnter", + config = function() + vim.opt.lazyredraw = false + require("noice").setup() + end, + }, + { + "hrsh7th/cmp-cmdline", + event = "BufWinEnter", + config = function() + local cmp = require("cmp") + -- Use buffer source for `/`. + cmp.setup.cmdline("/", { + sources = { + { name = "buffer" }, + }, + }) + + -- Use cmdline & path source for ':'. + cmp.setup.cmdline(":", { + sources = cmp.config.sources({ + { name = "path" }, + }, { + { name = "cmdline" }, + }), + }) + end, + }, +} +``` +Sumber : +https://github.com/folke/noice.nvim +https://github.com/hrsh7th/cmp-cmdline \ No newline at end of file