2023-01-15 00:17:41 +07:00
|
|
|
return {
|
2023-02-05 09:09:33 +07:00
|
|
|
-- plugin ini merupakan penyedia library neovim lua
|
2023-01-15 00:22:51 +07:00
|
|
|
{
|
2023-01-15 00:17:41 +07:00
|
|
|
"nvim-lua/plenary.nvim",
|
2023-02-11 09:41:39 +07:00
|
|
|
lazy = true,
|
2023-01-15 00:17:41 +07:00
|
|
|
},
|
2023-02-05 09:09:33 +07:00
|
|
|
-- coding start
|
|
|
|
-- coloring code
|
2023-01-15 00:22:51 +07:00
|
|
|
{
|
2023-02-04 13:57:50 +07:00
|
|
|
"nvim-treesitter/nvim-treesitter",
|
2023-03-12 15:35:27 +07:00
|
|
|
lazy = true,
|
2023-02-09 13:22:54 +07:00
|
|
|
event = "BufRead",
|
2023-02-05 01:44:41 +07:00
|
|
|
cmd = {
|
|
|
|
"TSBufDisable",
|
|
|
|
"TSBufEnable",
|
|
|
|
"TSBufToggle",
|
|
|
|
"TSDisable",
|
|
|
|
"TSEnable",
|
|
|
|
"TSToggle",
|
|
|
|
"TSInstall",
|
|
|
|
"TSInstallInfo",
|
|
|
|
"TSInstallSync",
|
|
|
|
"TSModuleInfo",
|
|
|
|
"TSUninstall",
|
|
|
|
"TSUpdate",
|
|
|
|
"TSUpdateSync",
|
|
|
|
},
|
2023-02-20 22:53:49 +07:00
|
|
|
build = function()
|
|
|
|
local status_ok, ts = pcall(require, "nvim-treesitter.install")
|
|
|
|
if not status_ok then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
ts.update({ with_sync = true })()
|
|
|
|
end,
|
|
|
|
config = function()
|
|
|
|
local status_ok, _ = pcall(require, "nvim-treesitter")
|
|
|
|
if not status_ok then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
require("user.treesitter")
|
|
|
|
end,
|
2023-01-15 00:17:41 +07:00
|
|
|
},
|
2023-02-04 13:57:50 +07:00
|
|
|
-- snippets
|
2023-04-17 13:48:54 +07:00
|
|
|
{
|
|
|
|
"rafamadriz/friendly-snippets",
|
2023-09-08 19:47:20 +07:00
|
|
|
event = "InsertEnter",
|
2023-04-17 13:48:54 +07:00
|
|
|
config = function()
|
|
|
|
require("luasnip.loaders.from_vscode").lazy_load()
|
|
|
|
require("user.snippets")
|
|
|
|
require("user.snip")
|
|
|
|
end,
|
|
|
|
},
|
2023-01-15 00:17:41 +07:00
|
|
|
{
|
2023-02-04 13:57:50 +07:00
|
|
|
"L3MON4D3/LuaSnip",
|
2023-03-12 15:35:27 +07:00
|
|
|
lazy = true,
|
2023-09-08 19:47:20 +07:00
|
|
|
event = "InsertEnter",
|
2023-04-17 13:48:54 +07:00
|
|
|
-- dependencies = {
|
|
|
|
-- "rafamadriz/friendly-snippets",
|
|
|
|
-- event = "BufRead",
|
|
|
|
-- config = function()
|
|
|
|
-- require("luasnip.loaders.from_vscode").lazy_load()
|
|
|
|
-- require("user.snippets")
|
|
|
|
-- end,
|
|
|
|
-- },
|
2023-02-04 13:57:50 +07:00
|
|
|
opts = {
|
|
|
|
history = true,
|
|
|
|
delete_check_events = "TextChanged",
|
|
|
|
},
|
2023-12-30 09:46:28 +07:00
|
|
|
-- stylua: ignore
|
|
|
|
keys = {
|
|
|
|
-- {
|
|
|
|
-- "<tab>",
|
|
|
|
-- function()
|
|
|
|
-- return require("luasnip").jumpable(1) and "<Plug>luasnip-jump-next" or "<tab>"
|
|
|
|
-- end,
|
|
|
|
-- expr = true, silent = true, mode = "i",
|
|
|
|
-- },
|
|
|
|
{ "<tab>", function() require("luasnip").jump(1) end, mode = "s" },
|
|
|
|
{ "<s-tab>", function() require("luasnip").jump(-1) end, mode = { "i", "s" } },
|
|
|
|
},
|
2023-01-15 00:17:41 +07:00
|
|
|
},
|
2023-01-15 00:22:51 +07:00
|
|
|
{
|
2023-02-11 09:41:39 +07:00
|
|
|
"neovim/nvim-lspconfig",
|
2023-04-17 13:48:54 +07:00
|
|
|
event = "BufRead",
|
|
|
|
-- dependencies = {
|
|
|
|
-- "williamboman/mason-lspconfig.nvim",
|
|
|
|
-- },
|
|
|
|
-- config = function()
|
|
|
|
-- require("user.lsp")
|
|
|
|
-- end,
|
2023-01-15 00:17:41 +07:00
|
|
|
},
|
2023-02-11 09:41:39 +07:00
|
|
|
-- {
|
|
|
|
-- "williamboman/mason.nvim",
|
|
|
|
-- event = "VeryLazy",
|
|
|
|
-- cmd = {
|
|
|
|
-- "Mason",
|
|
|
|
-- "MasonInstall",
|
|
|
|
-- "MasonUninstall",
|
|
|
|
-- "MasonUninstallAll",
|
|
|
|
-- "MasonLog",
|
|
|
|
-- },
|
|
|
|
-- dependencies = { "williamboman/mason-lspconfig.nvim" },
|
|
|
|
-- init = function()
|
|
|
|
-- vim.tbl_map(function(plugin)
|
|
|
|
-- pcall(require, plugin)
|
|
|
|
-- end, { "lspconfig", "null-ls" })
|
|
|
|
-- end,
|
|
|
|
-- },
|
2023-01-15 00:17:41 +07:00
|
|
|
{
|
|
|
|
"williamboman/mason.nvim",
|
2023-03-12 15:35:27 +07:00
|
|
|
lazy = true,
|
2023-09-08 19:47:20 +07:00
|
|
|
event = "InsertEnter",
|
2023-04-17 13:48:54 +07:00
|
|
|
dependencies = { "williamboman/mason-lspconfig.nvim" },
|
|
|
|
cmd = {
|
|
|
|
"Mason",
|
|
|
|
"MasonInstall",
|
|
|
|
"MasonUninstall",
|
|
|
|
"MasonUninstallAll",
|
|
|
|
"MasonLog",
|
|
|
|
},
|
2024-02-26 08:10:39 +07:00
|
|
|
-- keys = { { "<leader>cm", "<cmd>Mason<cr>", desc = "Mason" } },
|
2023-04-17 13:48:54 +07:00
|
|
|
config = function()
|
|
|
|
require("user.lsp")
|
|
|
|
end,
|
2023-01-15 00:17:41 +07:00
|
|
|
},
|
2023-01-21 11:01:35 +07:00
|
|
|
-- for formater linter
|
2023-03-12 15:35:27 +07:00
|
|
|
{ "RRethy/vim-illuminate", event = "BufRead", lazy = true },
|
2023-01-21 11:01:35 +07:00
|
|
|
{
|
|
|
|
"jayp0521/mason-null-ls.nvim",
|
2023-09-08 19:47:20 +07:00
|
|
|
-- lazy = true,
|
2023-04-17 13:48:54 +07:00
|
|
|
dependencies = {
|
2024-02-27 12:22:51 +07:00
|
|
|
-- "jose-elias-alvarez/null-ls.nvim",
|
|
|
|
"nvimtools/none-ls.nvim",
|
2024-02-28 21:58:18 +07:00
|
|
|
dependencies = {
|
|
|
|
"nvimtools/none-ls-extras.nvim",
|
|
|
|
},
|
2023-04-17 13:48:54 +07:00
|
|
|
config = function()
|
|
|
|
require("user.lsp.null-ls")
|
|
|
|
end,
|
|
|
|
},
|
2023-09-08 19:47:20 +07:00
|
|
|
event = "InsertEnter",
|
2023-01-21 11:01:35 +07:00
|
|
|
opts = function()
|
|
|
|
require("user.mason-null-ls")
|
|
|
|
end,
|
|
|
|
},
|
2023-02-04 13:57:50 +07:00
|
|
|
-- debuging
|
|
|
|
{
|
|
|
|
"rcarriga/nvim-dap-ui",
|
2023-04-17 17:59:57 +07:00
|
|
|
event = "BufRead",
|
2023-02-04 13:57:50 +07:00
|
|
|
dependencies = "mfussenegger/nvim-dap",
|
|
|
|
enabled = vim.fn.has("win32") == 0,
|
|
|
|
config = function()
|
|
|
|
require("user.dapui")
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
{
|
2023-04-10 18:49:06 +07:00
|
|
|
"jay-babu/mason-nvim-dap.nvim",
|
2023-04-17 17:59:57 +07:00
|
|
|
event = "BufRead",
|
2023-02-04 13:57:50 +07:00
|
|
|
dependencies = { "williamboman/mason.nvim", "mfussenegger/nvim-dap" },
|
|
|
|
enabled = vim.fn.has("win32") == 0,
|
2023-04-17 17:59:57 +07:00
|
|
|
config = function()
|
2023-02-04 13:57:50 +07:00
|
|
|
require("user.mason_dap")
|
|
|
|
end,
|
|
|
|
},
|
2023-02-05 09:09:33 +07:00
|
|
|
-- for install lsp tidak support mason
|
2023-04-17 13:48:54 +07:00
|
|
|
{
|
|
|
|
"williamboman/nvim-lsp-installer",
|
|
|
|
event = "BufRead",
|
|
|
|
lazy = true,
|
|
|
|
config = function()
|
|
|
|
require("user.lsp.config")
|
|
|
|
end,
|
|
|
|
},
|
2023-02-05 09:09:33 +07:00
|
|
|
-- auto pairs
|
|
|
|
{
|
|
|
|
"windwp/nvim-autopairs",
|
2023-03-12 15:35:27 +07:00
|
|
|
lazy = true,
|
2023-04-22 16:29:44 +07:00
|
|
|
-- commit = "4fc96c8f3df89b6d23e5092d31c866c53a346347",
|
2023-02-05 09:09:33 +07:00
|
|
|
dependencies = "hrsh7th/nvim-cmp",
|
2023-02-05 12:50:48 +07:00
|
|
|
event = "InsertEnter",
|
|
|
|
config = function()
|
2023-02-05 09:09:33 +07:00
|
|
|
require("user.autopairs")
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
-- untuk comment
|
2023-02-21 07:32:15 +07:00
|
|
|
{
|
|
|
|
"JoosepAlviste/nvim-ts-context-commentstring",
|
2023-03-12 15:35:27 +07:00
|
|
|
lazy = true,
|
2024-02-26 08:10:39 +07:00
|
|
|
-- event = "BufWinEnter",
|
|
|
|
event = "InsertEnter",
|
2023-02-21 07:32:15 +07:00
|
|
|
dependencies = "nvim-treesitter/nvim-treesitter",
|
2024-02-17 15:27:41 +07:00
|
|
|
config = function()
|
|
|
|
require("ts_context_commentstring").setup({
|
|
|
|
enable_autocmd = false,
|
|
|
|
})
|
|
|
|
end,
|
2023-02-21 07:32:15 +07:00
|
|
|
},
|
2023-02-05 09:09:33 +07:00
|
|
|
{
|
|
|
|
"numToStr/Comment.nvim",
|
2024-02-26 08:10:39 +07:00
|
|
|
-- event = "BufWinEnter",
|
|
|
|
event = "InsertEnter",
|
2023-02-09 13:22:54 +07:00
|
|
|
config = function()
|
2023-02-05 09:09:33 +07:00
|
|
|
require("user.comment")
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"lukas-reineke/indent-blankline.nvim",
|
|
|
|
event = "BufRead",
|
2023-11-13 18:58:40 +07:00
|
|
|
opts = {
|
|
|
|
indent = {
|
|
|
|
char = "│",
|
|
|
|
tab_char = "│",
|
|
|
|
},
|
|
|
|
scope = { enabled = false },
|
|
|
|
exclude = {
|
|
|
|
filetypes = {
|
|
|
|
"help",
|
|
|
|
"alpha",
|
|
|
|
"dashboard",
|
|
|
|
"neo-tree",
|
|
|
|
"Trouble",
|
|
|
|
"trouble",
|
|
|
|
"lazy",
|
|
|
|
"mason",
|
|
|
|
"notify",
|
|
|
|
"toggleterm",
|
|
|
|
"lazyterm",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
main = "ibl",
|
2023-02-05 09:09:33 +07:00
|
|
|
},
|
2023-11-13 18:58:40 +07:00
|
|
|
-- styleing indent
|
|
|
|
-- {
|
|
|
|
-- "lukas-reineke/indent-blankline.nvim",
|
|
|
|
-- event = "BufRead",
|
|
|
|
-- config = function()
|
|
|
|
-- require("user.indentline")
|
|
|
|
-- -- require("ibl").setup()
|
|
|
|
-- end,
|
|
|
|
-- },
|
2023-02-05 09:09:33 +07:00
|
|
|
-- for Speed up loading Lua modules in Neovim to improve startup time.
|
2023-02-04 13:57:50 +07:00
|
|
|
{
|
|
|
|
"lewis6991/impatient.nvim",
|
2023-10-01 09:22:01 +07:00
|
|
|
event = "BufWinEnter",
|
2023-02-09 13:22:54 +07:00
|
|
|
config = function()
|
2023-02-04 13:57:50 +07:00
|
|
|
require("user.impatient")
|
|
|
|
end,
|
|
|
|
},
|
2023-01-21 11:01:35 +07:00
|
|
|
-- for live server html,css,js
|
2023-06-12 07:11:47 +07:00
|
|
|
-- {
|
|
|
|
-- "manzeloth/live-server",
|
|
|
|
-- cmd = { "LiveServer" },
|
|
|
|
-- event = "BufRead",
|
|
|
|
-- build = "npm install -g live-server",
|
|
|
|
-- },
|
2023-01-21 11:01:35 +07:00
|
|
|
-- for multi cursor select
|
2023-12-30 09:46:28 +07:00
|
|
|
{ "mg979/vim-visual-multi", event = "BufWinEnter" },
|
2023-01-21 11:01:35 +07:00
|
|
|
-- for auto close tag
|
2023-02-20 23:04:23 +07:00
|
|
|
{
|
|
|
|
"windwp/nvim-ts-autotag",
|
2024-02-26 08:10:39 +07:00
|
|
|
-- event = "BufWinEnter",
|
|
|
|
event = "BufRead",
|
2023-02-20 23:04:23 +07:00
|
|
|
dependencies = "nvim-treesitter/nvim-treesitter",
|
|
|
|
config = function()
|
|
|
|
require("nvim-ts-autotag").setup()
|
|
|
|
end,
|
|
|
|
},
|
2023-01-21 11:01:35 +07:00
|
|
|
-- for auto detection file and run code
|
2023-01-15 00:17:41 +07:00
|
|
|
{
|
|
|
|
"CRAG666/code_runner.nvim",
|
2023-09-27 12:12:53 +07:00
|
|
|
event = "InsertEnter",
|
2023-02-11 09:41:39 +07:00
|
|
|
-- dependencies = "nvim-lua/plenary.nvim",
|
2023-01-15 00:17:41 +07:00
|
|
|
cmd = { "RunCode", "RunFile", "RunProject", "RunClose" },
|
|
|
|
config = function()
|
|
|
|
require("user.coderunner")
|
|
|
|
end,
|
|
|
|
},
|
2023-01-21 11:01:35 +07:00
|
|
|
-- for color view
|
2023-01-15 00:17:41 +07:00
|
|
|
{
|
|
|
|
"NvChad/nvim-colorizer.lua",
|
2023-02-09 13:22:54 +07:00
|
|
|
event = "BufRead",
|
2023-01-15 00:17:41 +07:00
|
|
|
opts = function()
|
|
|
|
require("user.colorizer")
|
|
|
|
end,
|
|
|
|
},
|
2023-01-21 11:01:35 +07:00
|
|
|
-- for winbar icon
|
2023-01-15 00:17:41 +07:00
|
|
|
{
|
|
|
|
"SmiteshP/nvim-navic",
|
|
|
|
dependencies = "neovim/nvim-lspconfig",
|
2023-09-08 19:47:20 +07:00
|
|
|
event = "InsertEnter",
|
2023-01-15 00:17:41 +07:00
|
|
|
config = function()
|
|
|
|
require("user.breadcrumb")
|
|
|
|
require("user.winbar")
|
|
|
|
end,
|
|
|
|
},
|
2023-01-21 11:01:35 +07:00
|
|
|
-- for popup alert
|
2023-01-15 00:17:41 +07:00
|
|
|
{
|
|
|
|
"rcarriga/nvim-notify",
|
2023-11-06 08:39:23 +07:00
|
|
|
event = "BufWinEnter",
|
2023-03-08 06:31:31 +07:00
|
|
|
keys = {
|
|
|
|
{
|
|
|
|
"<leader>un",
|
|
|
|
function()
|
|
|
|
require("notify").dismiss({ silent = true, pending = true })
|
|
|
|
end,
|
|
|
|
desc = "Delete all Notifications",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
opts = {
|
|
|
|
timeout = 3000,
|
|
|
|
max_height = function()
|
|
|
|
return math.floor(vim.o.lines * 0.75)
|
|
|
|
end,
|
|
|
|
max_width = function()
|
|
|
|
return math.floor(vim.o.columns * 0.75)
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
-- event = "BufWinEnter",
|
2023-04-17 13:48:54 +07:00
|
|
|
config = function()
|
2023-01-28 12:19:19 +07:00
|
|
|
local notify = require("notify")
|
|
|
|
-- this for transparency
|
|
|
|
notify.setup({ background_colour = "#000000" })
|
|
|
|
-- this overwrites the vim notify function
|
|
|
|
vim.notify = notify.notify
|
2023-01-15 00:17:41 +07:00
|
|
|
end,
|
|
|
|
},
|
2023-01-21 11:01:35 +07:00
|
|
|
-- for resize screen
|
2023-01-15 00:17:41 +07:00
|
|
|
{
|
|
|
|
"mrjones2014/smart-splits.nvim",
|
2023-04-17 13:48:54 +07:00
|
|
|
event = "BufRead",
|
2023-01-15 00:17:41 +07:00
|
|
|
config = function()
|
|
|
|
require("user.smartspit")
|
|
|
|
end,
|
|
|
|
},
|
2023-01-21 11:01:35 +07:00
|
|
|
-- for popup input
|
2023-01-15 00:17:41 +07:00
|
|
|
{
|
|
|
|
"stevearc/dressing.nvim",
|
2023-03-08 06:31:31 +07:00
|
|
|
lazy = true,
|
|
|
|
init = function()
|
|
|
|
---@diagnostic disable-next-line: duplicate-set-field
|
|
|
|
vim.ui.select = function(...)
|
|
|
|
require("lazy").load({ plugins = { "dressing.nvim" } })
|
|
|
|
return vim.ui.select(...)
|
|
|
|
end
|
|
|
|
---@diagnostic disable-next-line: duplicate-set-field
|
|
|
|
vim.ui.input = function(...)
|
|
|
|
require("lazy").load({ plugins = { "dressing.nvim" } })
|
|
|
|
return vim.ui.input(...)
|
|
|
|
end
|
2023-01-15 00:17:41 +07:00
|
|
|
end,
|
2023-03-08 06:31:31 +07:00
|
|
|
}, -- mini scrollview
|
2023-01-15 00:17:41 +07:00
|
|
|
{
|
|
|
|
"karb94/neoscroll.nvim",
|
2023-09-27 12:12:53 +07:00
|
|
|
event = "InsertEnter",
|
2023-01-15 00:17:41 +07:00
|
|
|
config = function()
|
|
|
|
require("user.neoscroll")
|
|
|
|
end,
|
|
|
|
},
|
2023-01-15 00:22:51 +07:00
|
|
|
{
|
2023-01-15 00:17:41 +07:00
|
|
|
"dstein64/nvim-scrollview",
|
|
|
|
event = "BufRead",
|
|
|
|
config = function()
|
|
|
|
require("user.nvimscroll")
|
|
|
|
end,
|
|
|
|
},
|
2023-01-21 11:01:35 +07:00
|
|
|
-- for check startuptime
|
2023-09-08 19:47:20 +07:00
|
|
|
{ "dstein64/vim-startuptime", cmd = "StartupTime", event = "InsertEnter" },
|
2023-01-21 11:01:35 +07:00
|
|
|
-- for coloring pairs
|
2023-11-01 10:36:43 +07:00
|
|
|
-- remark 20231101 - menyebabkan error treesitter
|
|
|
|
-- {
|
|
|
|
-- "p00f/nvim-ts-rainbow",
|
|
|
|
-- event = "BufRead",
|
|
|
|
-- dependencies = "nvim-treesitter/nvim-treesitter",
|
|
|
|
-- },
|
2023-02-05 09:09:33 +07:00
|
|
|
-- for git
|
2023-11-01 10:36:43 +07:00
|
|
|
{ "HiPhish/nvim-ts-rainbow2", event = "BufRead", dependencies = "nvim-treesitter/nvim-treesitter" },
|
2023-01-15 00:17:41 +07:00
|
|
|
{
|
|
|
|
"lewis6991/gitsigns.nvim",
|
2023-01-17 13:36:46 +07:00
|
|
|
enabled = vim.fn.executable("git") == 1,
|
2023-01-15 00:17:41 +07:00
|
|
|
ft = "gitcommit",
|
2023-02-15 06:38:29 +07:00
|
|
|
event = "BufRead",
|
2023-01-15 00:17:41 +07:00
|
|
|
config = function()
|
|
|
|
require("user.gitsigns")
|
|
|
|
end,
|
2023-01-15 00:22:51 +07:00
|
|
|
},
|
2023-03-08 06:31:31 +07:00
|
|
|
-- remove duplicate
|
2023-09-08 19:47:20 +07:00
|
|
|
{ "tpope/vim-repeat", event = "InsertEnter" },
|
2023-01-15 00:22:51 +07:00
|
|
|
}
|