From a2e62bb9f4e9c98c2b4500f22c9192a2bb4417b9 Mon Sep 17 00:00:00 2001 From: asep komarudin Date: Sat, 4 Feb 2023 13:57:50 +0700 Subject: [PATCH] update plugin --- lazy-lock.json | 9 - lua/plugins/coding.lua | 123 ---- lua/plugins/init.lua | 288 +++++---- lua/plugins/treesitter_20230115.lua | 62 -- lua/plugins_20230204/coding.lua | 123 ++++ lua/plugins_20230204/init.lua | 600 +++++++++++++++++++ lua/plugins_20230204/treesitter_20230115.lua | 62 ++ 7 files changed, 945 insertions(+), 322 deletions(-) delete mode 100644 lua/plugins/coding.lua delete mode 100644 lua/plugins/treesitter_20230115.lua create mode 100644 lua/plugins_20230204/coding.lua create mode 100644 lua/plugins_20230204/init.lua create mode 100644 lua/plugins_20230204/treesitter_20230115.lua diff --git a/lazy-lock.json b/lazy-lock.json index 4de9b1d..d22afdd 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -26,13 +26,8 @@ "mason-lspconfig.nvim": { "branch": "main", "commit": "53f3a8bdcb77d4a95b082fd57e12173f353c6c3e" }, "mason-null-ls.nvim": { "branch": "main", "commit": "13c6ab4a4f810cbbb1799a9cf4d4a27fd862d885" }, "mason.nvim": { "branch": "main", "commit": "c2002d7a6b5a72ba02388548cfaf420b864fbc12" }, - "mini.ai": { "branch": "main", "commit": "14a1382372195573c6c7f494ab8bb298b03e6f04" }, - "mini.comment": { "branch": "main", "commit": "e5294cc3e75bafb2369f235d31a98b01a9cc67ad" }, "mini.indentscope": { "branch": "main", "commit": "3a517f11aa9d1434c4cdba1a807df4e5ca42d3ea" }, - "mini.pairs": { "branch": "main", "commit": "fec9aba50912d8c3d92d07d6a77952de84f8d7ad" }, - "mini.surround": { "branch": "main", "commit": "df41f1c009afbb3eef39d979977fb14404576f9b" }, "neoscroll.nvim": { "branch": "master", "commit": "d7601c26c8a183fa8994ed339e70c2d841253e93" }, - "nord-vim": { "branch": "main", "commit": "2272dcf8ef7d6c1f13a5a1a86a23906dc0c6b39e" }, "nui.nvim": { "branch": "main", "commit": "d147222a1300901656f3ebd5b95f91732785a329" }, "null-ls.nvim": { "branch": "main", "commit": "c0c19f32b614b3921e17886c541c13a72748d450" }, "nvim-autopairs": { "branch": "master", "commit": "4fc96c8f3df89b6d23e5092d31c866c53a346347" }, @@ -45,14 +40,10 @@ "nvim-scrollview": { "branch": "main", "commit": "ba6c48bf7919dd48a371e7b9c683b8858053e885" }, "nvim-tree.lua": { "branch": "master", "commit": "7282f7de8aedf861fe0162a559fc2b214383c51c" }, "nvim-treesitter": { "branch": "master", "commit": "8e763332b7bf7b3a426fd8707b7f5aa85823a5ac" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "249d90a84df63f3ffff65fcc06a45d58415672de" }, "nvim-ts-autotag": { "branch": "main", "commit": "fdefe46c6807441460f11f11a167a2baf8e4534b" }, - "nvim-ts-context-commentstring": { "branch": "main", "commit": "a0f89563ba36b3bacd62cf967b46beb4c2c29e52" }, "nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" }, "nvim-web-devicons": { "branch": "master", "commit": "563f3635c2d8a7be7933b9e547f7c178ba0d4352" }, - "onedark.nvim": { "branch": "master", "commit": "f0a70e0993acbb348c32a52a88058cc60c160992" }, "plenary.nvim": { "branch": "master", "commit": "4b7e52044bbb84242158d977a50c4cbcd85070c7" }, - "project.nvim": { "branch": "main", "commit": "628de7e433dd503e782831fe150bb750e56e55d6" }, "smart-splits.nvim": { "branch": "master", "commit": "fdd158ce7554dc830fb86e0fe952cd9476cdf726" }, "telescope.nvim": { "branch": "master", "commit": "76ea9a898d3307244dce3573392dcf2cc38f340f" }, "todo-comments.nvim": { "branch": "main", "commit": "077c59586d9d0726b0696dc5680eb863f4e04bc5" }, diff --git a/lua/plugins/coding.lua b/lua/plugins/coding.lua deleted file mode 100644 index c525e26..0000000 --- a/lua/plugins/coding.lua +++ /dev/null @@ -1,123 +0,0 @@ -return { - -- snippets - { - "L3MON4D3/LuaSnip", - dependencies = { - "rafamadriz/friendly-snippets", - config = function() - require("luasnip.loaders.from_vscode").lazy_load() - end, - }, - opts = { - history = true, - delete_check_events = "TextChanged", - }, - -- stylua: ignore - keys = { - { - "", - function() - return require("luasnip").jumpable(1) and "luasnip-jump-next" or "" - end, - expr = true, silent = true, mode = "i", - }, - { "", function() require("luasnip").jump(1) end, mode = "s" }, - { "", function() require("luasnip").jump(-1) end, mode = { "i", "s" } }, - }, - }, - - -- auto completion - { - "hrsh7th/nvim-cmp", - event = "InsertEnter", - dependencies = { - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-path", - "saadparwaiz1/cmp_luasnip", - }, - }, - - -- auto pairs - { - "echasnovski/mini.pairs", - event = "VeryLazy", - config = function(_, opts) - require("mini.pairs").setup(opts) - end, - }, - - -- surround - { - "echasnovski/mini.surround", - keys = { "gz" }, - opts = { - mappings = { - add = "gza", -- Add surrounding in Normal and Visual modes - delete = "gzd", -- Delete surrounding - find = "gzf", -- Find surrounding (to the right) - find_left = "gzF", -- Find surrounding (to the left) - highlight = "gzh", -- Highlight surrounding - replace = "gzr", -- Replace surrounding - update_n_lines = "gzn", -- Update `n_lines` - }, - }, - config = function(_, opts) - -- use gz mappings instead of s to prevent conflict with leap - require("mini.surround").setup(opts) - end, - }, - - -- comments - { "JoosepAlviste/nvim-ts-context-commentstring" }, - { - "echasnovski/mini.comment", - event = "VeryLazy", - opts = { - hooks = { - pre = function() - require("ts_context_commentstring.internal").update_commentstring({}) - end, - }, - }, - config = function(_, opts) - require("mini.comment").setup(opts) - end, - }, - - -- better text-objects - { - "echasnovski/mini.ai", - keys = { - { "a", mode = { "x", "o" } }, - { "i", mode = { "x", "o" } }, - }, - dependencies = { - { - "nvim-treesitter/nvim-treesitter-textobjects", - init = function() - -- no need to load the plugin, since we only need its queries - require("lazy.core.loader").disable_rtp_plugin("nvim-treesitter-textobjects") - end, - }, - }, - opts = function() - local ai = require("mini.ai") - return { - n_lines = 500, - custom_textobjects = { - o = ai.gen_spec.treesitter({ - a = { "@block.outer", "@conditional.outer", "@loop.outer" }, - i = { "@block.inner", "@conditional.inner", "@loop.inner" }, - }, {}), - f = ai.gen_spec.treesitter({ a = "@function.outer", i = "@function.inner" }, {}), - c = ai.gen_spec.treesitter({ a = "@class.outer", i = "@class.inner" }, {}), - }, - } - end, - config = function(_, opts) - local ai = require("mini.ai") - ai.setup(opts) - end, - }, -} diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index c85df8e..5223024 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -20,15 +20,15 @@ return { end end, }, - { - "navarasu/onedark.nvim", - init = function() - require("user.onedark") - require("onedark").load() - end, - }, + -- { + -- "navarasu/onedark.nvim", + -- init = function() + -- require("user.onedark") + -- require("onedark").load() + -- end, + -- }, -- { "lunarvim/lunar.nvim" }, - { "arcticicestudio/nord-vim" }, + -- { "arcticicestudio/nord-vim" }, -- { -- "catppuccin/nvim", -- name = "catppuccin", @@ -68,37 +68,54 @@ return { -- end, -- }, - -- dashboard + -- include treesitter + -- require("plugins.treesitter"), { - "goolord/alpha-nvim", - commit = "0bb6fc0646bcd1cdb4639737a1cee8d6e08bcc31", - module = "alpha", - event = "BufWinEnter", - config = function() - require("user.alpha") - end, - }, - -- line info bootom - { - "nvim-lualine/lualine.nvim", - commit = "a52f078026b27694d2290e34efa61a6e4a690621", - dependencies = { "kyazdani42/nvim-web-devicons", opt = true }, + "nvim-treesitter/nvim-treesitter", + commit = "8e763332b7bf7b3a426fd8707b7f5aa85823a5ac", + run = ":TSUpdate", event = "BufWinEnter", opts = function() - local model = 2 - if model == 1 then - require("user.lualine1") - elseif model == 2 then - require("user.lualine2") - else - require("user.lualine") - end + require("user.treesitter") end, }, - { "rafamadriz/friendly-snippets", event = "VeryLazy" }, + -- snippets + { + "L3MON4D3/LuaSnip", + dependencies = { + "rafamadriz/friendly-snippets", + config = function() + require("luasnip.loaders.from_vscode").lazy_load() + end, + }, + opts = { + history = true, + delete_check_events = "TextChanged", + }, + -- stylua: ignore + keys = { + { + "", + function() + return require("luasnip").jumpable(1) and "luasnip-jump-next" or "" + end, + expr = true, silent = true, mode = "i", + }, + { "", function() require("luasnip").jump(1) end, mode = "s" }, + { "", function() require("luasnip").jump(-1) end, mode = { "i", "s" } }, + }, + }, + + -- auto completion { "hrsh7th/nvim-cmp", - dependencies = "rafamadriz/friendly-snippets", + event = "InsertEnter", + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + "saadparwaiz1/cmp_luasnip", + }, opts = function() require("user.cmp") end, @@ -120,67 +137,6 @@ return { require("user.comment") end, }, - -- include treesitter - -- require("plugins.treesitter"), - { - "nvim-treesitter/nvim-treesitter", - commit = "8e763332b7bf7b3a426fd8707b7f5aa85823a5ac", - run = ":TSUpdate", - event = "BufWinEnter", - opts = function() - require("user.treesitter") - end, - }, - -- for show icon - { - "kyazdani42/nvim-web-devicons", - commit = "563f3635c2d8a7be7933b9e547f7c178ba0d4352", - event = "VeryLazy", - config = function() - require("user.webdevicons") - end, - }, - -- for tree exploler - { - "kyazdani42/nvim-tree.lua", - commit = "7282f7de8aedf861fe0162a559fc2b214383c51c", - event = "BufWinEnter", - cmd = "NvimTreeToggle", - dependencies = "kyazdani42/nvim-web-devicons", - init = function() - require("user.nvim-tree") - end, - }, - -- for file tab - { - "akinsho/bufferline.nvim", - commit = "83bf4dc7bff642e145c8b4547aa596803a8b4dc4", - dependencies = { "kyazdani42/nvim-web-devicons", "famiu/bufdelete.nvim" }, - event = "VeryLazy", - -- config = function() - -- require("user.bufferline") - -- end, - }, - { "moll/vim-bbye", commit = "25ef93ac5a87526111f43e5110675032dbcacf56", event = "VeryLazy" }, - -- for view terminal - { - "akinsho/toggleterm.nvim", - commit = "2a787c426ef00cb3488c11b14f5dcf892bbd0bda", - cmd = "Toggleterm", - event = "BufWinEnter", - init = function() - require("user.toggleterm") - end, - }, - { "ahmedkhalf/project.nvim", commit = "628de7e433dd503e782831fe150bb750e56e55d6", event = "VeryLazy" }, - { - "lewis6991/impatient.nvim", - commit = "b842e16ecc1a700f62adb9802f8355b99b52a5a6", - event = "VeryLazy", - init = function() - require("user.impatient") - end, - }, -- styleing indent { "lukas-reineke/indent-blankline.nvim", @@ -190,15 +146,6 @@ return { require("user.indentline") end, }, - -- key mapping - { - "folke/which-key.nvim", - event = "BufWinEnter", - init = function() - require("user.whichkey") - end, - }, - -- start programming { "hrsh7th/cmp-buffer", event = "VeryLazy", @@ -252,8 +199,118 @@ return { require("user.mason-null-ls") end, }, + -- debuging + { + "mfussenegger/nvim-dap", + event = "VeryLazy", + enabled = vim.fn.has("win32") == 0, + }, + { + "rcarriga/nvim-dap-ui", + dependencies = "mfussenegger/nvim-dap", + enabled = vim.fn.has("win32") == 0, + config = function() + require("user.dapui") + end, + }, + { + "jayp0521/mason-nvim-dap.nvim", + event = "VeryLazy", + dependencies = { "williamboman/mason.nvim", "mfussenegger/nvim-dap" }, + enabled = vim.fn.has("win32") == 0, + init = function() + require("user.mason_dap") + end, + }, + -- for install only java support windows + { "williamboman/nvim-lsp-installer", event = "VeryLazy" }, + -- dashboard + { + "goolord/alpha-nvim", + commit = "0bb6fc0646bcd1cdb4639737a1cee8d6e08bcc31", + module = "alpha", + event = "BufWinEnter", + config = function() + require("user.alpha") + end, + }, + -- line info bootom + { + "nvim-lualine/lualine.nvim", + commit = "a52f078026b27694d2290e34efa61a6e4a690621", + dependencies = { "kyazdani42/nvim-web-devicons", opt = true }, + event = "BufWinEnter", + opts = function() + local model = 2 + if model == 1 then + require("user.lualine1") + elseif model == 2 then + require("user.lualine2") + else + require("user.lualine") + end + end, + }, + -- for show icon + { + "kyazdani42/nvim-web-devicons", + commit = "563f3635c2d8a7be7933b9e547f7c178ba0d4352", + event = "VeryLazy", + config = function() + require("user.webdevicons") + end, + }, + -- for tree exploler + { + "kyazdani42/nvim-tree.lua", + commit = "7282f7de8aedf861fe0162a559fc2b214383c51c", + event = "BufWinEnter", + cmd = "NvimTreeToggle", + dependencies = "kyazdani42/nvim-web-devicons", + init = function() + require("user.nvim-tree") + end, + }, + -- for file tab + { + "akinsho/bufferline.nvim", + commit = "83bf4dc7bff642e145c8b4547aa596803a8b4dc4", + dependencies = { "kyazdani42/nvim-web-devicons", "famiu/bufdelete.nvim" }, + event = "VeryLazy", + -- config = function() + -- require("user.bufferline") + -- end, + }, + { "moll/vim-bbye", commit = "25ef93ac5a87526111f43e5110675032dbcacf56", event = "VeryLazy" }, + -- for view terminal + { + "akinsho/toggleterm.nvim", + commit = "2a787c426ef00cb3488c11b14f5dcf892bbd0bda", + cmd = "Toggleterm", + event = "BufWinEnter", + init = function() + require("user.toggleterm") + end, + }, + -- { "ahmedkhalf/project.nvim", commit = "628de7e433dd503e782831fe150bb750e56e55d6", event = "VeryLazy" }, + { + "lewis6991/impatient.nvim", + commit = "b842e16ecc1a700f62adb9802f8355b99b52a5a6", + event = "VeryLazy", + init = function() + require("user.impatient") + end, + }, + -- key mapping + { + "folke/which-key.nvim", + event = "BufWinEnter", + init = function() + require("user.whichkey") + end, + }, -- include for coding - require("plugins.coding"), + -- require("plugins.coding"), -- extra plugins -- for search { @@ -304,8 +361,6 @@ return { require("user.colorizer") end, }, - -- for install only java support windows - { "williamboman/nvim-lsp-installer", event = "VeryLazy" }, -- for winbar icon { "SmiteshP/nvim-navic", @@ -488,29 +543,6 @@ return { ft = { "markdown" }, cmd = { "MarkdownPreview", "MarkdownPreviewStop", "MarkdownPreviewToggle" }, }, - -- debuging - { - "mfussenegger/nvim-dap", - event = "VeryLazy", - enabled = vim.fn.has("win32") == 0, - }, - { - "rcarriga/nvim-dap-ui", - dependencies = "mfussenegger/nvim-dap", - enabled = vim.fn.has("win32") == 0, - config = function() - require("user.dapui") - end, - }, - { - "jayp0521/mason-nvim-dap.nvim", - event = "VeryLazy", - dependencies = { "williamboman/mason.nvim", "mfussenegger/nvim-dap" }, - enabled = vim.fn.has("win32") == 0, - init = function() - require("user.mason_dap") - end, - }, -- for codeGPT { "jackMort/ChatGPT.nvim", diff --git a/lua/plugins/treesitter_20230115.lua b/lua/plugins/treesitter_20230115.lua deleted file mode 100644 index 5a32e2b..0000000 --- a/lua/plugins/treesitter_20230115.lua +++ /dev/null @@ -1,62 +0,0 @@ -return { - { - "nvim-treesitter/nvim-treesitter", - -- build = ":TSUpdate", - -- event = "BufReadPost", - ---@type TSConfig - opts = { - sync_install = false, - highlight = { enable = true }, - autopairs = { - enable = true, - }, - indent = { enable = true, disable = { "python", "css" } }, - autotag = { enable = true }, - incremental_selection = { enable = true }, - rainbow = { - enable = true, - disable = { "html" }, - extended_mode = false, - max_file_lines = nil, - }, - context_commentstring = { - enable = true, - enable_autocmd = false, - config = { - -- Languages that have a single comment style - typescript = "// %s", - css = "/* %s */", - scss = "/* %s */", - html = "", - svelte = "", - vue = "", - json = "", - }, - }, - ensure_installed = { - "bash", - "html", - -- "c", - -- "javascript", - -- "json", - -- "lua", - -- "python", - -- "typescript", - -- "tsx", - -- "css", - -- "rust", - -- "java", - -- "yaml", - -- "markdown", - -- "markdown_inline", - }, - }, - ---@param opts TSConfig - config = function(plugin, opts) - if plugin.ensure_installed then - require("lazyvim.util").deprecate("treesitter.ensure_installed", "treesitter.opts.ensure_installed") - end - require("nvim-treesitter.configs").setup(opts) - end, - }, - } \ No newline at end of file diff --git a/lua/plugins_20230204/coding.lua b/lua/plugins_20230204/coding.lua new file mode 100644 index 0000000..4262fd1 --- /dev/null +++ b/lua/plugins_20230204/coding.lua @@ -0,0 +1,123 @@ +-- return { +-- -- snippets +-- { +-- "L3MON4D3/LuaSnip", +-- dependencies = { +-- "rafamadriz/friendly-snippets", +-- config = function() +-- require("luasnip.loaders.from_vscode").lazy_load() +-- end, +-- }, +-- opts = { +-- history = true, +-- delete_check_events = "TextChanged", +-- }, +-- -- stylua: ignore +-- keys = { +-- { +-- "", +-- function() +-- return require("luasnip").jumpable(1) and "luasnip-jump-next" or "" +-- end, +-- expr = true, silent = true, mode = "i", +-- }, +-- { "", function() require("luasnip").jump(1) end, mode = "s" }, +-- { "", function() require("luasnip").jump(-1) end, mode = { "i", "s" } }, +-- }, +-- }, +-- +-- -- auto completion +-- { +-- "hrsh7th/nvim-cmp", +-- event = "InsertEnter", +-- dependencies = { +-- "hrsh7th/cmp-nvim-lsp", +-- "hrsh7th/cmp-buffer", +-- "hrsh7th/cmp-path", +-- "saadparwaiz1/cmp_luasnip", +-- }, +-- }, +-- +-- -- auto pairs +-- { +-- "echasnovski/mini.pairs", +-- event = "VeryLazy", +-- config = function(_, opts) +-- require("mini.pairs").setup(opts) +-- end, +-- }, +-- +-- -- surround +-- { +-- "echasnovski/mini.surround", +-- keys = { "gz" }, +-- opts = { +-- mappings = { +-- add = "gza", -- Add surrounding in Normal and Visual modes +-- delete = "gzd", -- Delete surrounding +-- find = "gzf", -- Find surrounding (to the right) +-- find_left = "gzF", -- Find surrounding (to the left) +-- highlight = "gzh", -- Highlight surrounding +-- replace = "gzr", -- Replace surrounding +-- update_n_lines = "gzn", -- Update `n_lines` +-- }, +-- }, +-- config = function(_, opts) +-- -- use gz mappings instead of s to prevent conflict with leap +-- require("mini.surround").setup(opts) +-- end, +-- }, +-- +-- -- comments +-- { "JoosepAlviste/nvim-ts-context-commentstring" }, +-- { +-- "echasnovski/mini.comment", +-- event = "VeryLazy", +-- opts = { +-- hooks = { +-- pre = function() +-- require("ts_context_commentstring.internal").update_commentstring({}) +-- end, +-- }, +-- }, +-- config = function(_, opts) +-- require("mini.comment").setup(opts) +-- end, +-- }, +-- +-- -- better text-objects +-- { +-- "echasnovski/mini.ai", +-- keys = { +-- { "a", mode = { "x", "o" } }, +-- { "i", mode = { "x", "o" } }, +-- }, +-- dependencies = { +-- { +-- "nvim-treesitter/nvim-treesitter-textobjects", +-- init = function() +-- -- no need to load the plugin, since we only need its queries +-- require("lazy.core.loader").disable_rtp_plugin("nvim-treesitter-textobjects") +-- end, +-- }, +-- }, +-- opts = function() +-- local ai = require("mini.ai") +-- return { +-- n_lines = 500, +-- custom_textobjects = { +-- o = ai.gen_spec.treesitter({ +-- a = { "@block.outer", "@conditional.outer", "@loop.outer" }, +-- i = { "@block.inner", "@conditional.inner", "@loop.inner" }, +-- }, {}), +-- f = ai.gen_spec.treesitter({ a = "@function.outer", i = "@function.inner" }, {}), +-- c = ai.gen_spec.treesitter({ a = "@class.outer", i = "@class.inner" }, {}), +-- }, +-- } +-- end, +-- config = function(_, opts) +-- local ai = require("mini.ai") +-- ai.setup(opts) +-- end, +-- }, +-- } diff --git a/lua/plugins_20230204/init.lua b/lua/plugins_20230204/init.lua new file mode 100644 index 0000000..373874d --- /dev/null +++ b/lua/plugins_20230204/init.lua @@ -0,0 +1,600 @@ +return { + { + "nvim-lua/plenary.nvim", + commit = "4b7e52044bbb84242158d977a50c4cbcd85070c7", + event = "BufWinEnter", + module = "plenary", + }, + -- color scheme + { + "folke/tokyonight.nvim", + commit = "66bfc2e8f754869c7b651f3f47a2ee56ae557764", + lazy = false, -- make sure we load this during startup if it is your main colorscheme + priority = 1000, -- make sure to load this before all the other start plugins + config = function() + local is_transparant = false + if is_transparant then + require("user.tokyonight_transparant") + else + require("user.tokyonight") + end + end, + }, + { + "navarasu/onedark.nvim", + init = function() + require("user.onedark") + require("onedark").load() + end, + }, + -- { "lunarvim/lunar.nvim" }, + { "arcticicestudio/nord-vim" }, + -- { + -- "catppuccin/nvim", + -- name = "catppuccin", + -- init = function() + -- require("user.catppuccin") + -- end, + -- }, + -- { + -- "ellisonleao/gruvbox.nvim", + -- init = function() + -- require("gruvbox").setup({ + -- undercurl = true, + -- underline = true, + -- bold = true, + -- italic = true, + -- strikethrough = true, + -- invert_selection = false, + -- invert_signs = false, + -- invert_tabline = false, + -- invert_intend_guides = false, + -- inverse = true, -- invert background for search, diffs, statuslines and errors + -- contrast = "", -- can be "hard", "soft" or empty string + -- palette_overrides = {}, + -- overrides = {}, + -- dim_inactive = false, + -- transparent_mode = false, + -- }) + -- vim.o.background = "dark" -- or "light" for light mode + -- end, + -- }, + -- { "sainnhe/sonokai" }, + -- { "EdenEast/nightfox.nvim" }, + -- { + -- "marko-cerovac/material.nvim", + -- init = function() + -- vim.g.material_style = "darker" + -- end, + -- }, + + -- include treesitter + -- require("plugins.treesitter"), + { + "nvim-treesitter/nvim-treesitter", + commit = "8e763332b7bf7b3a426fd8707b7f5aa85823a5ac", + run = ":TSUpdate", + event = "BufWinEnter", + opts = function() + require("user.treesitter") + end, + }, + -- snippets + { + "L3MON4D3/LuaSnip", + dependencies = { + "rafamadriz/friendly-snippets", + config = function() + require("luasnip.loaders.from_vscode").lazy_load() + end, + }, + opts = { + history = true, + delete_check_events = "TextChanged", + }, + -- stylua: ignore + keys = { + { + "", + function() + return require("luasnip").jumpable(1) and "luasnip-jump-next" or "" + end, + expr = true, silent = true, mode = "i", + }, + { "", function() require("luasnip").jump(1) end, mode = "s" }, + { "", function() require("luasnip").jump(-1) end, mode = { "i", "s" } }, + }, + }, + + -- auto completion + { + "hrsh7th/nvim-cmp", + event = "InsertEnter", + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + "saadparwaiz1/cmp_luasnip", + }, + opts = function() + require("user.cmp") + end, + }, + { + "windwp/nvim-autopairs", + commit = "4fc96c8f3df89b6d23e5092d31c866c53a346347", + dependencies = "hrsh7th/nvim-cmp", + event = "VeryLazy", + init = function() + require("user.autopairs") + end, + }, + { + "numToStr/Comment.nvim", + commit = "97a188a98b5a3a6f9b1b850799ac078faa17ab67", + event = "InsertEnter", + init = function() + require("user.comment") + end, + }, + -- styleing indent + { + "lukas-reineke/indent-blankline.nvim", + commit = "db7cbcb40cc00fc5d6074d7569fb37197705e7f6", + event = "BufRead", + init = function() + require("user.indentline") + end, + }, + { + "hrsh7th/cmp-buffer", + event = "VeryLazy", + commit = "3022dbc9166796b644a841a02de8dd1cc1d311fa", + dependencies = "hrsh7th/nvim-cmp", + }, + { + "hrsh7th/cmp-nvim-lua", + event = "VeryLazy", + commit = "d276254e7198ab7d00f117e88e223b4bd8c02d21", + dependencies = "hrsh7th/nvim-cmp", + }, + { + "neovim/nvim-lspconfig", + commit = "f11fdff7e8b5b415e5ef1837bdcdd37ea6764dda", + event = "BufWinEnter", + config = function() + require("user.lsp") + end, + }, + { + "williamboman/mason-lspconfig.nvim", + lazy = true, + }, + { + "williamboman/mason.nvim", + commit = "c2002d7a6b5a72ba02388548cfaf420b864fbc12", + 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, + }, + -- for formater linter + { "jose-elias-alvarez/null-ls.nvim", commit = "c0c19f32b614b3921e17886c541c13a72748d450", event = "VeryLazy" }, + { "RRethy/vim-illuminate", commit = "a2e8476af3f3e993bb0d6477438aad3096512e42", event = "VeryLazy" }, + { + "jayp0521/mason-null-ls.nvim", + dependencies = "jose-elias-alvarez/null-ls.nvim", + event = "BufRead", + opts = function() + require("user.mason-null-ls") + end, + }, + -- dashboard + { + "goolord/alpha-nvim", + commit = "0bb6fc0646bcd1cdb4639737a1cee8d6e08bcc31", + module = "alpha", + event = "BufWinEnter", + config = function() + require("user.alpha") + end, + }, + -- line info bootom + { + "nvim-lualine/lualine.nvim", + commit = "a52f078026b27694d2290e34efa61a6e4a690621", + dependencies = { "kyazdani42/nvim-web-devicons", opt = true }, + event = "BufWinEnter", + opts = function() + local model = 2 + if model == 1 then + require("user.lualine1") + elseif model == 2 then + require("user.lualine2") + else + require("user.lualine") + end + end, + }, + -- for show icon + { + "kyazdani42/nvim-web-devicons", + commit = "563f3635c2d8a7be7933b9e547f7c178ba0d4352", + event = "VeryLazy", + config = function() + require("user.webdevicons") + end, + }, + -- for tree exploler + { + "kyazdani42/nvim-tree.lua", + commit = "7282f7de8aedf861fe0162a559fc2b214383c51c", + event = "BufWinEnter", + cmd = "NvimTreeToggle", + dependencies = "kyazdani42/nvim-web-devicons", + init = function() + require("user.nvim-tree") + end, + }, + -- for file tab + { + "akinsho/bufferline.nvim", + commit = "83bf4dc7bff642e145c8b4547aa596803a8b4dc4", + dependencies = { "kyazdani42/nvim-web-devicons", "famiu/bufdelete.nvim" }, + event = "VeryLazy", + -- config = function() + -- require("user.bufferline") + -- end, + }, + { "moll/vim-bbye", commit = "25ef93ac5a87526111f43e5110675032dbcacf56", event = "VeryLazy" }, + -- for view terminal + { + "akinsho/toggleterm.nvim", + commit = "2a787c426ef00cb3488c11b14f5dcf892bbd0bda", + cmd = "Toggleterm", + event = "BufWinEnter", + init = function() + require("user.toggleterm") + end, + }, + { "ahmedkhalf/project.nvim", commit = "628de7e433dd503e782831fe150bb750e56e55d6", event = "VeryLazy" }, + { + "lewis6991/impatient.nvim", + commit = "b842e16ecc1a700f62adb9802f8355b99b52a5a6", + event = "VeryLazy", + init = function() + require("user.impatient") + end, + }, + -- key mapping + { + "folke/which-key.nvim", + event = "BufWinEnter", + init = function() + require("user.whichkey") + end, + }, + -- include for coding + -- require("plugins.coding"), + -- extra plugins + -- for search + { + "nvim-telescope/telescope.nvim", + event = "VeryLazy", + commit = "76ea9a898d3307244dce3573392dcf2cc38f340f", + dependencies = { { "nvim-lua/plenary.nvim" } }, + cmd = "Telescope", + init = function() + require("user.telescope") + end, + }, + -- for live server html,css,js + { "manzeloth/live-server", cmd = { "LiveServer" }, event = "VeryLazy" }, + -- for multi cursor select + { "mg979/vim-visual-multi", event = "BufWinEnter" }, + -- for auto close tag + { + "windwp/nvim-ts-autotag", + event = "VeryLazy", + dependencies = "nvim-treesitter/nvim-treesitter", + init = function() + require("nvim-ts-autotag").setup() + end, + }, + -- for auto detection file and run code + { + "CRAG666/code_runner.nvim", + event = "VeryLazy", + dependencies = "nvim-lua/plenary.nvim", + cmd = { "RunCode", "RunFile", "RunProject", "RunClose" }, + config = function() + require("user.coderunner") + end, + }, + { + "is0n/jaq-nvim", + event = "CursorHold", + config = function() + require("user.jaq") + end, + }, + -- for color view + { + "NvChad/nvim-colorizer.lua", + event = "VeryLazy", + opts = function() + require("user.colorizer") + end, + }, + -- for install only java support windows + { "williamboman/nvim-lsp-installer", event = "VeryLazy" }, + -- for winbar icon + { + "SmiteshP/nvim-navic", + dependencies = "neovim/nvim-lspconfig", + event = "BufRead", + config = function() + require("user.breadcrumb") + require("user.winbar") + end, + }, + -- for popup alert + { + "rcarriga/nvim-notify", + event = "BufRead", + config = function() + -- vim.notify = require("notify") -- ini jika tidak transparant + local notify = require("notify") + -- this for transparency + notify.setup({ background_colour = "#000000" }) + -- this overwrites the vim notify function + vim.notify = notify.notify + end, + }, + -- for resize screen + { + "mrjones2014/smart-splits.nvim", + event = "BufWinEnter", + config = function() + require("user.smartspit") + end, + }, + -- for popup input + { + "stevearc/dressing.nvim", + event = "BufWinEnter", + config = function() + require("user.dressing") + end, + }, + -- better todo coloring and icon + { + "folke/todo-comments.nvim", + event = "BufRead", + config = function() + require("todo-comments").setup() + end, + }, + -- mini scrollview + { + "karb94/neoscroll.nvim", + event = "WinScrolled", + config = function() + require("user.neoscroll") + end, + }, + { + "dstein64/nvim-scrollview", + event = "BufRead", + config = function() + require("user.nvimscroll") + end, + }, + -- auto complite commond mode + { + "gelguy/wilder.nvim", + event = "BufWinEnter", + config = function() + local wilder = require("wilder") + wilder.setup({ modes = { ":", "/", "?" } }) + -- *ini popup biasa + -- wilder.set_option( + -- "renderer", + -- wilder.popupmenu_renderer({ + -- highlighter = wilder.basic_highlighter(), + -- left = { " ", wilder.popupmenu_devicons() }, + -- right = { " ", wilder.popupmenu_scrollbar() }, + -- }) + -- ) + + -- *ini untuk border rounded + wilder.set_option( + "renderer", + wilder.popupmenu_renderer(wilder.popupmenu_border_theme({ + highlights = { + border = "Normal", -- highlight to use for the border + }, + -- 'single', 'double', 'rounded' or 'solid' + -- can also be a list of 8 characters, see :h wilder#popupmenu_border_theme() for more details + border = "rounded", + left = { " ", wilder.popupmenu_devicons() }, + right = { " ", wilder.popupmenu_scrollbar() }, + })) + ) + + -- *ini untuk popup dialog + -- wilder.set_option( + -- "renderer", + -- wilder.popupmenu_renderer(wilder.popupmenu_palette_theme({ + -- -- 'single', 'double', 'rounded' or 'solid' + -- -- can also be a list of 8 characters, see :h wilder#popupmenu_palette_theme() for more details + -- border = "rounded", + -- max_height = "40%", -- max height of the palette + -- max_width = "40%", + -- min_height = 0, -- set to the same as 'max_height' for a fixed height window + -- prompt_position = "top", -- 'top' or 'bottom' to set the location of the prompt + -- reverse = 0, -- set to 1 to reverse the order of the list, use in combination with 'prompt_position' + -- left = { " ", wilder.popupmenu_devicons() }, + -- right = { " ", wilder.popupmenu_scrollbar() }, + -- pumblend = 20, + -- })) + -- ) + end, + }, + -- for manage and coloring copy + { + "gbprod/yanky.nvim", + event = "BufRead", + config = function() + require("user.yanky") + end, + }, + -- for check startuptime + { "dstein64/vim-startuptime", cmd = "StartupTime", event = "VeryLazy" }, + -- for coloring pairs + { "p00f/nvim-ts-rainbow", event = "BufWinEnter", dependencies = "nvim-treesitter/nvim-treesitter" }, + { + "lewis6991/gitsigns.nvim", + commit = "2c6f96dda47e55fa07052ce2e2141e8367cbaaf2", + enabled = vim.fn.executable("git") == 1, + ft = "gitcommit", + event = "VeryLazy", + config = function() + require("user.gitsigns") + end, + }, + + -- additional new plugins + -- active indent guide and indent text objects + { + "echasnovski/mini.indentscope", + version = false, -- wait till new 0.7.0 release to put it back on semver + event = "BufReadPre", + opts = { + -- symbol = "▏", + symbol = "│", + options = { try_as_border = true }, + }, + config = function(_, opts) + vim.api.nvim_create_autocmd("FileType", { + pattern = { "help", "alpha", "dashboard", "neo-tree", "Trouble", "lazy", "mason" }, + callback = function() + vim.b.miniindentscope_disable = true + end, + }) + require("mini.indentscope").setup(opts) + end, + }, + -- makes some plugins dot-repeatable like leap + { "tpope/vim-repeat", event = "VeryLazy" }, + -- better diagnostics list and others + { + "folke/trouble.nvim", + event = "VeryLazy", + cmd = { "TroubleToggle", "Trouble" }, + opts = { use_diagnostic_signs = true }, + keys = { + { "xx", "TroubleToggle document_diagnostics", desc = "Document Diagnostics (Trouble)" }, + { "xX", "TroubleToggle workspace_diagnostics", desc = "Workspace Diagnostics (Trouble)" }, + }, + }, + -- for markdown preview + -- make sure already install npm and yarn + { + "iamcco/markdown-preview.nvim", + event = "VeryLazy", + build = "cd app && npm install", + init = function() + vim.g.mkdp_filetypes = { "markdown" } + end, + ft = { "markdown" }, + cmd = { "MarkdownPreview", "MarkdownPreviewStop", "MarkdownPreviewToggle" }, + }, + -- debuging + { + "mfussenegger/nvim-dap", + event = "VeryLazy", + enabled = vim.fn.has("win32") == 0, + }, + { + "rcarriga/nvim-dap-ui", + dependencies = "mfussenegger/nvim-dap", + enabled = vim.fn.has("win32") == 0, + config = function() + require("user.dapui") + end, + }, + { + "jayp0521/mason-nvim-dap.nvim", + event = "VeryLazy", + dependencies = { "williamboman/mason.nvim", "mfussenegger/nvim-dap" }, + enabled = vim.fn.has("win32") == 0, + init = function() + require("user.mason_dap") + end, + }, + -- for codeGPT + { + "jackMort/ChatGPT.nvim", + dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim", "nvim-telescope/telescope.nvim" }, + lazy = true, + event = "VeryLazy", + -- opts = function() + -- require("user.chat_gpt") + -- end, + }, + -- indent detection + { + "Darazaki/indent-o-matic", + event = "VeryLazy", + opt = true, + cmd = { "IndentOMatic" }, + config = function() + require("user.indent-o-matic") + end, + }, + -- Lsp Saga + -- { + -- "glepnir/lspsaga.nvim", + -- event = "BufRead", + -- config = function() + -- require("lspsaga").setup({}) + -- end, + -- dependencies = { { "kyazdani42/nvim-web-devicons" } }, + -- init = function() + -- require("user.lspsaga_config") + -- end, + -- }, + -- Khusus Projek laravel baru di buka + -- { + -- "adalessa/laravel.nvim", + -- dependencies = { + -- "nvim-telescope/telescope.nvim", + -- }, + -- cmd = { "Sail", "Artisan", "Composer" }, + -- keys = { + -- { "pa", ":Artisan" }, + -- }, + -- config = function() + -- require("laravel").setup() + -- require("telescope").load_extension("laravel") + -- end, + -- }, + { + "j-hui/fidget.nvim", + event = "VeryLazy", + config = function() + require("fidget").setup() + end, + }, +} diff --git a/lua/plugins_20230204/treesitter_20230115.lua b/lua/plugins_20230204/treesitter_20230115.lua new file mode 100644 index 0000000..42b0ff8 --- /dev/null +++ b/lua/plugins_20230204/treesitter_20230115.lua @@ -0,0 +1,62 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + -- build = ":TSUpdate", + -- event = "BufReadPost", + ---@type TSConfig + opts = { + sync_install = false, + highlight = { enable = true }, + autopairs = { + enable = true, + }, + indent = { enable = true, disable = { "python", "css" } }, + autotag = { enable = true }, + incremental_selection = { enable = true }, + rainbow = { + enable = true, + disable = { "html" }, + extended_mode = false, + max_file_lines = nil, + }, + context_commentstring = { + enable = true, + enable_autocmd = false, + config = { + -- Languages that have a single comment style + typescript = "// %s", + css = "/* %s */", + scss = "/* %s */", + html = "", + svelte = "", + vue = "", + json = "", + }, + }, + ensure_installed = { + "bash", + "html", + -- "c", + -- "javascript", + -- "json", + -- "lua", + -- "python", + -- "typescript", + -- "tsx", + -- "css", + -- "rust", + -- "java", + -- "yaml", + -- "markdown", + -- "markdown_inline", + }, + }, + ---@param opts TSConfig + config = function(plugin, opts) + if plugin.ensure_installed then + require("lazyvim.util").deprecate("treesitter.ensure_installed", "treesitter.opts.ensure_installed") + end + require("nvim-treesitter.configs").setup(opts) + end, + }, +}