diff --git a/ftplugin/javascript.lua b/ftplugin/javascript.lua index 94d00e9..0c2615a 100644 --- a/ftplugin/javascript.lua +++ b/ftplugin/javascript.lua @@ -1,4 +1,4 @@ vim.opt_local.expandtab = true -vim.opt_local.shiftwidth = 4 -vim.opt_local.tabstop = 4 -vim.opt_local.softtabstop = 4 +vim.opt_local.shiftwidth = 2 +vim.opt_local.tabstop = 2 +vim.opt_local.softtabstop = 2 diff --git a/lua/core/init.lua b/lua/core/init.lua index ab0b1c7..76d98d9 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -16,4 +16,3 @@ require("user.keymaps") -- require("user.bufferline") -- require("user.chat_gpt") -- vim.cmd("colorscheme one_monokai") --- vim.cmd("colorscheme github_dark") diff --git a/lua/custom/plugins/bufferline.lua b/lua/custom/plugins/bufferline.lua index adc8b38..e107c8e 100644 --- a/lua/custom/plugins/bufferline.lua +++ b/lua/custom/plugins/bufferline.lua @@ -80,7 +80,7 @@ return { show_close_icon = true, show_tab_indicators = true, persist_buffer_sort = true, -- whether or not custom sorted buffers should persist - separator_style = "thin", -- | "thick" | "thin" | { 'any', 'any' }, + separator_style = { "", "" }, -- | "thick" | "thin" | { 'any', 'any' }, enforce_regular_tabs = true, always_show_bufferline = true, }, diff --git a/lua/custom/plugins/cmdline.lua b/lua/custom/plugins/cmdline.lua index c89d491..2e6a085 100644 --- a/lua/custom/plugins/cmdline.lua +++ b/lua/custom/plugins/cmdline.lua @@ -10,6 +10,7 @@ return { { "gelguy/wilder.nvim", enabled = not use_noice }, { "folke/noice.nvim", + lazy = true, enabled = use_noice, dependencies = { { "MunifTanjim/nui.nvim", enabled = use_noice }, diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 51b9c54..15df0bd 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -10,28 +10,19 @@ if data_exists then lspghost_text = custom_cmp.lspghost_text end return { - { "hrsh7th/cmp-nvim-lsp", event = "InsertEnter" }, - { "hrsh7th/cmp-buffer", event = "InsertEnter" }, - { "hrsh7th/cmp-path", event = "InsertEnter" }, - { "saadparwaiz1/cmp_luasnip", event = "InsertEnter" }, - { "hrsh7th/cmp-nvim-lua", event = "InsertEnter" }, - { "lukas-reineke/cmp-rg", enabled = cmprg }, -- experimental - { "hrsh7th/cmp-calc", enabled = cmpcalc }, -- experimental - { "quangnguyen30192/cmp-nvim-tags", enabled = cmptag }, -- experimental + { "hrsh7th/cmp-nvim-lsp", event = "InsertEnter", lazy = true }, + { "hrsh7th/cmp-buffer", event = "InsertEnter", lazy = true }, + { "hrsh7th/cmp-path", event = "InsertEnter", lazy = true }, + { "saadparwaiz1/cmp_luasnip", event = "InsertEnter", lazy = true }, + { "hrsh7th/cmp-nvim-lua", event = "InsertEnter", lazy = true }, + { "lukas-reineke/cmp-rg", lazy = true, enabled = cmprg }, -- experimental + { "hrsh7th/cmp-calc", lazy = true, enabled = cmpcalc }, -- experimental + { "quangnguyen30192/cmp-nvim-tags", lazy = true, enabled = cmptag }, -- experimental { "hrsh7th/nvim-cmp", + lazy = true, version = false, -- last release is way too old event = "InsertEnter", - -- dependencies = { - -- "hrsh7th/cmp-nvim-lsp", - -- "hrsh7th/cmp-buffer", - -- "hrsh7th/cmp-path", - -- "saadparwaiz1/cmp_luasnip", - -- "hrsh7th/cmp-nvim-lua", - -- { "lukas-reineke/cmp-rg", enabled = cmprg }, -- experimental - -- { "hrsh7th/cmp-calc", enabled = cmpcalc }, -- experimental - -- { "quangnguyen30192/cmp-nvim-tags", enabled = cmptag }, -- experimental - -- }, opts = function() local cmp = require("cmp") local luasnip = require("luasnip") diff --git a/lua/plugins/cmp_cmdline.lua b/lua/plugins/cmp_cmdline.lua index a2a5c8a..6ceee45 100644 --- a/lua/plugins/cmp_cmdline.lua +++ b/lua/plugins/cmp_cmdline.lua @@ -2,6 +2,7 @@ return { -- for auto complate commond mode { "gelguy/wilder.nvim", + lazy = true, event = "BufWinEnter", config = function() local wilder = require("wilder") diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 1b970e5..ca80703 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -44,6 +44,7 @@ return { { "rafamadriz/friendly-snippets", event = "InsertEnter", + lazy = true, config = function() require("luasnip.loaders.from_vscode").lazy_load() require("user.snippets") @@ -81,6 +82,7 @@ return { }, { "neovim/nvim-lspconfig", + lazy = true, event = "BufRead", -- dependencies = { -- "williamboman/mason-lspconfig.nvim", @@ -127,12 +129,13 @@ return { { "RRethy/vim-illuminate", event = "BufRead", lazy = true }, { "jayp0521/mason-null-ls.nvim", - -- lazy = true, + lazy = true, dependencies = { -- "jose-elias-alvarez/null-ls.nvim", "nvimtools/none-ls.nvim", dependencies = { "nvimtools/none-ls-extras.nvim", + lazy = true, }, config = function() require("user.lsp.null-ls") @@ -146,6 +149,7 @@ return { -- debuging { "rcarriga/nvim-dap-ui", + lazy = true, event = "BufRead", dependencies = "mfussenegger/nvim-dap", enabled = vim.fn.has("win32") == 0, @@ -155,6 +159,7 @@ return { }, { "jay-babu/mason-nvim-dap.nvim", + lazy = true, event = "BufRead", dependencies = { "williamboman/mason.nvim", "mfussenegger/nvim-dap" }, enabled = vim.fn.has("win32") == 0, @@ -199,6 +204,7 @@ return { "numToStr/Comment.nvim", -- event = "BufWinEnter", event = "InsertEnter", + lazy = true, config = function() require("user.comment") end, @@ -206,6 +212,7 @@ return { { "lukas-reineke/indent-blankline.nvim", event = "BufRead", + lazy = true, opts = { indent = { char = "│", @@ -255,11 +262,12 @@ return { -- build = "npm install -g live-server", -- }, -- for multi cursor select - { "mg979/vim-visual-multi", event = "BufWinEnter" }, + { "mg979/vim-visual-multi", event = "BufWinEnter", lazy = true }, -- for auto close tag { "windwp/nvim-ts-autotag", -- event = "BufWinEnter", + lazy = true, event = "BufRead", dependencies = "nvim-treesitter/nvim-treesitter", config = function() @@ -269,6 +277,7 @@ return { -- for auto detection file and run code { "CRAG666/code_runner.nvim", + lazy = true, event = "InsertEnter", -- dependencies = "nvim-lua/plenary.nvim", cmd = { "RunCode", "RunFile", "RunProject", "RunClose" }, @@ -279,6 +288,7 @@ return { -- for color view { "NvChad/nvim-colorizer.lua", + lazy = true, event = "BufRead", opts = function() require("user.colorizer") @@ -287,6 +297,7 @@ return { -- for winbar icon { "SmiteshP/nvim-navic", + lazy = true, dependencies = "neovim/nvim-lspconfig", event = "InsertEnter", config = function() @@ -297,6 +308,7 @@ return { -- for popup alert { "rcarriga/nvim-notify", + lazy = true, event = "BufWinEnter", keys = { { @@ -328,6 +340,7 @@ return { -- for resize screen { "mrjones2014/smart-splits.nvim", + lazy = true, event = "BufRead", config = function() require("user.smartspit") @@ -352,6 +365,7 @@ return { }, -- mini scrollview { "karb94/neoscroll.nvim", + lazy = true, event = "InsertEnter", config = function() require("user.neoscroll") @@ -359,13 +373,14 @@ return { }, { "dstein64/nvim-scrollview", + lazy = true, event = "BufRead", config = function() require("user.nvimscroll") end, }, -- for check startuptime - { "dstein64/vim-startuptime", cmd = "StartupTime", event = "InsertEnter" }, + { "dstein64/vim-startuptime", lazy = true, cmd = "StartupTime", event = "InsertEnter" }, -- for coloring pairs -- remark 20231101 - menyebabkan error treesitter -- { @@ -374,9 +389,10 @@ return { -- dependencies = "nvim-treesitter/nvim-treesitter", -- }, -- for git - { "HiPhish/nvim-ts-rainbow2", event = "BufRead", dependencies = "nvim-treesitter/nvim-treesitter" }, + { "HiPhish/nvim-ts-rainbow2", lazy = true, event = "BufRead", dependencies = "nvim-treesitter/nvim-treesitter" }, { "lewis6991/gitsigns.nvim", + lazy = true, enabled = vim.fn.executable("git") == 1, ft = "gitcommit", event = "BufRead", diff --git a/lua/plugins/lspprogress.lua b/lua/plugins/lspprogress.lua index d2a7959..6620074 100644 --- a/lua/plugins/lspprogress.lua +++ b/lua/plugins/lspprogress.lua @@ -44,6 +44,7 @@ end return { { "j-hui/fidget.nvim", + lazy = true, enabled = fidget, tag = "legacy", event = "BufRead", @@ -59,6 +60,7 @@ return { { "linrongbin16/lsp-progress.nvim", enabled = lualine, + lazy = true, branch = "main", event = { "BufRead" }, config = function() diff --git a/lua/plugins/transparant.lua b/lua/plugins/transparant.lua index 147ce5f..42be48f 100644 --- a/lua/plugins/transparant.lua +++ b/lua/plugins/transparant.lua @@ -23,6 +23,7 @@ return { -- transparant config { "xiyaowong/transparent.nvim", + lazy = true, enabled = transparent, event = "BufWinEnter", cmd = { "TransparentToggle", "TransparentEnable", "TransparentDisable" }, diff --git a/lua/plugins/ui.lua b/lua/plugins/ui.lua index 03c2afa..484a407 100644 --- a/lua/plugins/ui.lua +++ b/lua/plugins/ui.lua @@ -3,6 +3,7 @@ return { { "goolord/alpha-nvim", -- event = "BufWinEnter", + lazy = true, event = "VimEnter", config = function() require("user.alpha") @@ -11,6 +12,7 @@ return { -- line info bootom { "nvim-lualine/lualine.nvim", + lazy = true, -- dependencies = { "kyazdani42/nvim-web-devicons", opt = true }, event = "BufWinEnter", config = function() @@ -20,6 +22,7 @@ return { -- for show icon { "kyazdani42/nvim-web-devicons", + lazy = true, dependencies = { "DaikyXendo/nvim-material-icon" }, event = "BufRead", config = function() @@ -29,6 +32,7 @@ return { -- for tree exploler { "kyazdani42/nvim-tree.lua", + lazy = true, event = "BufRead", cmd = { "NvimTree", "NvimTreeToggle", "NvimTreeFocus", "NvimTreeClose" }, -- dependencies = "kyazdani42/nvim-web-devicons", @@ -44,10 +48,12 @@ return { -- for file tab { "famiu/bufdelete.nvim", + lazy = true, event = "InsertEnter", }, { "akinsho/bufferline.nvim", + lazy = true, event = "BufWinEnter", config = function() require("user.bufferline") @@ -68,6 +74,7 @@ return { -- key mapping { "folke/which-key.nvim", + lazy = true, keys = { "", '"', "'", "`", "c", "v" }, event = "VeryLazy", config = function() @@ -77,6 +84,7 @@ return { -- for search { "nvim-telescope/telescope.nvim", + lazy = true, -- event = "BufRead", -- dependencies = { { "nvim-lua/plenary.nvim" } }, cmd = "Telescope",