mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-22 00:49:01 +02:00
add: update default config
This commit is contained in:
parent
f468320299
commit
d1e7d99d27
18 changed files with 27 additions and 101 deletions
|
@ -10,10 +10,10 @@
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||||
"code_runner.nvim": { "branch": "main", "commit": "d135c4178bf8980ca5fa4aa6e27ab9ee4373c875" },
|
"code_runner.nvim": { "branch": "main", "commit": "d135c4178bf8980ca5fa4aa6e27ab9ee4373c875" },
|
||||||
"codeium.vim": { "branch": "main", "commit": "9406f13cf3eaa08318b76746bd105a04506cab27" },
|
"codeium.vim": { "branch": "main", "commit": "9406f13cf3eaa08318b76746bd105a04506cab27" },
|
||||||
|
"dracula.nvim": { "branch": "main", "commit": "8d8bddb8814c3e7e62d80dda65a9876f97eb699c" },
|
||||||
"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" },
|
||||||
"gruvbox-baby": { "branch": "main", "commit": "ea71b4225d0140103d99748ca4a33ecf22c03f62" },
|
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "ece00d5fb44d196680a81fd2761062d2fa44663b" },
|
"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" },
|
||||||
|
|
|
@ -1,68 +0,0 @@
|
||||||
-- local config
|
|
||||||
--
|
|
||||||
-- -- shim vim for kitty and other generators
|
|
||||||
-- vim = vim or { g = {}, o = {} }
|
|
||||||
--
|
|
||||||
-- local function opt(key, default)
|
|
||||||
-- key = "pcode_" .. key
|
|
||||||
-- if vim.g[key] == nil then
|
|
||||||
-- return default
|
|
||||||
-- end
|
|
||||||
-- -- if vim.g[key] == 0 then
|
|
||||||
-- -- return false
|
|
||||||
-- -- end
|
|
||||||
-- return vim.g[key]
|
|
||||||
-- end
|
|
||||||
--
|
|
||||||
-- config = {
|
|
||||||
-- colorscheme = opt("colorscheme", "gruvbox-baby"),
|
|
||||||
-- transparent_mode = opt("transparent_mode", 0),
|
|
||||||
-- clear_lualine = opt("clear_lualine", 0),
|
|
||||||
-- progress = opt("progress", 2),
|
|
||||||
-- lualine_style = opt("lualine_style", 0),
|
|
||||||
-- status_icon = opt("status_icon", 0),
|
|
||||||
-- custom_lualine = opt("custom_lualine", false),
|
|
||||||
-- component_separators = opt("component_separators", { left = " ", right = " " }),
|
|
||||||
-- section_separators = opt("section_separators", { left = " ", right = " " }),
|
|
||||||
-- header1 = opt("header1", nil),
|
|
||||||
-- header2 = opt("header2", nil),
|
|
||||||
-- footer = opt("footer", nil),
|
|
||||||
-- model = opt("model", 1),
|
|
||||||
-- format_on_save = opt("format_on_save", 1),
|
|
||||||
-- lsp_installer = opt("lsp_installer", {}),
|
|
||||||
-- mason_ensure_installed = opt("mason_ensure_installed", {}),
|
|
||||||
-- unregister_lsp = opt("unregister_lsp", {}),
|
|
||||||
-- null_ls_sources = opt("null_ls_sources", {}),
|
|
||||||
-- whichkey = opt("whichkey", {}),
|
|
||||||
-- 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),
|
|
||||||
-- lspghost_text = opt("lspghost_text", false),
|
|
||||||
-- loadnvimtree_lazy = opt("loadnvimtree_lazy", false),
|
|
||||||
-- icons = opt("icons", {}),
|
|
||||||
-- }
|
|
||||||
--
|
|
||||||
-- return config
|
|
||||||
vim.g.pcode_icons = require("user.icons")
|
|
||||||
vim.g.pcode_colorscheme = "gruvbox-baby"
|
|
||||||
vim.g.pcode_transparent_mode = 0
|
|
||||||
vim.g.pcode_clear_lualine = 0
|
|
||||||
vim.g.pcode_progress = 1
|
|
||||||
vim.g.pcode_format_on_save = 1
|
|
||||||
vim.g.pcode_lsp_installer = {}
|
|
||||||
vim.g.pcode_lsp_virtualtext = true
|
|
||||||
vim.g.pcode_lspghost_text = false
|
|
||||||
vim.g.pcode_mason_ensure_installed = {}
|
|
||||||
vim.g.pcode_unregister_lsp = {}
|
|
||||||
vim.g.pcode_null_ls_ensure_installed = {}
|
|
||||||
vim.g.pcode_dap_ensure_installed = {}
|
|
||||||
vim.g.pcode_whichkey = {}
|
|
||||||
vim.g.pcode_coderunner = {}
|
|
||||||
vim.g.pcode_cmprg = false
|
|
||||||
vim.g.pcode_cmpcalc = false
|
|
||||||
vim.g.pcode_cmptag = false
|
|
||||||
vim.g.pcode_loadnvimtree_lazy = true
|
|
|
@ -1,4 +1,3 @@
|
||||||
require("core.config")
|
|
||||||
require("custom.default")
|
require("custom.default")
|
||||||
require("custom.dashboard")
|
require("custom.dashboard")
|
||||||
require("config.lazy")
|
require("config.lazy")
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
local transparent_mode = vim.g.pcode_transparent_mode
|
local transparent_mode = vim.g.pcode_transparent_mode or 0
|
||||||
if transparent_mode ~= nil then
|
if transparent_mode ~= nil then
|
||||||
if transparent_mode == 1 then
|
if transparent_mode == 1 then
|
||||||
vim.cmd("TransparentDisable")
|
vim.cmd("TransparentDisable")
|
||||||
|
|
|
@ -26,7 +26,6 @@ vim.g.pcode_colorscheme = "dracula"
|
||||||
-- nightfox
|
-- nightfox
|
||||||
-- 0 =off 1= on
|
-- 0 =off 1= on
|
||||||
vim.g.pcode_transparent_mode = 0
|
vim.g.pcode_transparent_mode = 0
|
||||||
vim.g.pcode_clear_lualine = 0
|
|
||||||
-- 0 disable progress
|
-- 0 disable progress
|
||||||
-- 1 lualine lsp progress
|
-- 1 lualine lsp progress
|
||||||
-- 2 fidget progress
|
-- 2 fidget progress
|
||||||
|
@ -101,6 +100,3 @@ vim.g.pcode_coderunner = {
|
||||||
vim.g.pcode_cmprg = false --https://github.com/lukas-reineke/cmp-rg
|
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_cmpcalc = false --https://github.com/hrsh7th/cmp-calc
|
||||||
vim.g.pcode_cmptag = false --https://github.com/quangnguyen30192/cmp-nvim-tags
|
vim.g.pcode_cmptag = false --https://github.com/quangnguyen30192/cmp-nvim-tags
|
||||||
|
|
||||||
-- load nvim-tree or not
|
|
||||||
vim.g.pcode_loadnvimtree_lazy = true
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
local cmprg = vim.g.pcode_cmprg
|
local cmprg = vim.g.pcode_cmprg or false
|
||||||
local cmpcalc = vim.g.pcode_cmpcalc
|
local cmpcalc = vim.g.pcode_cmpcalc or false
|
||||||
local cmptag = vim.g.pcode_cmptag
|
local cmptag = vim.g.pcode_cmptag or false
|
||||||
local lspghost_text = vim.g.pcode_lspghost_text
|
local lspghost_text = vim.g.pcode_lspghost_text or false
|
||||||
local icons = require("user.icons").ui
|
local icons = require("user.icons").ui
|
||||||
return {
|
return {
|
||||||
{ "hrsh7th/cmp-nvim-lsp", event = "InsertEnter", lazy = true },
|
{ "hrsh7th/cmp-nvim-lsp", event = "InsertEnter", lazy = true },
|
||||||
|
|
|
@ -10,7 +10,7 @@ local rfile = {
|
||||||
javascript = 'node "$dir/$fileName"',
|
javascript = 'node "$dir/$fileName"',
|
||||||
}
|
}
|
||||||
|
|
||||||
local runscript = vim.g.pcode_coderunner
|
local runscript = vim.g.pcode_coderunner or {}
|
||||||
rfile = vim.tbl_deep_extend("force", runscript, rfile)
|
rfile = vim.tbl_deep_extend("force", runscript, rfile)
|
||||||
return {
|
return {
|
||||||
"CRAG666/code_runner.nvim",
|
"CRAG666/code_runner.nvim",
|
||||||
|
|
|
@ -22,7 +22,7 @@ _G.switch = function(param, case_table)
|
||||||
return def and def() or nil
|
return def and def() or nil
|
||||||
end
|
end
|
||||||
|
|
||||||
local color = vim.g.pcode_colorscheme
|
local color = vim.g.pcode_colorscheme or "gruvbox-baby"
|
||||||
switch(color, {
|
switch(color, {
|
||||||
["tokyonight"] = function()
|
["tokyonight"] = function()
|
||||||
gruvbox = false
|
gruvbox = false
|
||||||
|
@ -201,7 +201,7 @@ switch(color, {
|
||||||
})
|
})
|
||||||
|
|
||||||
local transparent = false
|
local transparent = false
|
||||||
local transparent_mode = vim.g.pcode_transparent_mode
|
local transparent_mode = vim.g.pcode_transparent_mode or 0
|
||||||
if transparent_mode ~= nil then
|
if transparent_mode ~= nil then
|
||||||
if transparent_mode == 1 then
|
if transparent_mode == 1 then
|
||||||
transparent = true
|
transparent = true
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
local transparent = false
|
local transparent = false
|
||||||
local clear_lualine = false
|
local clear_lualine = false
|
||||||
|
|
||||||
local transparent_mode = vim.g.pcode_transparent_mode
|
local transparent_mode = vim.g.pcode_transparent_mode or 0
|
||||||
if transparent_mode ~= nil then
|
if transparent_mode ~= nil then
|
||||||
if transparent_mode == 1 then
|
if transparent_mode == 1 then
|
||||||
transparent = true
|
transparent = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local clear_line = vim.g.pcode_clear_lualine
|
local clear_line = vim.g.pcode_clear_lualine or 0
|
||||||
if clear_line ~= nil then
|
if clear_line ~= nil then
|
||||||
if clear_line == 1 then
|
if clear_line == 1 then
|
||||||
clear_lualine = true
|
clear_lualine = true
|
||||||
|
|
|
@ -95,7 +95,7 @@ return {
|
||||||
nowait = true, -- use `nowait` when creating keymaps
|
nowait = true, -- use `nowait` when creating keymaps
|
||||||
}
|
}
|
||||||
|
|
||||||
local wkey = vim.g.pcode_whichkey
|
local wkey = vim.g.pcode_whichkey or {}
|
||||||
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)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
local colorscheme = "gruvbox_baby"
|
local colorscheme = vim.g.pcode_colorscheme or "gruvbox-baby"
|
||||||
local lst_style = {
|
local lst_style = {
|
||||||
"sonokai",
|
"sonokai",
|
||||||
"sonokai_atlantis",
|
"sonokai_atlantis",
|
||||||
|
@ -23,11 +23,7 @@ local lst_onedark = {
|
||||||
"onedark_light",
|
"onedark_light",
|
||||||
}
|
}
|
||||||
|
|
||||||
if vim.g.pcode_colorscheme ~= nil then
|
local transparent_mode = vim.g.pcode_transparent_mode or 0
|
||||||
colorscheme = vim.g.pcode_colorscheme
|
|
||||||
end
|
|
||||||
|
|
||||||
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
|
||||||
vim.g.gruvbox_baby_transparent_mode = 1
|
vim.g.gruvbox_baby_transparent_mode = 1
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
local run = 0
|
local run = 0
|
||||||
local frmt = vim.g.pcode_format_on_save
|
local frmt = vim.g.pcode_format_on_save or 0
|
||||||
if frmt == 1 then
|
if frmt == 1 then
|
||||||
run = 1
|
run = 1
|
||||||
else
|
else
|
||||||
|
|
|
@ -8,8 +8,8 @@ local lspconfig = require("lspconfig")
|
||||||
-- local servers = { "jsonls", "sumneko_lua","html","cssls","tsserver"}
|
-- local servers = { "jsonls", "sumneko_lua","html","cssls","tsserver"}
|
||||||
-- local servers = { "jdtls", "yamlls" }
|
-- local servers = { "jdtls", "yamlls" }
|
||||||
local servers = {}
|
local servers = {}
|
||||||
|
local installer = vim.g.pcode_lsp_installer or {}
|
||||||
for _, client in pairs(vim.g.pcode_lsp_installer) do
|
for _, client in pairs(installer) do
|
||||||
table.insert(servers, client)
|
table.insert(servers, client)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ if not status_cmp_ok then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local lspvitualtext = vim.g.pcode_lsp_virtualtext
|
local lspvitualtext = vim.g.pcode_lsp_virtualtext or false
|
||||||
local icons = vim.g.pcode_icons
|
local icons = vim.g.pcode_icons
|
||||||
|
|
||||||
M.capabilities = vim.lsp.protocol.make_client_capabilities()
|
M.capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
|
|
@ -11,11 +11,12 @@ local function idxOf(array, value)
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, client in pairs(vim.g.pcode_mason_ensure_installed) do
|
local mason_install = vim.g.pcode_mason_ensure_installed or {}
|
||||||
|
for _, client in pairs(mason_install) do
|
||||||
table.insert(servers, client)
|
table.insert(servers, client)
|
||||||
end
|
end
|
||||||
|
|
||||||
local unregis_lsp = vim.g.pcode_unregister_lsp
|
local unregis_lsp = vim.g.pcode_unregister_lsp or {}
|
||||||
local icons = vim.g.pcode_icons.ui
|
local icons = vim.g.pcode_icons.ui
|
||||||
|
|
||||||
local settings = {
|
local settings = {
|
||||||
|
|
|
@ -21,7 +21,8 @@ if data_ok then
|
||||||
end
|
end
|
||||||
|
|
||||||
-- load data null-ls
|
-- load data null-ls
|
||||||
for _, nullls in pairs(vim.g.pcode_null_ls_ensure_installed) do
|
local nullls_data = vim.g.pcode_null_ls_ensure_installed or {}
|
||||||
|
for _, nullls in pairs(nullls_data) do
|
||||||
table.insert(ensure_installed, nullls)
|
table.insert(ensure_installed, nullls)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -33,7 +34,7 @@ if mason_ok then
|
||||||
end
|
end
|
||||||
|
|
||||||
local run = 0
|
local run = 0
|
||||||
local frmt = vim.g.pcode_format_on_save
|
local frmt = vim.g.pcode_format_on_save or 0
|
||||||
if frmt == 1 then
|
if frmt == 1 then
|
||||||
run = 1
|
run = 1
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
local sources = {}
|
local sources = {}
|
||||||
for _, nullls in pairs(vim.g.pcode_dap_ensure_installed) do
|
local dap_data = vim.g.pcode_dap_ensure_installed or {}
|
||||||
|
for _, nullls in pairs(dap_data) do
|
||||||
table.insert(sources, nullls)
|
table.insert(sources, nullls)
|
||||||
end
|
end
|
||||||
require("mason").setup()
|
require("mason").setup()
|
||||||
|
|
|
@ -5,7 +5,7 @@ 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 tras = vim.g.pcode_transparent_mode
|
local tras = vim.g.pcode_transparent_mode or 0
|
||||||
if tras == 1 then
|
if tras == 1 then
|
||||||
transp = true
|
transp = true
|
||||||
sidebar = "transparent"
|
sidebar = "transparent"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue