enc: move default config from string to table

This commit is contained in:
Pojok Code 2024-11-05 15:05:03 +07:00
parent ea15a8e8b8
commit 8467b64cd9
4 changed files with 99 additions and 95 deletions

View file

@ -20,7 +20,7 @@
"code_runner.nvim": { "branch": "main", "commit": "dcedccbf969a0f3bc00db446172b4966e83101dd" }, "code_runner.nvim": { "branch": "main", "commit": "dcedccbf969a0f3bc00db446172b4966e83101dd" },
"codeium.vim": { "branch": "main", "commit": "8c01979323b2b480c8bf160d3ff85bd1668baa49" }, "codeium.vim": { "branch": "main", "commit": "8c01979323b2b480c8bf160d3ff85bd1668baa49" },
"conform.nvim": { "branch": "master", "commit": "d28ccf945374edd9f1c34a82f6c22261dbd8ab98" }, "conform.nvim": { "branch": "master", "commit": "d28ccf945374edd9f1c34a82f6c22261dbd8ab98" },
"dressing.nvim": { "branch": "master", "commit": "c334ac73e031f0dc93d6d91f3658ee75b8be1d3b" }, "dressing.nvim": { "branch": "master", "commit": "6ef1ca479d37d4ff66f13eed44d08912caff483a" },
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
"gitsigns.nvim": { "branch": "main", "commit": "4daf7022f1481edf1e8fb9947df13bb07c18e89a" }, "gitsigns.nvim": { "branch": "main", "commit": "4daf7022f1481edf1e8fb9947df13bb07c18e89a" },
"indent-blankline.nvim": { "branch": "master", "commit": "04e44b09ee3ff189c69ab082edac1ef7ae2e256c" }, "indent-blankline.nvim": { "branch": "master", "commit": "04e44b09ee3ff189c69ab082edac1ef7ae2e256c" },
@ -38,7 +38,7 @@
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
"nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" }, "nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" },
"nvim-cmp": { "branch": "main", "commit": "f17d9b4394027ff4442b298398dfcaab97e40c4f" }, "nvim-cmp": { "branch": "main", "commit": "f17d9b4394027ff4442b298398dfcaab97e40c4f" },
"nvim-colorizer.lua": { "branch": "master", "commit": "58bbb51898709b4222feaa84a30464a107ddf8eb" }, "nvim-colorizer.lua": { "branch": "master", "commit": "e614ff5c26d085a3242e26648e90e56ba5476da2" },
"nvim-dap": { "branch": "master", "commit": "7ff6936010b7222fea2caea0f67ed77f1b7c60dd" }, "nvim-dap": { "branch": "master", "commit": "7ff6936010b7222fea2caea0f67ed77f1b7c60dd" },
"nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" }, "nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "76d80c3d171224315b61c006502a1e30c213a9ab" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "76d80c3d171224315b61c006502a1e30c213a9ab" },
@ -50,7 +50,7 @@
"nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" }, "nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" },
"nvim-scrollview": { "branch": "main", "commit": "f7f611330a8f7cd00dc81538fec369611be678ed" }, "nvim-scrollview": { "branch": "main", "commit": "f7f611330a8f7cd00dc81538fec369611be678ed" },
"nvim-tree.lua": { "branch": "master", "commit": "610a1c189bdb2b9b936169b2ea9d1838f971fa2b" }, "nvim-tree.lua": { "branch": "master", "commit": "610a1c189bdb2b9b936169b2ea9d1838f971fa2b" },
"nvim-treesitter": { "branch": "master", "commit": "dfd3207ed43a0c572c13acc02bf9d7dc270f4030" }, "nvim-treesitter": { "branch": "master", "commit": "509d38fee865eefd38eacf17c8920b68cf67b0fd" },
"nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" }, "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "9c74db656c3d0b1c4392fc89a016b1910539e7c0" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "9c74db656c3d0b1c4392fc89a016b1910539e7c0" },
"nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" }, "nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" },
@ -63,7 +63,7 @@
"vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" }, "vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" },
"vim-visual-multi": { "branch": "master", "commit": "a6975e7c1ee157615bbc80fc25e4392f71c344d4" }, "vim-visual-multi": { "branch": "master", "commit": "a6975e7c1ee157615bbc80fc25e4392f71c344d4" },
"virt-column.nvim": { "branch": "master", "commit": "b62b4ef0774d19452d4ed18e473e824c7a756f2f" }, "virt-column.nvim": { "branch": "master", "commit": "b62b4ef0774d19452d4ed18e473e824c7a756f2f" },
"volt": { "branch": "main", "commit": "c99a2f4ece14ff501f14e4c10fe9cd60b22757a8" }, "volt": { "branch": "main", "commit": "ff954757fdaf72da0dedd77bdf74718ea846f989" },
"vscode-php-debug": { "branch": "main", "commit": "6193fbc1c819437325df3dad43e254d8e5c416e5" }, "vscode-php-debug": { "branch": "main", "commit": "6193fbc1c819437325df3dad43e254d8e5c416e5" },
"which-key.nvim": { "branch": "main", "commit": "8badb359f7ab8711e2575ef75dfe6fbbd87e4821" }, "which-key.nvim": { "branch": "main", "commit": "8badb359f7ab8711e2575ef75dfe6fbbd87e4821" },
"yanky.nvim": { "branch": "main", "commit": "73215b77d22ebb179cef98e7e1235825431d10e4" }, "yanky.nvim": { "branch": "main", "commit": "73215b77d22ebb179cef98e7e1235825431d10e4" },

View file

@ -1,17 +1,17 @@
-- Bootstrap lazy.nvim -- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git" local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({ vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" }, { "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" }, { out, "WarningMsg" },
{ "\nPress any key to exit..." }, { "\nPress any key to exit..." },
}, true, {}) }, true, {})
vim.fn.getchar() vim.fn.getchar()
os.exit(1) os.exit(1)
end end
end end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath) vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
@ -23,64 +23,68 @@ vim.g.mapleader = " "
vim.g.maplocalleader = "\\" vim.g.maplocalleader = "\\"
-- initialisasi plugins -- initialisasi plugins
local importdata = { local importdata = {
{ import = "pcode.plugins" }, { import = "pcode.plugins" },
} }
-- load theme -- load theme
local theme = pcode.themes or {} local theme = pcode.themes or {}
for key, _ in pairs(theme) do for key, _ in pairs(theme) do
table.insert(importdata, { import = "pcode.plugins.theme." .. key }) table.insert(importdata, { import = "pcode.plugins.theme." .. key })
end end
-- load extras plugins -- load extras plugins
local extras = pcode.extras or {} local extras = pcode.extras or {}
for _, value in pairs(extras) do for key, value in pairs(extras) do
table.insert(importdata, { import = "pcode.plugins.extras." .. value }) if value then
table.insert(importdata, { import = "pcode.plugins.extras." .. key })
end
end end
-- load language config -- load language config
local lang = pcode.lang or {} local lang = pcode.lang or {}
for _, value in pairs(lang) do for key, value in pairs(lang) do
table.insert(importdata, { import = "pcode.plugins.lang." .. value }) if value then
table.insert(importdata, { import = "pcode.plugins.lang." .. key })
end
end end
-- load transparant config -- load transparant config
local transparant = pcode.transparent or false local transparant = pcode.transparent or false
if transparant then if transparant then
table.insert(importdata, { import = "pcode.plugins.extras.transparent" }) table.insert(importdata, { import = "pcode.plugins.extras.transparent" })
end end
-- add overide path -- add overide path
table.insert(importdata, { import = "pcode.user.custom" }) table.insert(importdata, { import = "pcode.user.custom" })
-- Setup lazy.nvim -- Setup lazy.nvim
require("lazy").setup({ require("lazy").setup({
spec = importdata, spec = importdata,
ui = { ui = {
backdrop = 100, -- Menyeting backdrop UI backdrop = 100, -- Menyeting backdrop UI
border = "rounded", -- Mengatur border UI ke rounded border = "rounded", -- Mengatur border UI ke rounded
browser = "chrome", -- Menggunakan Chrome sebagai browser default browser = "chrome", -- Menggunakan Chrome sebagai browser default
throttle = 40, -- Menyeting throttle throttle = 40, -- Menyeting throttle
custom_keys = { custom_keys = {
["<localleader>l"] = false, -- Menonaktifkan kunci lokal leader l ["<localleader>l"] = false, -- Menonaktifkan kunci lokal leader l
}, },
icons = { icons = {
ft = icons.ft, ft = icons.ft,
lazy = icons.Bell .. " ", lazy = icons.Bell .. " ",
loaded = icons.CheckCircle, loaded = icons.CheckCircle,
not_loaded = icons.not_loaded, not_loaded = icons.not_loaded,
}, },
}, },
change_detection = { enabled = false, notify = false }, -- Nonaktifkan deteksi perubahan change_detection = { enabled = false, notify = false }, -- Nonaktifkan deteksi perubahan
-- automatically check for plugin updates -- automatically check for plugin updates
checker = { enabled = true }, checker = { enabled = true },
performance = { performance = {
rtp = { rtp = {
-- disable some rtp plugins -- disable some rtp plugins
disabled_plugins = { disabled_plugins = {
"gzip", "gzip",
"matchit", "matchit",
"matchparen", "matchparen",
"netrwPlugin", "netrwPlugin",
"tarPlugin", "tarPlugin",
"tohtml", "tohtml",
"tutor", "tutor",
"zipPlugin", "zipPlugin",
}, },
}, },
}, },
}) })

View file

@ -1,47 +1,47 @@
-- activate config spesific languages -- activate config spesific languages
pcode.lang = { pcode.lang = {
-- "angular", angular = false,
-- "cpp", cpp = false,
-- "sql", sql = false,
-- "deno", deno = false,
-- "golang", golang = false,
-- "java", java = false,
-- "javascript", javascript = false,
-- "kotlin", kotlin = false,
-- "markdown", markdown = false,
"php", php = true,
-- "prisma", prisma = false,
-- "python", python = false,
-- "tust", rust = false,
-- "tailwind", tailwind = false,
} }
-- activate config extras -- activate config extras
pcode.extras = { pcode.extras = {
-- "autosave", autosave = false,
-- "bigfiles", bigfiles = false,
-- "codeiumnvim", codeiumnvim = false,
-- "liveserver", liveserver = false,
-- "minianimate", minianimate = false,
-- "neoscroll", neoscroll = false,
-- "nvimufo", nvimufo = false,
-- "refactoring", refactoring = false,
-- "rest", rest = false,
-- "treesittercontex", treesittercontex = false,
"codeium", codeium = true,
"colorizer", colorizer = true,
"dap", dap = true,
"deviconcolor", deviconcolor = true,
"illuminate", illuminate = true,
"indentscupe", indentscupe = true,
"navic", navic = true,
"nvimmenu", nvimmenu = true,
"rainbowdelimiters", rainbowdelimiters = true,
"scrollview", scrollview = true,
"smart-split", smartsplit = true,
"verticalcolumn", verticalcolumn = true,
"visualmulti", visualmulti = true,
"yanky", yanky = true,
"zenmode", zenmode = true,
} }
-- activate config themes -- activate config themes
pcode.themes = { pcode.themes = {