add: perapihan plugins

This commit is contained in:
asep.komarudin 2024-06-03 09:03:01 +07:00
parent 130f910923
commit 50fffa04d7
6 changed files with 202 additions and 194 deletions

View file

@ -10,7 +10,7 @@
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"code_runner.nvim": { "branch": "main", "commit": "6c5bfe44a6c7523350cd706e6b3b8101166eed99" },
"codeium.vim": { "branch": "main", "commit": "289eb724e5d6fab2263e94a1ad6e54afebefafb2" },
"darcula-dark.nvim": { "branch": "main", "commit": "cce636860dc5151b6980a35dd378f54a238e0f0e" },
"dressing.nvim": { "branch": "master", "commit": "572314728cb1ce012e825fd66331f52c94acac12" },
"friendly-snippets": { "branch": "main", "commit": "d0610077b6129cf9f7f78afbe3a1425d60f6e2f1" },
"gitsigns.nvim": { "branch": "main", "commit": "76927d14d3fbd4ba06ccb5246e79d93b5442c188" },
@ -21,8 +21,6 @@
"mason-lspconfig.nvim": { "branch": "main", "commit": "9ae570e206360e47d30b4c35a4550c165f4ea7b7" },
"mason-null-ls.nvim": { "branch": "main", "commit": "2b8433f76598397fcc97318d410e0c4f7a4bea6a" },
"mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
"mini.animate": { "branch": "main", "commit": "82519630b2760ffc516ebc387bef632f9c07b9f5" },
"mini.indentscope": { "branch": "main", "commit": "f0d7faa064c892b96997810afcddfadc3f2a15b3" },
"neoscroll.nvim": { "branch": "master", "commit": "a731f66f1d39ec6175fd201c5bf849e54abda99c" },
"noice.nvim": { "branch": "main", "commit": "69c6ad5c1f1c0777125d0275f9871d8609cb0521" },
"none-ls-extras.nvim": { "branch": "main", "commit": "336e84b9e43c0effb735b08798ffac382920053b" },
@ -31,7 +29,6 @@
"nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" },
"nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
"nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" },
"nvim-juliana": { "branch": "master", "commit": "fa1d6e8b816e25f269a44807e702750de0da0413" },
"nvim-lspconfig": { "branch": "master", "commit": "0b8165cf95806bc4bb8f745bb0c92021b2ed4b98" },
"nvim-material-icon": { "branch": "main", "commit": "7a8893417c6947925d00946d16b81b56574796a9" },
"nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" },
@ -42,15 +39,11 @@
"nvim-treesitter-textobjects": { "branch": "master", "commit": "fd41b7ccc5490a3a99c734d1ee418b68d06c48a9" },
"nvim-ts-autotag": { "branch": "main", "commit": "6eb4120a1aadef07ac312f1c4bc6456712220007" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "cb064386e667def1d241317deed9fd1b38f0dc2e" },
"nvim-ufo": { "branch": "main", "commit": "a5390706f510d39951dd581f6d2a972741b3fa26" },
"nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" },
"playground": { "branch": "master", "commit": "bcfab84f98a33f2ad34dda6c842046dca70aabf6" },
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
"promise-async": { "branch": "main", "commit": "38a4575da9497326badd3995e768b4ccf0bb153e" },
"rainbow-delimiters.nvim": { "branch": "master", "commit": "12b1a1e095d968887a17ef791c2edb78d7595d46" },
"smart-splits.nvim": { "branch": "master", "commit": "2179ec0d26aacd4f40c766c79f6ebc83b7001e48" },
"statuscol.nvim": { "branch": "main", "commit": "483b9a596dfd63d541db1aa51ee6ee9a1441c4cc" },
"tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "3d3cd95e4a4135c250faf83dd5ed61b8e5502b86" },
"telescope.nvim": { "branch": "master", "commit": "dfa230be84a044e7f546a6c2b0a403c739732b86" },
"toggleterm.nvim": { "branch": "main", "commit": "fee58a0473fd92b28c34f8f724e4918b15ba30a3" },
"vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" },

View file

@ -15,7 +15,7 @@
-- solarized-osaka
-- darcula-dark
-- juliana
vim.g.pcode_colorscheme = "juliana"
vim.g.pcode_colorscheme = "darcula-dark"
-- 0 =off 1= on
vim.g.pcode_transparent_mode = 0
@ -108,10 +108,10 @@ vim.g.pcode_coderunner = {
-- 1 = float
vim.g.pcode_nvimtree_isfloat = 0
vim.g.pcode_tailwindcolorizer = true
vim.g.pcode_codeium = true
vim.g.pcode_nvimufo = true
vim.g.pcode_indentscope = true
vim.g.pvode_minianimate = true
vim.g.pcode_tailwindcolorizer = false
vim.g.pcode_codeium = false
vim.g.pcode_nvimufo = false
vim.g.pcode_indentscope = false
vim.g.pvode_minianimate = false
vim.g.pcode_disable_cmpdoc = false

View file

@ -1,20 +1,24 @@
local icons = vim.g.pcode_icons
return {
"echasnovski/mini.indentscope",
version = false, -- wait till new 0.7.0 release to put it back on semver
event = "BufReadPre",
enabled = vim.g.pcode_indentscope and true or false,
opts = {
symbol = icons.ui.LineMiddle,
options = { try_as_border = true },
},
config = function(_, opts)
vim.api.nvim_create_autocmd("FileType", {
pattern = { "help", "alpha", "dashboard", "NvimTree", "Trouble", "lazy", "mason" },
callback = function()
vim.b.miniindentscope_disable = true
end,
})
require("mini.indentscope").setup(opts)
end,
}
if vim.g.pcode_indentscope and true or false then
return {
"echasnovski/mini.indentscope",
version = false, -- wait till new 0.7.0 release to put it back on semver
event = "BufReadPre",
enabled = vim.g.pcode_indentscope and true or false,
opts = {
symbol = icons.ui.LineMiddle,
options = { try_as_border = true },
},
config = function(_, opts)
vim.api.nvim_create_autocmd("FileType", {
pattern = { "help", "alpha", "dashboard", "NvimTree", "Trouble", "lazy", "mason" },
callback = function()
vim.b.miniindentscope_disable = true
end,
})
require("mini.indentscope").setup(opts)
end,
}
else
return {}
end

View file

@ -1,74 +1,77 @@
local function ambilKataDariKiri(kalimat, jumlahKata)
local hasil = ""
local posisiAwal = 1
local kataKe = 0
local hasil = ""
local posisiAwal = 1
local kataKe = 0
while kataKe < jumlahKata do
local posisiSpasi = string.find(kalimat, " ", posisiAwal)
if posisiSpasi then
hasil = hasil .. string.sub(kalimat, posisiAwal, posisiSpasi - 1) .. " "
posisiAwal = posisiSpasi + 1
else
hasil = hasil .. string.sub(kalimat, posisiAwal)
break
end
kataKe = kataKe + 1
end
while kataKe < jumlahKata do
local posisiSpasi = string.find(kalimat, " ", posisiAwal)
if posisiSpasi then
hasil = hasil .. string.sub(kalimat, posisiAwal, posisiSpasi - 1) .. " "
posisiAwal = posisiSpasi + 1
else
hasil = hasil .. string.sub(kalimat, posisiAwal)
break
end
kataKe = kataKe + 1
end
return hasil
return hasil
end
local fidget = true
local lualine = false
if vim.g.pcode_progress == 1 then
fidget = false
lualine = true
fidget = false
lualine = true
elseif vim.g.pcode_progress == 2 then
fidget = true
lualine = false
fidget = true
lualine = false
elseif vim.g.pcode_progress == 0 then
fidget = false
lualine = false
fidget = false
lualine = false
else
fidget = true
lualine = false
fidget = true
lualine = false
end
if fidget then
return {
"j-hui/fidget.nvim",
lazy = true,
enabled = fidget,
tag = "legacy",
event = "BufRead",
config = function()
require("fidget").setup {
window = {
blend = 0,
relative = "editor",
},
}
end,
}
elseif lualine then
return {
"linrongbin16/lsp-progress.nvim",
enabled = lualine,
lazy = true,
branch = "main",
event = { "BufRead" },
config = function()
require("lsp-progress").setup {
client_format = function(client_name, spinner, series_messages)
return #series_messages > 0
and (spinner .. " " .. ambilKataDariKiri(table.concat(series_messages, ", "), 4) .. "...")
or nil
end,
format = function(client_messages)
local sign = ""
return #client_messages > 0
and (sign .. " " .. ambilKataDariKiri(table.concat(client_messages, " "), 4) .. "...")
or sign
end,
}
end,
}
else
return {}
end
return {
{
"j-hui/fidget.nvim",
lazy = true,
enabled = fidget,
tag = "legacy",
event = "BufRead",
config = function()
require("fidget").setup({
window = {
blend = 0,
relative = "editor",
},
})
end,
},
{
"linrongbin16/lsp-progress.nvim",
enabled = lualine,
lazy = true,
branch = "main",
event = { "BufRead" },
config = function()
require("lsp-progress").setup({
client_format = function(client_name, spinner, series_messages)
return #series_messages > 0
and (spinner .. " " .. ambilKataDariKiri(table.concat(series_messages, ", "), 4) .. "...")
or nil
end,
format = function(client_messages)
local sign = ""
return #client_messages > 0
and (sign .. " " .. ambilKataDariKiri(table.concat(client_messages, " "), 4) .. "...")
or sign
end,
})
end,
},
}

View file

@ -1,41 +1,45 @@
return {
-- animations
{
"echasnovski/mini.animate",
event = "BufRead",
enabled = not vim.g.neovide and vim.g.pvode_minianimate and true or false,
opts = function()
-- don't use animate when scrolling with the mouse
local mouse_scrolled = false
for _, scroll in ipairs { "Up", "Down" } do
local key = "<ScrollWheel" .. scroll .. ">"
vim.keymap.set({ "", "i" }, key, function()
mouse_scrolled = true
return key
end, { expr = true })
end
if not vim.g.neovide and vim.g.pvode_minianimate and true or false then
return {
-- animations
{
"echasnovski/mini.animate",
event = "BufRead",
enabled = not vim.g.neovide and vim.g.pvode_minianimate and true or false,
opts = function()
-- don't use animate when scrolling with the mouse
local mouse_scrolled = false
for _, scroll in ipairs { "Up", "Down" } do
local key = "<ScrollWheel" .. scroll .. ">"
vim.keymap.set({ "", "i" }, key, function()
mouse_scrolled = true
return key
end, { expr = true })
end
local animate = require "mini.animate"
return {
resize = {
timing = animate.gen_timing.linear { duration = 100, unit = "total" },
},
scroll = {
timing = animate.gen_timing.linear { duration = 150, unit = "total" },
subscroll = animate.gen_subscroll.equal {
predicate = function(total_scroll)
if mouse_scrolled then
mouse_scrolled = false
return false
end
return total_scroll > 1
end,
local animate = require "mini.animate"
return {
resize = {
timing = animate.gen_timing.linear { duration = 100, unit = "total" },
},
},
}
end,
config = function(_, opts)
require("mini.animate").setup(opts)
end,
},
}
scroll = {
timing = animate.gen_timing.linear { duration = 150, unit = "total" },
subscroll = animate.gen_subscroll.equal {
predicate = function(total_scroll)
if mouse_scrolled then
mouse_scrolled = false
return false
end
return total_scroll > 1
end,
},
},
}
end,
config = function(_, opts)
require("mini.animate").setup(opts)
end,
},
}
else
return {}
end

View file

@ -15,63 +15,67 @@ if clear_line ~= nil then
end
end
return {
-- transparant config
{
"xiyaowong/transparent.nvim",
lazy = true,
enabled = transparent,
event = "BufWinEnter",
cmd = { "TransparentToggle", "TransparentEnable", "TransparentDisable" },
config = function()
require("transparent").setup {
extra_groups = {
"Normal",
"NormalNC",
"NormalFloat",
"FloatBorder",
"Comment",
"Folded",
"GitSignsAdd",
"GitSignsDelete",
"GitSignsChange",
"FoldColumn",
},
exclude_groups = {
-- disable active selection backgroun
"CursorLine",
"CursorLineNR",
"CursorLineSign",
"CursorLineFold",
-- disable nvimtree CursorLine
"NvimTreeCursorLine",
-- disable Neotree CursorLine
"NeoTreeCursorLine",
-- disable Telescope active selection background
"TelescopeSelection",
-- disable lualine background color
"LualineNormal",
},
}
require("transparent").clear_prefix "BufferLine"
-- clear prefix for which-key
require("transparent").clear_prefix "WhichKey"
-- clear prefix for lazy.nvim
require("transparent").clear_prefix "Lazy"
-- clear prefix for NvimTree
require("transparent").clear_prefix "NvimTree"
-- clear prefix for NeoTree
require("transparent").clear_prefix "NeoTree"
-- clear prefix for Telescope
require("transparent").clear_prefix "Telescope"
require("transparent").clear_prefix "mason"
if clear_lualine then
-- clear prefix for Lualine
require("transparent").clear_prefix "Lualine"
-- create auto command to set transparent
vim.cmd "TransparentDisable"
vim.cmd "TransparentEnable"
end
end,
},
}
if transparent then
return {
-- transparant config
{
"xiyaowong/transparent.nvim",
lazy = true,
enabled = transparent,
event = "BufWinEnter",
cmd = { "TransparentToggle", "TransparentEnable", "TransparentDisable" },
config = function()
require("transparent").setup {
extra_groups = {
"Normal",
"NormalNC",
"NormalFloat",
"FloatBorder",
"Comment",
"Folded",
"GitSignsAdd",
"GitSignsDelete",
"GitSignsChange",
"FoldColumn",
},
exclude_groups = {
-- disable active selection backgroun
"CursorLine",
"CursorLineNR",
"CursorLineSign",
"CursorLineFold",
-- disable nvimtree CursorLine
"NvimTreeCursorLine",
-- disable Neotree CursorLine
"NeoTreeCursorLine",
-- disable Telescope active selection background
"TelescopeSelection",
-- disable lualine background color
"LualineNormal",
},
}
require("transparent").clear_prefix "BufferLine"
-- clear prefix for which-key
require("transparent").clear_prefix "WhichKey"
-- clear prefix for lazy.nvim
require("transparent").clear_prefix "Lazy"
-- clear prefix for NvimTree
require("transparent").clear_prefix "NvimTree"
-- clear prefix for NeoTree
require("transparent").clear_prefix "NeoTree"
-- clear prefix for Telescope
require("transparent").clear_prefix "Telescope"
require("transparent").clear_prefix "mason"
if clear_lualine then
-- clear prefix for Lualine
require("transparent").clear_prefix "Lualine"
-- create auto command to set transparent
vim.cmd "TransparentDisable"
vim.cmd "TransparentEnable"
end
end,
},
}
else
return {}
end