diff --git a/lazy-lock.json b/lazy-lock.json index f6bdd3e..45b240c 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -12,7 +12,6 @@ "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, "code_runner.nvim": { "branch": "main", "commit": "a010649236fe245eaab2641a13228cd601499715" }, "dressing.nvim": { "branch": "master", "commit": "5f44f829481640be0f96759c965ae22a3bcaf7ce" }, - "fidget.nvim": { "branch": "main", "commit": "688b4fec4517650e29c3e63cfbb6e498b3112ba1" }, "friendly-snippets": { "branch": "main", "commit": "009887b76f15d16f69ae1341f86a7862f61cf2a1" }, "gitsigns.nvim": { "branch": "main", "commit": "bb808fc7376ed7bac0fbe8f47b83d4bf01738167" }, "gruvbox-baby": { "branch": "main", "commit": "ea71b4225d0140103d99748ca4a33ecf22c03f62" }, @@ -21,16 +20,17 @@ "jaq-nvim": { "branch": "master", "commit": "236296aae555657487d1bb4d066cbde9d79d8cd4" }, "lazy.nvim": { "branch": "main", "commit": "14075657131b9a19883a8845c47f1ab65461cd6f" }, "live-server": { "branch": "main", "commit": "ecd7c1418823b65dd2bca710587c80afe42c973e" }, + "lsp-progress.nvim": { "branch": "main", "commit": "9c0cf47587ee3cf2c9267ff2296876f214e631e5" }, "lualine.nvim": { "branch": "master", "commit": "e99d733e0213ceb8f548ae6551b04ae32e590c80" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "e4badf7984f7a5f0ac7dc10657dbedbd99a82f94" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "a31e011135a79d63c71254c250c9158e1056a1cb" }, "mason-null-ls.nvim": { "branch": "main", "commit": "29ce60f9a16fef3de682a9365ef635f24ae92bf9" }, - "mason.nvim": { "branch": "main", "commit": "c400270804059087e2d0041893a95c6bab4df3c1" }, + "mason.nvim": { "branch": "main", "commit": "add6d1d63d8b86af951ba64b4157fe6b0af173d4" }, "mini.animate": { "branch": "main", "commit": "b0c717ed5513b5f23e7c48615449c7dc9fabd05b" }, "mini.indentscope": { "branch": "main", "commit": "7998edc970610c05598c7aea3d21ece8dd87ed52" }, "neoscroll.nvim": { "branch": "master", "commit": "d7601c26c8a183fa8994ed339e70c2d841253e93" }, "noice.nvim": { "branch": "main", "commit": "c22651651da01239fc4afac4cdb7261797d5f02e" }, "nui.nvim": { "branch": "main", "commit": "0dc148c6ec06577fcf06cbab3b7dac96d48ba6be" }, - "null-ls.nvim": { "branch": "main", "commit": "456cd2754c56c991c5e4df60a807d054c1bc7148" }, + "null-ls.nvim": { "branch": "main", "commit": "900c38cfa91eb7ff2716da70f2f2c1d33741cf0a" }, "nvim-autopairs": { "branch": "master", "commit": "4fc96c8f3df89b6d23e5092d31c866c53a346347" }, "nvim-cmp": { "branch": "main", "commit": "feed47fd1da7a1bad2c7dca456ea19c8a5a9823a" }, "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, @@ -45,7 +45,7 @@ "nvim-ts-autotag": { "branch": "main", "commit": "fdefe46c6807441460f11f11a167a2baf8e4534b" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "729d83ecb990dc2b30272833c213cc6d49ed5214" }, "nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" }, - "nvim-web-devicons": { "branch": "master", "commit": "b2060eac2fbc84e0637ea706378ff66451e7c424" }, + "nvim-web-devicons": { "branch": "master", "commit": "4af94fec29f508159ceab5413383e5dedd6c24e3" }, "plenary.nvim": { "branch": "master", "commit": "253d34830709d690f013daf2853a9d21ad7accab" }, "smart-splits.nvim": { "branch": "master", "commit": "52b521618511b3a874255c8a717ace7155fd5f21" }, "symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" }, diff --git a/lua/core/config.lua b/lua/core/config.lua index 44e123b..6e416a6 100644 --- a/lua/core/config.lua +++ b/lua/core/config.lua @@ -36,6 +36,10 @@ config = { coderunner = opt("coderunner", {}), null_ls_ensure_installed = opt("null_ls_ensure_installed", {}), dap_ensure_installed = opt("dap_ensure_installed", {}), + cmprg = opt("cmprg", false), + cmpcalc = opt("cmpcalc", false), + cmptag = opt("cmptag", false), + lsp_virtualtext = opt("lsp_virtualtext", false), } return config diff --git a/lua/core/init.lua b/lua/core/init.lua index 8442793..79dffcd 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -4,6 +4,7 @@ require("config.lazy") require("user.colorscheme") require("user.keymaps") require("user.snip") +require("user.nvim-tree") -- require("user.options") -- require("user.keymaps") -- require("user.autocommands") diff --git a/lua/custom/default.lua b/lua/custom/default.lua index ed678a8..37b9e96 100644 --- a/lua/custom/default.lua +++ b/lua/custom/default.lua @@ -13,6 +13,7 @@ -- dracula -- nightfox, dayfox, dawnfox, duskfox, nordfox, terafox, carbonfox vim.g.pcode_colorscheme = "gruvbox-baby" + -- custom transparent mode -- only support -- gruvbox-baby, @@ -26,21 +27,25 @@ vim.g.pcode_colorscheme = "gruvbox-baby" -- nightfox -- 0 =off 1= on vim.g.pcode_transparent_mode = 0 + -- 0 disable progress -- 1 lualine lsp progress -- 2 fidget progress -vim.g.pcode_progress = 2 +vim.g.pcode_progress = 1 + -- style -- 0 = default -- 1 = { left = "", right = "" }, -- 2 = { left = " ", right = " " }, -- 3 = { left = "", right = "" }, vim.g.pcode_lualine_style = 0 + -- style status icon -- 0 = default -- 1 = vim icon " " -- 2 = vim icon " " vim.g.pcode_status_icon = 0 + -- start custom lualine style -- contoh style -- { @@ -67,8 +72,10 @@ vim.g.pcode_status_icon = 0 vim.g.pcode_custom_lualine = false vim.g.pcode_component_separators = { left = " ", right = " " } vim.g.pcode_section_separators = { left = "", right = " " } + -- 0 ( format jalan) 1 (fromat off) vim.g.pcode_format_on_save = 1 + -- ini hanya untuk lsp yg tidak support masson -- untuk referesi support language kunjungi link dibawah -- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md @@ -76,6 +83,10 @@ vim.g.pcode_lsp_installer = { -- "yamlls", -- tambahkan di bawah sini setelah melakukan :masoninstall } + +-- use for lsp diagnostics virtual text +vim.g.pcode_lsp_virtualtext = false + -- untuk referesi support language kunjungi link dibawah -- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md vim.g.pcode_mason_ensure_installed = { -- sebelumnya register_lsp @@ -129,3 +140,8 @@ vim.g.pcode_whichkey = { vim.g.pcode_coderunner = { go = "go run $fileName", } + +-- config for optional cmp +vim.g.pcode_cmprg = false --https://github.com/lukas-reineke/cmp-rg +vim.g.pcode_cmpcalc = false --https://github.com/hrsh7th/cmp-calc +vim.g.pcode_cmptag = false --https://github.com/quangnguyen30192/cmp-nvim-tags diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index a1b4f9c..04c9c02 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -1,3 +1,12 @@ +local cmprg = false +local cmpcalc = false +local cmptag = false +local data_exists, custom_cmp = pcall(require, "core.config") +if data_exists then + cmprg = custom_cmp.cmprg + cmpcalc = custom_cmp.cmpcalc + cmptag = custom_cmp.cmptag +end return { "hrsh7th/nvim-cmp", version = false, -- last release is way too old @@ -8,6 +17,9 @@ return { "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") @@ -56,6 +68,9 @@ return { { name = "buffer" }, { name = "path" }, { name = "nvim_lua" }, + { name = "rg" }, -- experimental + { name = "calc" }, -- experimental + { name = "tags" }, --experimental }), formatting = { fields = { "kind", "abbr", "menu" }, diff --git a/lua/plugins/ui.lua b/lua/plugins/ui.lua index bc0f1fc..25119ad 100644 --- a/lua/plugins/ui.lua +++ b/lua/plugins/ui.lua @@ -32,9 +32,9 @@ return { -- event = "BufWinEnter", cmd = { "NvimTree", "NvimTreeToggle", "NvimTreeFocus", "NvimTreeClose" }, -- dependencies = "kyazdani42/nvim-web-devicons", - config = function() - require("user.nvim-tree") - end, + -- config = function() + -- require("user.nvim-tree") + -- end, }, -- for file tab { diff --git a/lua/user/lsp/handlers.lua b/lua/user/lsp/handlers.lua index 61c6ff0..a80118c 100644 --- a/lua/user/lsp/handlers.lua +++ b/lua/user/lsp/handlers.lua @@ -5,6 +5,12 @@ if not status_cmp_ok then return end +local lspvitualtext = false +local data_exists, lspconfig = pcall(require, "core.config") +if data_exists then + lspvitualtext = lspconfig.lsp_virtualtext +end + local icons = require("user.icons") M.capabilities = vim.lsp.protocol.make_client_capabilities() @@ -29,7 +35,7 @@ M.setup = function() end local config = { - virtual_text = false, -- disable virtual text + virtual_text = lspvitualtext, -- disable virtual text signs = { active = signs, -- show signs },