add: config global variable

This commit is contained in:
asep.komarudin 2024-05-21 14:20:50 +07:00
parent 77436b89c4
commit a7726a6b33
30 changed files with 703 additions and 857 deletions

View file

@ -14,7 +14,7 @@
"dressing.nvim": { "branch": "master", "commit": "572314728cb1ce012e825fd66331f52c94acac12" }, "dressing.nvim": { "branch": "master", "commit": "572314728cb1ce012e825fd66331f52c94acac12" },
"friendly-snippets": { "branch": "main", "commit": "dd2fd1281d4b22e7b4a5bfafa3e142d958e251f2" }, "friendly-snippets": { "branch": "main", "commit": "dd2fd1281d4b22e7b4a5bfafa3e142d958e251f2" },
"gitsigns.nvim": { "branch": "main", "commit": "76927d14d3fbd4ba06ccb5246e79d93b5442c188" }, "gitsigns.nvim": { "branch": "main", "commit": "76927d14d3fbd4ba06ccb5246e79d93b5442c188" },
"indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" }, "indent-blankline.nvim": { "branch": "master", "commit": "ece00d5fb44d196680a81fd2761062d2fa44663b" },
"lazy.nvim": { "branch": "main", "commit": "758bb5de98b805acc5eeed8cdc8ac7f0bc4b0b86" }, "lazy.nvim": { "branch": "main", "commit": "758bb5de98b805acc5eeed8cdc8ac7f0bc4b0b86" },
"lsp-progress.nvim": { "branch": "main", "commit": "55a04895ea20c365b670051a3128265d43bdfa3d" }, "lsp-progress.nvim": { "branch": "main", "commit": "55a04895ea20c365b670051a3128265d43bdfa3d" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
@ -37,7 +37,7 @@
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
"nvim-scrollview": { "branch": "main", "commit": "c29c5f69d37040a1fac88cbea7f5e6f06f0aff4d" }, "nvim-scrollview": { "branch": "main", "commit": "c29c5f69d37040a1fac88cbea7f5e6f06f0aff4d" },
"nvim-tree.lua": { "branch": "master", "commit": "2bc725a3ebc23f0172fb0ab4d1134b81bcc13812" }, "nvim-tree.lua": { "branch": "master", "commit": "2bc725a3ebc23f0172fb0ab4d1134b81bcc13812" },
"nvim-treesitter": { "branch": "master", "commit": "7c9c5bed8340031f8a6dad47a58a26eaf15b9a56" }, "nvim-treesitter": { "branch": "master", "commit": "73fb37ed77b18ac357ca8e6e35835a8db6602332" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "5f9bf4b1ead7707e4e74e5319ee56bdc81fb73db" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "5f9bf4b1ead7707e4e74e5319ee56bdc81fb73db" },
"nvim-ts-autotag": { "branch": "main", "commit": "cb57b07803476ee902c89412aeff219a9a58be13" }, "nvim-ts-autotag": { "branch": "main", "commit": "cb57b07803476ee902c89412aeff219a9a58be13" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "cbab9ad88036915beebd13b47e100743ff2ed2d5" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "cbab9ad88036915beebd13b47e100743ff2ed2d5" },

View file

@ -43,6 +43,7 @@ config = {
lsp_virtualtext = opt("lsp_virtualtext", false), lsp_virtualtext = opt("lsp_virtualtext", false),
lspghost_text = opt("lspghost_text", false), lspghost_text = opt("lspghost_text", false),
loadnvimtree_lazy = opt("loadnvimtree_lazy", false), loadnvimtree_lazy = opt("loadnvimtree_lazy", false),
icons = opt("icons", {}),
} }
return config return config

View file

@ -1,3 +1,4 @@
vim.g.pcode_icons = require("user.icons")
-- custom colorscheme -- custom colorscheme
-- colorscheme ready : -- colorscheme ready :
-- tokyonight, tokyonight-night, tokyonight-storm, tokyonight-day, tokyonight-moon -- tokyonight, tokyonight-night, tokyonight-storm, tokyonight-day, tokyonight-moon
@ -77,24 +78,17 @@ vim.g.pcode_dap_ensure_installed = {
} }
-- https://github.com/folke/which-key.nvim -- https://github.com/folke/which-key.nvim
-- vim.g.pcode_whichkey = { vim.g.pcode_whichkey = {
-- contoh penambahan -- contoh penambahan
-- ["k"] = { ["k"] = {
-- name = "Example", name = "Example",
-- k = { '<cmd>lua print("Testing")<cr>', "Example" }, k = { '<cmd>lua print("Testing")<cr>', "Example" },
-- }, },
-- ["r"] = { ["r"] = {
-- name = "Run", name = "Run",
-- j = { "<cmd>Jaq float<CR>", "Run With Jaq" }, j = { "<cmd>Jaq float<CR>", "Run With Jaq" },
-- }, },
-- ["o"] = { "<cmd>SymbolsOutline<cr>", "Symbol Outline" }, }
-- ["m"] = {
-- name = "Minimap",
-- c = { "<cmd>lua require('mini.map').close()<cr>", "Minimap Close" },
-- o = { "<cmd>lua require('mini.map').open()<cr>", "Minimap Open" },
-- },
-- ["e"] = { "<cmd>NvimTreeToggle<CR>", "Explorer" },
-- }
-- https://github.com/CRAG666/code_runner.nvim -- https://github.com/CRAG666/code_runner.nvim
-- ready default java, python, typescript, javascript, rust, cpp, scss -- ready default java, python, typescript, javascript, rust, cpp, scss

View file

@ -1,4 +1,4 @@
local icons = require("user.icons") local icons = vim.g.pcode_icons
return { return {
--- masukan plugin tambahan disini --- masukan plugin tambahan disini
-- { -- {

View file

@ -8,7 +8,7 @@ function TABLE_CONTAINS(tbl, x)
return found return found
end end
local icons = require("user.icons").folding local icons = vim.g.pcode_icons.folding
return { return {
"kevinhwang91/nvim-ufo", "kevinhwang91/nvim-ufo",

View file

@ -8,7 +8,7 @@ return {
return return
end end
local icons = require("user.icons") local icons = vim.g.pcode_icons
local use_icons = true local use_icons = true
-- get folder name from current directory -- get folder name from current directory

View file

@ -1,15 +1,9 @@
local cmprg = false local cmprg = vim.g.pcode_cmprg
local cmpcalc = false local cmpcalc = vim.g.pcode_cmpcalc
local cmptag = false local cmptag = vim.g.pcode_cmptag
local lspghost_text = false local lspghost_text = vim.g.pcode_lspghost_text
local icons = require("user.icons").ui local icons = vim.g.pcode_icons.ui
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
lspghost_text = custom_cmp.lspghost_text
end
return { return {
{ "hrsh7th/cmp-nvim-lsp", event = "InsertEnter", lazy = true }, { "hrsh7th/cmp-nvim-lsp", event = "InsertEnter", lazy = true },
{ "hrsh7th/cmp-buffer", event = "InsertEnter", lazy = true }, { "hrsh7th/cmp-buffer", event = "InsertEnter", lazy = true },
@ -90,7 +84,7 @@ return {
formatting = { formatting = {
fields = { "kind", "abbr", "menu" }, fields = { "kind", "abbr", "menu" },
format = function(entry, vim_item) format = function(entry, vim_item)
vim_item.kind = string.format("%s", require("user.icons")["kind"][vim_item.kind]) vim_item.kind = string.format("%s", vim.g.pcode_icons["kind"][vim_item.kind])
vim_item.menu = ({ vim_item.menu = ({
nvim_lsp = "(LSP)", nvim_lsp = "(LSP)",
luasnip = "(Snippet)", luasnip = "(Snippet)",

View file

@ -1,21 +1,17 @@
--typescript = "deno run",
-- cpp="gcc $fileName -lstdc++ -o $fileNameWithoutExt && $fileNameWithoutExt"
local rfile = { local rfile = {
java = "cd $dir && javac $fileName && java $fileNameWithoutExt", java = "cd $dir && javac $fileName && java $fileNameWithoutExt",
python = "python3 -u", python = "python3 -u",
--typescript = "deno run", typescript = "ts-node $dir/$fileName",
typescript = "ts-node $dir/$fileName", -- npm install -g ts-node
rust = "cd $dir && rustc $fileName && $dir/$fileNameWithoutExt", rust = "cd $dir && rustc $fileName && $dir/$fileNameWithoutExt",
-- cpp="gcc $fileName -lstdc++ -o $fileNameWithoutExt && $fileNameWithoutExt"
cpp = "cd $dir && g++ $fileName -o $fileNameWithoutExt && $dir/$fileNameWithoutExt", cpp = "cd $dir && g++ $fileName -o $fileNameWithoutExt && $dir/$fileNameWithoutExt",
scss = "sass $dir/$fileName $dir/$fileNameWithoutExt.css", scss = "sass $dir/$fileName $dir/$fileNameWithoutExt.css",
javascript = 'node "$dir/$fileName"', javascript = 'node "$dir/$fileName"',
} }
local data_exists, runscript = pcall(require, "core.config") local runscript = vim.g.pcode_coderunner
if data_exists then rfile = vim.tbl_deep_extend("force", runscript, rfile)
if runscript.coderunner ~= nil then
rfile = vim.tbl_deep_extend("force", runscript.coderunner, rfile)
end
end
return { return {
"CRAG666/code_runner.nvim", "CRAG666/code_runner.nvim",
lazy = true, lazy = true,

View file

@ -22,191 +22,186 @@ _G.switch = function(param, case_table)
return def and def() or nil return def and def() or nil
end end
local data_exists, config = pcall(require, "core.config") local color = vim.g.pcode_colorscheme
if data_exists then switch(color, {
if config.colorscheme ~= nil then ["tokyonight"] = function()
local color = config.colorscheme gruvbox = false
switch(color, { tokyonight = true
["tokyonight"] = function() end,
gruvbox = false ["tokyonight-night"] = function()
tokyonight = true gruvbox = false
end, tokyonight = true
["tokyonight-night"] = function() end,
gruvbox = false ["tokyonight-storm"] = function()
tokyonight = true gruvbox = false
end, tokyonight = true
["tokyonight-storm"] = function() end,
gruvbox = false ["tokyonight-day"] = function()
tokyonight = true gruvbox = false
end, tokyonight = true
["tokyonight-day"] = function() end,
gruvbox = false ["tokyonight-moon"] = function()
tokyonight = true gruvbox = false
end, tokyonight = true
["tokyonight-moon"] = function() end,
gruvbox = false ["sonokai"] = function()
tokyonight = true gruvbox = false
end, sonokai = true
["sonokai"] = function() sonokai_style = "default"
gruvbox = false end,
sonokai = true ["sonokai_atlantis"] = function()
sonokai_style = "default" gruvbox = false
end, sonokai = true
["sonokai_atlantis"] = function() sonokai_style = "atlantis"
gruvbox = false end,
sonokai = true ["sonokai_andromeda"] = function()
sonokai_style = "atlantis" gruvbox = false
end, sonokai = true
["sonokai_andromeda"] = function() sonokai_style = "andromeda"
gruvbox = false end,
sonokai = true ["sonokai_shusia"] = function()
sonokai_style = "andromeda" gruvbox = false
end, sonokai = true
["sonokai_shusia"] = function() sonokai_style = "shusia"
gruvbox = false end,
sonokai = true ["sonokai_maia"] = function()
sonokai_style = "shusia" gruvbox = false
end, sonokai = true
["sonokai_maia"] = function() sonokai_style = "maia"
gruvbox = false end,
sonokai = true ["sonokai_espresso"] = function()
sonokai_style = "maia" gruvbox = false
end, sonokai = true
["sonokai_espresso"] = function() sonokai_style = "espresso"
gruvbox = false end,
sonokai = true ["material"] = function()
sonokai_style = "espresso" gruvbox = false
end, material = true
["material"] = function() end,
gruvbox = false ["material_deepocean"] = function()
material = true gruvbox = false
end, material = true
["material_deepocean"] = function() material_style = "deep ocean"
gruvbox = false end,
material = true ["material_palenight"] = function()
material_style = "deep ocean" gruvbox = false
end, material = true
["material_palenight"] = function() material_style = "palenight"
gruvbox = false end,
material = true ["material_lighter"] = function()
material_style = "palenight" gruvbox = false
end, material = true
["material_lighter"] = function() material_style = "lighter"
gruvbox = false end,
material = true ["material_darker"] = function()
material_style = "lighter" gruvbox = false
end, material = true
["material_darker"] = function() material_style = "darker"
gruvbox = false end,
material = true ["onedark"] = function()
material_style = "darker" gruvbox = false
end, onedark = true
["onedark"] = function() end,
gruvbox = false ["onedark_darker"] = function()
onedark = true gruvbox = false
end, onedark = true
["onedark_darker"] = function() onedark_style = "darker"
gruvbox = false end,
onedark = true ["onedark_cool"] = function()
onedark_style = "darker" gruvbox = false
end, onedark = true
["onedark_cool"] = function() onedark_style = "cool"
gruvbox = false end,
onedark = true ["onedark_deep"] = function()
onedark_style = "cool" gruvbox = false
end, onedark = true
["onedark_deep"] = function() onedark_style = "deep"
gruvbox = false end,
onedark = true ["onedark_warm"] = function()
onedark_style = "deep" gruvbox = false
end, onedark = true
["onedark_warm"] = function() onedark_style = "warm"
gruvbox = false end,
onedark = true ["onedark_warmer"] = function()
onedark_style = "warm" gruvbox = false
end, onedark = true
["onedark_warmer"] = function() onedark_style = "warmer"
gruvbox = false end,
onedark = true ["onedark_light"] = function()
onedark_style = "warmer" gruvbox = false
end, onedark = true
["onedark_light"] = function() onedark_style = "light"
gruvbox = false end,
onedark = true ["lunar"] = function()
onedark_style = "light" gruvbox = false
end, lunar = true
["lunar"] = function() end,
gruvbox = false ["nord"] = function()
lunar = true gruvbox = false
end, nord = true
["nord"] = function() end,
gruvbox = false ["catppuccin"] = function()
nord = true gruvbox = false
end, catppuccin = true
["catppuccin"] = function() end,
gruvbox = false ["catppuccin-latte"] = function()
catppuccin = true gruvbox = false
end, catppuccin = true
["catppuccin-latte"] = function() end,
gruvbox = false ["catppuccin-frappe"] = function()
catppuccin = true gruvbox = false
end, catppuccin = true
["catppuccin-frappe"] = function() end,
gruvbox = false ["catppuccin-macchiato"] = function()
catppuccin = true gruvbox = false
end, catppuccin = true
["catppuccin-macchiato"] = function() end,
gruvbox = false ["catppuccin-mocha"] = function()
catppuccin = true gruvbox = false
end, catppuccin = true
["catppuccin-mocha"] = function() end,
gruvbox = false ["dracula"] = function()
catppuccin = true gruvbox = false
end, dracula = true
["dracula"] = function() end,
gruvbox = false ["nightfox"] = function()
dracula = true gruvbox = false
end, nightfox = true
["nightfox"] = function() end,
gruvbox = false ["dayfox"] = function()
nightfox = true gruvbox = false
end, nightfox = true
["dayfox"] = function() end,
gruvbox = false ["dawnfox"] = function()
nightfox = true gruvbox = false
end, nightfox = true
["dawnfox"] = function() end,
gruvbox = false ["duskfox"] = function()
nightfox = true gruvbox = false
end, nightfox = true
["duskfox"] = function() end,
gruvbox = false ["nordfox"] = function()
nightfox = true gruvbox = false
end, nightfox = true
["nordfox"] = function() end,
gruvbox = false ["terafox"] = function()
nightfox = true gruvbox = false
end, nightfox = true
["terafox"] = function() end,
gruvbox = false ["carbonfox"] = function()
nightfox = true gruvbox = false
end, nightfox = true
["carbonfox"] = function() end,
gruvbox = false ["gruvbox-baby"] = function()
nightfox = true gruvbox = true
end, end,
["gruvbox-baby"] = function() default = function()
gruvbox = true gruvbox = true
end, end,
default = function() })
gruvbox = true
end,
})
end
end
local transparent = false local transparent = false
local transparent_mode = config.transparent_mode local transparent_mode = vim.g.pcode_transparent_mode
if transparent_mode ~= nil then if transparent_mode ~= nil then
if transparent_mode == 1 then if transparent_mode == 1 then
transparent = true transparent = true

View file

@ -14,4 +14,5 @@ local onsave, _ = pcall(require, "user.format_onsave")
if onsave then if onsave then
require("user.format_onsave") require("user.format_onsave")
end end
vim.g.pcode_icons = require("user.icons")
return {} return {}

View file

@ -1,4 +1,4 @@
local icons = require("user.icons") local icons = vim.g.pcode_icons
return { return {
"lewis6991/gitsigns.nvim", "lewis6991/gitsigns.nvim",
lazy = true, lazy = true,

View file

@ -1,68 +1,68 @@
return { return {
-- plugin ini merupakan penyedia library neovim lua -- plugin ini merupakan penyedia library neovim lua
{ -- {
"nvim-lua/plenary.nvim", -- "nvim-lua/plenary.nvim",
lazy = true, -- lazy = true,
}, -- },
-- coloring code -- coloring code
{ -- {
"nvim-treesitter/nvim-treesitter", -- "nvim-treesitter/nvim-treesitter",
lazy = true, -- lazy = true,
event = "BufRead", -- event = "BufRead",
cmd = { -- cmd = {
"TSBufDisable", -- "TSBufDisable",
"TSBufEnable", -- "TSBufEnable",
"TSBufToggle", -- "TSBufToggle",
"TSDisable", -- "TSDisable",
"TSEnable", -- "TSEnable",
"TSToggle", -- "TSToggle",
"TSInstall", -- "TSInstall",
"TSInstallInfo", -- "TSInstallInfo",
"TSInstallSync", -- "TSInstallSync",
"TSModuleInfo", -- "TSModuleInfo",
"TSUninstall", -- "TSUninstall",
"TSUpdate", -- "TSUpdate",
"TSUpdateSync", -- "TSUpdateSync",
}, -- },
build = function() -- build = function()
local status_ok, ts = pcall(require, "nvim-treesitter.install") -- local status_ok, ts = pcall(require, "nvim-treesitter.install")
if not status_ok then -- if not status_ok then
return -- return
end -- end
ts.update({ with_sync = true })() -- ts.update({ with_sync = true })()
end, -- end,
config = function() -- config = function()
local status_ok, _ = pcall(require, "nvim-treesitter") -- local status_ok, _ = pcall(require, "nvim-treesitter")
if not status_ok then -- if not status_ok then
return -- return
end -- end
require("user.treesitter") -- require("user.treesitter")
end, -- end,
}, -- },
-- snippets -- snippets
{ -- {
"rafamadriz/friendly-snippets", -- "rafamadriz/friendly-snippets",
event = "InsertEnter", -- event = "InsertEnter",
lazy = true, -- lazy = true,
config = function() -- config = function()
require("luasnip.loaders.from_vscode").lazy_load() -- require("luasnip.loaders.from_vscode").lazy_load()
require("user.snippets") -- require("user.snippets")
require("user.snip") -- require("user.snip")
end, -- end,
}, -- },
{ -- {
"L3MON4D3/LuaSnip", -- "L3MON4D3/LuaSnip",
lazy = true, -- lazy = true,
opts = { -- opts = {
history = true, -- history = true,
delete_check_events = "TextChanged", -- delete_check_events = "TextChanged",
}, -- },
-- stylua: ignore -- -- stylua: ignore
keys = { -- keys = {
{ "<tab>", function() require("luasnip").jump(1) end, mode = "s" }, -- { "<tab>", function() require("luasnip").jump(1) end, mode = "s" },
{ "<s-tab>", function() require("luasnip").jump(-1) end, mode = { "i", "s" } }, -- { "<s-tab>", function() require("luasnip").jump(-1) end, mode = { "i", "s" } },
}, -- },
}, -- },
-- { -- {
-- "neovim/nvim-lspconfig", -- "neovim/nvim-lspconfig",
-- lazy = true, -- lazy = true,
@ -84,64 +84,64 @@ return {
-- end, -- end,
-- }, -- },
-- for formater linter -- for formater linter
{ -- {
"RRethy/vim-illuminate", -- "RRethy/vim-illuminate",
event = "BufRead", -- event = "BufRead",
lazy = true, -- lazy = true,
config = function() -- config = function()
local status_ok, illuminate = pcall(require, "illuminate") -- local status_ok, illuminate = pcall(require, "illuminate")
if not status_ok then -- if not status_ok then
return -- return
end -- end
illuminate.configure({ -- illuminate.configure({
options = { -- options = {
providers = { -- providers = {
"lsp", -- "lsp",
"treesitter", -- "treesitter",
"regex", -- "regex",
}, -- },
-- delay: delay in milliseconds -- -- delay: delay in milliseconds
delay = 120, -- delay = 120,
-- filetype_overrides: filetype specific overrides. -- -- filetype_overrides: filetype specific overrides.
-- The keys are strings to represent the filetype while the values are tables that -- -- The keys are strings to represent the filetype while the values are tables that
-- supports the same keys passed to .configure except for filetypes_denylist and filetypes_allowlist -- -- supports the same keys passed to .configure except for filetypes_denylist and filetypes_allowlist
filetype_overrides = {}, -- filetype_overrides = {},
-- filetypes_denylist: filetypes to not illuminate, this overrides filetypes_allowlist -- -- filetypes_denylist: filetypes to not illuminate, this overrides filetypes_allowlist
filetypes_denylist = { -- filetypes_denylist = {
"dirvish", -- "dirvish",
"fugitive", -- "fugitive",
"alpha", -- "alpha",
"NvimTree", -- "NvimTree",
"lazy", -- "lazy",
"neogitstatus", -- "neogitstatus",
"Trouble", -- "Trouble",
"lir", -- "lir",
"Outline", -- "Outline",
"spectre_panel", -- "spectre_panel",
"toggleterm", -- "toggleterm",
"DressingSelect", -- "DressingSelect",
"TelescopePrompt", -- "TelescopePrompt",
}, -- },
-- filetypes_allowlist: filetypes to illuminate, this is overridden by filetypes_denylist -- -- filetypes_allowlist: filetypes to illuminate, this is overridden by filetypes_denylist
filetypes_allowlist = {}, -- filetypes_allowlist = {},
-- modes_denylist: modes to not illuminate, this overrides modes_allowlist -- -- modes_denylist: modes to not illuminate, this overrides modes_allowlist
modes_denylist = {}, -- modes_denylist = {},
-- modes_allowlist: modes to illuminate, this is overridden by modes_denylist -- -- modes_allowlist: modes to illuminate, this is overridden by modes_denylist
modes_allowlist = {}, -- modes_allowlist = {},
-- providers_regex_syntax_denylist: syntax to not illuminate, this overrides providers_regex_syntax_allowlist -- -- providers_regex_syntax_denylist: syntax to not illuminate, this overrides providers_regex_syntax_allowlist
-- Only applies to the 'regex' provider -- -- Only applies to the 'regex' provider
-- Use :echom synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name') -- -- Use :echom synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name')
providers_regex_syntax_denylist = {}, -- providers_regex_syntax_denylist = {},
-- providers_regex_syntax_allowlist: syntax to illuminate, this is overridden by providers_regex_syntax_denylist -- -- providers_regex_syntax_allowlist: syntax to illuminate, this is overridden by providers_regex_syntax_denylist
-- Only applies to the 'regex' provider -- -- Only applies to the 'regex' provider
-- Use :echom synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name') -- -- Use :echom synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name')
providers_regex_syntax_allowlist = {}, -- providers_regex_syntax_allowlist = {},
-- under_cursor: whether or not to illuminate under the cursor -- -- under_cursor: whether or not to illuminate under the cursor
under_cursor = true, -- under_cursor = true,
}, -- },
}) -- })
end, -- end,
}, -- },
-- { -- {
-- "jayp0521/mason-null-ls.nvim", -- "jayp0521/mason-null-ls.nvim",
-- lazy = true, -- lazy = true,
@ -161,285 +161,285 @@ return {
-- end, -- end,
-- }, -- },
-- debuging -- debuging
{ -- {
"rcarriga/nvim-dap-ui", -- "rcarriga/nvim-dap-ui",
lazy = true, -- lazy = true,
event = "BufRead", -- event = "BufRead",
dependencies = "mfussenegger/nvim-dap", -- dependencies = "mfussenegger/nvim-dap",
enabled = vim.fn.has("win32") == 0, -- enabled = vim.fn.has("win32") == 0,
config = function() -- config = function()
require("user.dapui") -- require("user.dapui")
end, -- end,
}, -- },
{ -- {
"jay-babu/mason-nvim-dap.nvim", -- "jay-babu/mason-nvim-dap.nvim",
lazy = true, -- lazy = true,
event = "BufRead", -- event = "BufRead",
dependencies = { "williamboman/mason.nvim", "mfussenegger/nvim-dap" }, -- dependencies = { "williamboman/mason.nvim", "mfussenegger/nvim-dap" },
enabled = vim.fn.has("win32") == 0, -- enabled = vim.fn.has("win32") == 0,
config = function() -- config = function()
require("user.mason_dap") -- require("user.mason_dap")
end, -- end,
}, -- },
-- auto pairs -- auto pairs
{ -- {
"windwp/nvim-autopairs", -- "windwp/nvim-autopairs",
lazy = true, -- lazy = true,
-- commit = "4fc96c8f3df89b6d23e5092d31c866c53a346347", -- -- commit = "4fc96c8f3df89b6d23e5092d31c866c53a346347",
dependencies = "hrsh7th/nvim-cmp", -- dependencies = "hrsh7th/nvim-cmp",
event = "InsertEnter", -- event = "InsertEnter",
config = function() -- config = function()
require("user.autopairs") -- require("user.autopairs")
end, -- end,
}, -- },
-- untuk comment -- untuk comment
{ -- {
"JoosepAlviste/nvim-ts-context-commentstring", -- "JoosepAlviste/nvim-ts-context-commentstring",
lazy = true, -- lazy = true,
dependencies = "nvim-treesitter/nvim-treesitter", -- dependencies = "nvim-treesitter/nvim-treesitter",
config = function() -- config = function()
require("ts_context_commentstring").setup({ -- require("ts_context_commentstring").setup({
enable_autocmd = false, -- enable_autocmd = false,
}) -- })
end, -- end,
}, -- },
{ -- {
"numToStr/Comment.nvim", -- "numToStr/Comment.nvim",
lazy = true, -- lazy = true,
config = function() -- config = function()
require("user.comment") -- require("user.comment")
end, -- end,
}, -- },
{ -- {
"lukas-reineke/indent-blankline.nvim", -- "lukas-reineke/indent-blankline.nvim",
version = "3.5.4", -- version = "3.5.4",
event = { "BufRead", "InsertEnter", "BufNewFile" }, -- event = { "BufRead", "InsertEnter", "BufNewFile" },
lazy = true, -- lazy = true,
opts = { -- opts = {
indent = { -- indent = {
char = "", -- char = "│",
tab_char = "", -- tab_char = "│",
}, -- },
scope = { enabled = false }, -- scope = { enabled = false },
exclude = { -- exclude = {
buftypes = { -- buftypes = {
"nofile", -- "nofile",
"prompt", -- "prompt",
"quickfix", -- "quickfix",
"terminal", -- "terminal",
}, -- },
filetypes = { -- filetypes = {
"help", -- "help",
"alpha", -- "alpha",
"dashboard", -- "dashboard",
"neo-tree", -- "neo-tree",
"Trouble", -- "Trouble",
"trouble", -- "trouble",
"lazy", -- "lazy",
"mason", -- "mason",
"notify", -- "notify",
"toggleterm", -- "toggleterm",
"lazyterm", -- "lazyterm",
"NvimTree", -- "NvimTree",
"aerial", -- "aerial",
"neogitstatus", -- "neogitstatus",
"startify", -- "startify",
}, -- },
}, -- },
}, -- },
main = "ibl", -- main = "ibl",
}, -- },
-- for multi cursor select -- for multi cursor select
{ -- {
"mg979/vim-visual-multi", -- "mg979/vim-visual-multi",
event = { "BufRead", "InsertEnter", "BufNewFile" }, -- event = { "BufRead", "InsertEnter", "BufNewFile" },
lazy = true, -- lazy = true,
init = function() -- init = function()
vim.g.VM_mouse_mappings = 1 -- equal CTRL + Left Click on VSCODE -- vim.g.VM_mouse_mappings = 1 -- equal CTRL + Left Click on VSCODE
vim.g.VM_maps = { -- vim.g.VM_maps = {
["Find Under"] = "<C-d>", -- equal CTRL+D on VSCODE -- ["Find Under"] = "<C-d>", -- equal CTRL+D on VSCODE
["Find Subword Under"] = "<C-d>", -- equal CTRL+D on VSCODE -- ["Find Subword Under"] = "<C-d>", -- equal CTRL+D on VSCODE
["Select Cursor Down"] = "<M-C-Down>", -- equal CTRL+ALT+DOWN on VSCODE -- ["Select Cursor Down"] = "<M-C-Down>", -- equal CTRL+ALT+DOWN on VSCODE
["Select Cursor Up"] = "<M-C-Up>", -- equal CTRL+ALT+UP on VSCODE -- ["Select Cursor Up"] = "<M-C-Up>", -- equal CTRL+ALT+UP on VSCODE
} -- }
end, -- end,
}, -- },
-- for auto close tag -- for auto close tag
{ -- {
"windwp/nvim-ts-autotag", -- "windwp/nvim-ts-autotag",
lazy = true, -- lazy = true,
event = "BufRead", -- event = "BufRead",
dependencies = "nvim-treesitter/nvim-treesitter", -- dependencies = "nvim-treesitter/nvim-treesitter",
config = function() -- config = function()
require("nvim-ts-autotag").setup() -- require("nvim-ts-autotag").setup()
end, -- end,
}, -- },
-- for auto detection file and run code -- for auto detection file and run code
{ -- {
"CRAG666/code_runner.nvim", -- "CRAG666/code_runner.nvim",
lazy = true, -- lazy = true,
cmd = { "RunCode", "RunFile", "RunProject", "RunClose" }, -- cmd = { "RunCode", "RunFile", "RunProject", "RunClose" },
config = function() -- config = function()
require("user.coderunner") -- require("user.coderunner")
end, -- end,
}, -- },
-- for color view -- for color view
{ -- {
"NvChad/nvim-colorizer.lua", -- "NvChad/nvim-colorizer.lua",
lazy = true, -- lazy = true,
event = { "BufRead", "InsertEnter", "BufNewFile" }, -- event = { "BufRead", "InsertEnter", "BufNewFile" },
opts = { -- opts = {
user_default_options = { -- user_default_options = {
RGB = true, -- #RGB hex codes -- RGB = true, -- #RGB hex codes
RRGGBB = true, -- #RRGGBB hex codes -- RRGGBB = true, -- #RRGGBB hex codes
names = true, -- "Name" codes like Blue -- names = true, -- "Name" codes like Blue
RRGGBBAA = true, -- #RRGGBBAA hex codes -- RRGGBBAA = true, -- #RRGGBBAA hex codes
rgb_fn = true, -- CSS rgb() and rgba() functions -- rgb_fn = true, -- CSS rgb() and rgba() functions
hsl_fn = true, -- CSS hsl() and hsla() functions -- hsl_fn = true, -- CSS hsl() and hsla() functions
css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB -- css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn -- css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn
-- Available modes: foreground, background -- -- Available modes: foreground, background
mode = "background", -- Set the display mode. -- mode = "background", -- Set the display mode.
tailwind = true, -- tailwind = true,
}, -- },
filetypes = { -- filetypes = {
"*", -- Highlight all files, but customize some others. -- "*", -- Highlight all files, but customize some others.
css = { rgb_fn = true }, -- Enable parsing rgb(...) functions in css. -- css = { rgb_fn = true }, -- Enable parsing rgb(...) functions in css.
html = { names = false }, -- Disable parsing "names" like Blue or Gray -- html = { names = false }, -- Disable parsing "names" like Blue or Gray
}, -- },
}, -- },
}, -- },
-- for winbar icon -- for winbar icon
{ -- {
"SmiteshP/nvim-navic", -- "SmiteshP/nvim-navic",
lazy = true, -- lazy = true,
dependencies = "neovim/nvim-lspconfig", -- dependencies = "neovim/nvim-lspconfig",
event = "InsertEnter", -- event = "InsertEnter",
config = function() -- config = function()
require("user.breadcrumb") -- require("user.breadcrumb")
require("user.winbar") -- require("user.winbar")
end, -- end,
}, -- },
-- for popup alert -- for popup alert
{ -- {
"rcarriga/nvim-notify", -- "rcarriga/nvim-notify",
lazy = true, -- lazy = true,
-- event = "BufWinEnter", -- -- event = "BufWinEnter",
event = "VeryLazy", -- event = "VeryLazy",
keys = { -- keys = {
{ -- {
"<leader>un", -- "<leader>un",
function() -- function()
require("notify").dismiss({ silent = true, pending = true }) -- require("notify").dismiss({ silent = true, pending = true })
end, -- end,
desc = "Delete all Notifications", -- desc = "Delete all Notifications",
}, -- },
}, -- },
opts = { -- opts = {
timeout = 3000, -- timeout = 3000,
max_height = function() -- max_height = function()
return math.floor(vim.o.lines * 0.75) -- return math.floor(vim.o.lines * 0.75)
end, -- end,
max_width = function() -- max_width = function()
return math.floor(vim.o.columns * 0.75) -- return math.floor(vim.o.columns * 0.75)
end, -- end,
}, -- },
-- event = "BufWinEnter", -- -- event = "BufWinEnter",
config = function() -- config = function()
local notify = require("notify") -- local notify = require("notify")
-- this for transparency -- -- this for transparency
notify.setup({ background_colour = "#000000" }) -- notify.setup({ background_colour = "#000000" })
-- this overwrites the vim notify function -- -- this overwrites the vim notify function
vim.notify = notify.notify -- vim.notify = notify.notify
end, -- end,
}, -- },
-- for resize screen -- for resize screen
{ -- {
"mrjones2014/smart-splits.nvim", -- "mrjones2014/smart-splits.nvim",
lazy = true, -- lazy = true,
event = { "BufRead", "InsertEnter", "BufNewFile" }, -- event = { "BufRead", "InsertEnter", "BufNewFile" },
config = function() -- config = function()
require("user.smartspit") -- require("user.smartspit")
end, -- end,
}, -- },
-- for popup input -- for popup input
{ -- {
"stevearc/dressing.nvim", -- "stevearc/dressing.nvim",
lazy = true, -- lazy = true,
init = function() -- init = function()
---@diagnostic disable-next-line: duplicate-set-field -- ---@diagnostic disable-next-line: duplicate-set-field
vim.ui.select = function(...) -- vim.ui.select = function(...)
require("lazy").load({ plugins = { "dressing.nvim" } }) -- require("lazy").load({ plugins = { "dressing.nvim" } })
return vim.ui.select(...) -- return vim.ui.select(...)
end -- end
---@diagnostic disable-next-line: duplicate-set-field -- ---@diagnostic disable-next-line: duplicate-set-field
vim.ui.input = function(...) -- vim.ui.input = function(...)
require("lazy").load({ plugins = { "dressing.nvim" } }) -- require("lazy").load({ plugins = { "dressing.nvim" } })
return vim.ui.input(...) -- return vim.ui.input(...)
end -- end
end, -- end,
config = function() -- config = function()
require("user.dressing") -- require("user.dressing")
end, -- end,
}, -- mini scrollview -- }, -- mini scrollview
{ -- {
"dstein64/nvim-scrollview", -- "dstein64/nvim-scrollview",
lazy = true, -- lazy = true,
-- event = "BufWinEnter", -- -- event = "BufWinEnter",
event = { "BufRead", "InsertEnter", "BufNewFile" }, -- event = { "BufRead", "InsertEnter", "BufNewFile" },
config = function() -- config = function()
require("user.nvimscroll") -- require("user.nvimscroll")
end, -- end,
}, -- },
-- for check startuptime -- for check startuptime
{ "dstein64/vim-startuptime", lazy = true, cmd = "StartupTime" }, -- { "dstein64/vim-startuptime", lazy = true, cmd = "StartupTime" },
-- { -- {
-- "pojokcodeid/nvim-ts-rainbow2", -- "pojokcodeid/nvim-ts-rainbow2",
-- lazy = true, -- lazy = true,
-- event = "BufRead", -- event = "BufRead",
-- dependencies = "nvim-treesitter/nvim-treesitter", -- dependencies = "nvim-treesitter/nvim-treesitter",
-- }, -- },
{ -- {
"hiphish/rainbow-delimiters.nvim", -- "hiphish/rainbow-delimiters.nvim",
lazy = true, -- lazy = true,
event = "BufRead", -- event = "BufRead",
config = function() -- config = function()
-- Modul ini berisi beberapa definisi default -- -- Modul ini berisi beberapa definisi default
local rainbow_delimiters = require("rainbow-delimiters") -- local rainbow_delimiters = require("rainbow-delimiters")
vim.g.rainbow_delimiters = { -- vim.g.rainbow_delimiters = {
strategy = { -- strategy = {
[""] = rainbow_delimiters.strategy["global"], -- [""] = rainbow_delimiters.strategy["global"],
vim = rainbow_delimiters.strategy["local"], -- vim = rainbow_delimiters.strategy["local"],
}, -- },
query = { -- query = {
[""] = "rainbow-delimiters", -- [""] = "rainbow-delimiters",
lua = "rainbow-blocks", -- lua = "rainbow-blocks",
}, -- },
priority = { -- priority = {
[""] = 110, -- [""] = 110,
lua = 210, -- lua = 210,
}, -- },
highlight = { -- highlight = {
"RainbowDelimiterRed", -- "RainbowDelimiterRed",
"RainbowDelimiterYellow", -- "RainbowDelimiterYellow",
"RainbowDelimiterBlue", -- "RainbowDelimiterBlue",
"RainbowDelimiterOrange", -- "RainbowDelimiterOrange",
"RainbowDelimiterGreen", -- "RainbowDelimiterGreen",
"RainbowDelimiterViolet", -- "RainbowDelimiterViolet",
"RainbowDelimiterCyan", -- "RainbowDelimiterCyan",
}, -- },
} -- }
end, -- end,
}, -- },
{ -- {
"lewis6991/gitsigns.nvim", -- "lewis6991/gitsigns.nvim",
lazy = true, -- lazy = true,
enabled = vim.fn.executable("git") == 1, -- enabled = vim.fn.executable("git") == 1,
ft = "gitcommit", -- ft = "gitcommit",
-- event = "BufWinEnter", -- -- event = "BufWinEnter",
event = "BufRead", -- event = "BufRead",
config = function() -- config = function()
require("user.gitsigns") -- require("user.gitsigns")
end, -- end,
}, -- },
} }

View file

@ -21,39 +21,34 @@ return {
-- check config for theme -- check config for theme
local set_theme = "auto" local set_theme = "auto"
local bubbles_theme local bubbles_theme
local data_exists, config = pcall(require, "core.config") local color = vim.g.pcode_colorscheme
if data_exists then switch(color, {
if config.colorscheme ~= nil then ["tokyonight"] = function()
local color = config.colorscheme set_theme = "auto"
switch(color, { end,
["tokyonight"] = function() ["tokyonight-night"] = function()
set_theme = "auto" set_theme = "auto"
end, end,
["tokyonight-night"] = function() ["tokyonight-storm"] = function()
set_theme = "auto" set_theme = "auto"
end, end,
["tokyonight-storm"] = function() ["tokyonight-day"] = function()
set_theme = "auto" set_theme = "auto"
end, end,
["tokyonight-day"] = function() ["tokyonight-moon"] = function()
set_theme = "auto" set_theme = "auto"
end, end,
["tokyonight-moon"] = function() ["dracula"] = function()
set_theme = "auto" local clr = require("dracula").colors()
end, colors.blue = clr.green
["dracula"] = function() colors.black = clr.black
local clr = require("dracula").colors() colors.cyan = clr.yellow
colors.blue = clr.green set_theme = "bubbles_theme"
colors.black = clr.black end,
colors.cyan = clr.yellow default = function()
set_theme = "bubbles_theme" set_theme = "auto"
end, end,
default = function() })
set_theme = "auto"
end,
})
end
end
bubbles_theme = component.bubbles_theme(colors) bubbles_theme = component.bubbles_theme(colors)
if set_theme == "auto" then if set_theme == "auto" then

View file

@ -1,4 +1,4 @@
local icons = require("user.icons") local icons = vim.g.pcode_icons
return { return {
"kyazdani42/nvim-tree.lua", "kyazdani42/nvim-tree.lua",
lazy = true, lazy = true,

View file

@ -4,7 +4,7 @@ return {
keys = { "<leader>", '"', "'", "`", "c", "v" }, keys = { "<leader>", '"', "'", "`", "c", "v" },
event = "VeryLazy", event = "VeryLazy",
opts = function() opts = function()
local icons = require("user.icons") local icons = vim.g.pcode_icons
return { return {
plugins = { plugins = {
marks = false, -- shows a list of your marks on ' and ` marks = false, -- shows a list of your marks on ' and `
@ -95,12 +95,7 @@ return {
nowait = true, -- use `nowait` when creating keymaps nowait = true, -- use `nowait` when creating keymaps
} }
local wkey = {} local wkey = vim.g.pcode_whichkey
local data_exists, key = pcall(require, "core.config")
if data_exists then
wkey = key.whichkey
end
local which_key = require("which-key") local which_key = require("which-key")
which_key.setup(opts) which_key.setup(opts)
which_key.register(require("user.utils.whichkey").mappings, opt) which_key.register(require("user.utils.whichkey").mappings, opt)

View file

@ -1,14 +1,9 @@
local data_exists, custom_dasboard = pcall(require, "core.config") local model = vim.g.pcode_model
if data_exists then if model ~= nil then
local model = custom_dasboard.model if model == 1 then
if model ~= nil then
if model == 1 then
require("user.startify")
else
require("user.dashboard")
end
else
require("user.startify") require("user.startify")
else
require("user.dashboard")
end end
else else
require("user.startify") require("user.startify")

View file

@ -3,7 +3,7 @@ if not status_ok then
return return
end end
local ico = require("user.icons") local ico = vim.g.pcode_icons
local icons = ico.kind local icons = ico.kind
navic.setup({ navic.setup({

View file

@ -1,22 +1,33 @@
local colorscheme = "gruvbox-baby" local colorscheme = vim.g.pcode_colorscheme
local lst_style = local lst_style = {
{ "sonokai", "sonokai_atlantis", "sonokai_andromeda", "sonokai_shusia", "sonokai_maia", "sonokai_espresso" } "sonokai",
local lst_material = { "material", "material_deepocean", "material_palenight", "material_lighter", "material_darker" } "sonokai_atlantis",
local lst_onedark = "sonokai_andromeda",
{ "onedark", "onedark_darker", "onedark_cool", "onedark_deep,onedark_warm", "onedark_warmer", "onedark_light" } "sonokai_shusia",
local data_exists, config = pcall(require, "core.config") "sonokai_maia",
if data_exists then "sonokai_espresso",
if config.colorscheme ~= nil then }
colorscheme = config.colorscheme local lst_material = {
else "material",
colorscheme = "gruvbox-baby" "material_deepocean",
end "material_palenight",
local transparent_mode = config.transparent_mode "material_lighter",
if transparent_mode ~= nil then "material_darker",
if transparent_mode == 1 then }
vim.g.gruvbox_baby_transparent_mode = 1 local lst_onedark = {
vim.g.sonokai_transparent_background = 2 "onedark",
end "onedark_darker",
"onedark_cool",
"onedark_deep,onedark_warm",
"onedark_warmer",
"onedark_light",
}
local transparent_mode = vim.g.pcode_transparent_mode
if transparent_mode ~= nil then
if transparent_mode == 1 then
vim.g.gruvbox_baby_transparent_mode = 1
vim.g.sonokai_transparent_background = 2
end end
end end
@ -38,10 +49,5 @@ for _, v in pairs(lst_onedark) do
break break
end end
end end
local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme)
if not status_ok then vim.cmd("colorscheme " .. colorscheme)
local ok, _ = pcall(vim.cmd, "colorscheme " .. "gruvbox-baby")
if not ok then
return
end
end

View file

@ -14,12 +14,9 @@ local board = {
[[|_| |__/ ]], [[|_| |__/ ]],
} }
local data_exists, custom_dasboard = pcall(require, "core.config") local data_board = vim.g.pcode_header2
if data_exists then if data_board ~= nil then
local data_board = custom_dasboard.header2 board = data_board
if data_board ~= nil then
board = data_board
end
end end
local dashboard = require("alpha.themes.dashboard") local dashboard = require("alpha.themes.dashboard")
@ -44,11 +41,9 @@ dashboard.opts.opts.noautocmd = true
alpha.setup(dashboard.opts) alpha.setup(dashboard.opts)
local footer_text = "Pojok Code" local footer_text = "Pojok Code"
if data_exists then local data_txt = vim.g.pcode_footer
local data_txt = custom_dasboard.footer if data_txt ~= nil then
if data_txt ~= nil then footer_text = data_txt
footer_text = data_txt
end
end end
vim.api.nvim_create_autocmd("User", { vim.api.nvim_create_autocmd("User", {

View file

@ -1,13 +1,12 @@
local run = 0 local run = 0
local data_exists, frmt = pcall(require, "core.config") local frmt = vim.g.pcode_format_on_save
if not data_exists then if frmt == 1 then
run = 1
end
if frmt.format_on_save == 1 then
run = 1 run = 1
else
run = 0
end end
local buf_clients = vim.lsp.buf_get_clients() local buf_clients = vim.lsp.get_clients()
if next(buf_clients) == nil then if next(buf_clients) == nil then
run = 0 run = 0
end end

View file

@ -9,11 +9,8 @@ local lspconfig = require("lspconfig")
-- local servers = { "jdtls", "yamlls" } -- local servers = { "jdtls", "yamlls" }
local servers = {} local servers = {}
local data_exists, custom_lsp = pcall(require, "core.config") for _, client in pairs(vim.g.pcode_lsp_installer) do
if data_exists then table.insert(servers, client)
for _, client in pairs(custom_lsp.lsp_installer) do
table.insert(servers, client)
end
end end
lsp_installer.setup({ lsp_installer.setup({

View file

@ -5,13 +5,8 @@ if not status_cmp_ok then
return return
end end
local lspvitualtext = false local lspvitualtext = vim.g.pcode_lsp_virtualtext
local data_exists, lspconfig = pcall(require, "core.config") local icons = vim.g.pcode_icons
if data_exists then
lspvitualtext = lspconfig.lsp_virtualtext
end
local icons = require("user.icons")
M.capabilities = vim.lsp.protocol.make_client_capabilities() M.capabilities = vim.lsp.protocol.make_client_capabilities()
M.capabilities.textDocument.completion.completionItem.snippetSupport = true M.capabilities.textDocument.completion.completionItem.snippetSupport = true

View file

@ -11,31 +11,18 @@ local function idxOf(array, value)
return nil return nil
end end
local data_exists, custom_lsp = pcall(require, "core.config") for _, client in pairs(vim.g.pcode_mason_ensure_installed) do
if data_exists then table.insert(servers, client)
for _, client in pairs(custom_lsp.mason_ensure_installed) do
table.insert(servers, client)
end
end end
local unregis_lsp = {} local unregis_lsp = vim.g.pcode_unregister_lsp
local data_ok, unregis = pcall(require, "core.config") local icons = vim.g.pcode_icons.ui
if data_ok then
if unregis.unregister_lsp ~= nil then
unregis_lsp = unregis.unregister_lsp
end
end
local icons = require("user.icons").ui
local settings = { local settings = {
ui = { ui = {
-- border = "none", -- border = "none",
border = icons.Border, border = icons.Border,
icons = { icons = {
-- package_installed = "◍",
-- package_pending = "◍",
-- package_uninstalled = "◍",
package_pending = icons.DotCircle, package_pending = icons.DotCircle,
package_installed = icons.CheckCircle, package_installed = icons.CheckCircle,
package_uninstalled = icons.BlankCircle, package_uninstalled = icons.BlankCircle,

View file

@ -20,12 +20,9 @@ if data_ok then
end end
end end
local data_exists, data = pcall(require, "core.config") -- load data null-ls
if data_exists then for _, nullls in pairs(vim.g.pcode_null_ls_ensure_installed) do
-- load data null-ls table.insert(ensure_installed, nullls)
for _, nullls in pairs(data.null_ls_ensure_installed) do
table.insert(ensure_installed, nullls)
end
end end
local mason_ok, mason_null_ls = pcall(require, "mason-null-ls") local mason_ok, mason_null_ls = pcall(require, "mason-null-ls")
@ -36,11 +33,8 @@ if mason_ok then
end end
local run = 0 local run = 0
local ok, frmt = pcall(require, "core.config") local frmt = vim.g.pcode_format_on_save
if not ok then if frmt == 1 then
run = 1
end
if frmt.format_on_save == 1 then
run = 1 run = 1
end end

View file

@ -1,39 +0,0 @@
require("onedark").setup({
-- Main options --
style = "darker", -- Default theme style. Choose between 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' and 'light'
transparent = true, -- Show/hide background
term_colors = true, -- Change terminal color as per the selected theme style
ending_tildes = false, -- Show the end-of-buffer tildes. By default they are hidden
cmp_itemkind_reverse = false, -- reverse item kind highlights in cmp menu
-- toggle theme style ---
toggle_style_key = nil, -- keybind to toggle theme style. Leave it nil to disable it, or set it to a string, for example "<leader>ts"
toggle_style_list = { "dark", "darker", "cool", "deep", "warm", "warmer", "light" }, -- List of styles to toggle between
-- Change code style ---
-- Options are italic, bold, underline, none
-- You can configure multiple style with comma seperated, For e.g., keywords = 'italic,bold'
code_style = {
comments = "italic",
keywords = "none",
functions = "none",
strings = "none",
variables = "none",
},
-- Lualine options --
lualine = {
transparent = false, -- lualine center bar transparency
},
-- Custom Highlights --
colors = {}, -- Override default colors
highlights = {}, -- Override highlight groups
-- Plugins Config --
diagnostics = {
darker = true, -- darker colors for diagnostic
undercurl = true, -- use undercurl instead of underline for diagnostics
background = true, -- use background color for virtual text
},
})

View file

@ -9,13 +9,11 @@ dash_model = {
[[ /_/ |___/ ]], [[ /_/ |___/ ]],
} }
local data_exists, custom_dasboard = pcall(require, "core.config") local board = vim.g.pcode_header1
if data_exists then if board ~= nil then
local board = custom_dasboard.header1 dash_model = board
if board ~= nil then
dash_model = board
end
end end
startify.section.header.val = dash_model startify.section.header.val = dash_model
startify.section.top_buttons.val = { startify.section.top_buttons.val = {
startify.button("F", "󰈞 Find file", ":Telescope find_files <CR>"), startify.button("F", "󰈞 Find file", ":Telescope find_files <CR>"),
@ -41,11 +39,9 @@ startify.section.bottom_buttons.val = {
} }
local footer_text = "Pojok Code" local footer_text = "Pojok Code"
if data_exists then local data_txt = vim.g.pcode_footer
local data_txt = custom_dasboard.footer if data_txt ~= nil then
if data_txt ~= nil then footer_text = data_txt
footer_text = data_txt
end
end end
vim.api.nvim_create_autocmd("User", { vim.api.nvim_create_autocmd("User", {

View file

@ -5,17 +5,15 @@ end
local transp = false local transp = false
local sidebar = "normal" --"dark , transparent, normal" local sidebar = "normal" --"dark , transparent, normal"
local hilight = "#292e42" local hilight = "#292e42"
local data_exists, config = pcall(require, "core.config") local tras = vim.g.pcode_transparent_mode
if data_exists then if tras == 1 then
local tras = config.transparent_mode transp = true
if tras == 1 then sidebar = "transparent"
transp = true -- hilight = "#3E4254"
sidebar = "transparent" -- hilight = "#353a56"
-- hilight = "#3E4254" hilight = "#292e42"
-- hilight = "#353a56"
hilight = "#292e42"
end
end end
tokyonight.setup({ tokyonight.setup({
-- your configuration comes here -- your configuration comes here
-- or leave it empty to use the default settings -- or leave it empty to use the default settings

View file

@ -1,48 +0,0 @@
local status_ok, configs = pcall(require, "nvim-treesitter.configs")
if not status_ok then
return
end
configs.setup({
ensure_installed = {
"lua",
"vim",
},
ignore_install = { "phpdoc" }, -- List of parsers to ignore installing
highlight = {
enable = true,
disable = { "css" }, -- list of language that will be disabled
additional_vim_regex_highlighting = false,
},
-- context_commentstring = {
-- enable = true,
-- enable_autocmd = false,
-- config = {
-- Languages that have a single comment style
-- typescript = "// %s",
-- css = "/* %s */",
-- scss = "/* %s */",
-- html = "<!-- %s -->",
-- svelte = "<!-- %s -->",
-- vue = "<!-- %s -->",
-- jsx = "{/* %s */}",
-- json = "",
-- },
-- },
-- rainbow = {
-- enable = true,
-- disable = { "html", "tsx" },
-- equery = "rainbow-parens",
-- strategy = require("ts-rainbow").strategy.global,
-- },
-- rainbow = {
-- enable = false,
-- extended_mode = true, -- Highlight also non-parentheses delimiters, boolean or table: lang -> boolean
-- max_file_lines = 1000, -- Do not enable for files with more than 1000 lines, int
-- },
-- autotag = { enable = true, enable_rename = true, enable_close = true, enable_close_on_slash = true },
incremental_selection = { enable = true },
indent = { enable = true, disable = { "python", "css" } },
autopairs = {
enable = true,
},
})

View file

@ -1,7 +1,7 @@
local hide_in_width = function() local hide_in_width = function()
return vim.fn.winwidth(0) > 75 return vim.fn.winwidth(0) > 75
end end
local icons = require("user.icons") local icons = vim.g.pcode_icons
local formatter = require("user.utils.formatter") local formatter = require("user.utils.formatter")
local linter = require("user.utils.linter") local linter = require("user.utils.linter")

View file

@ -1,5 +1,5 @@
local active = true local active = true
local icons = require("user.icons") local icons = vim.g.pcode_icons
local excludes = function() local excludes = function()
return vim.tbl_contains({ return vim.tbl_contains({
"help", "help",