mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-21 08:35:48 +02:00
enc: reformat indentat code
This commit is contained in:
parent
0ef35939de
commit
16c9fa5a36
31 changed files with 1025 additions and 984 deletions
|
@ -2,7 +2,7 @@
|
||||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||||
"Eva-Theme.nvim": { "branch": "master", "commit": "568fdba3a2a3088bec2198e7bb8f28d482629e58" },
|
"Eva-Theme.nvim": { "branch": "master", "commit": "568fdba3a2a3088bec2198e7bb8f28d482629e58" },
|
||||||
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
|
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
|
||||||
"LuaSnip": { "branch": "master", "commit": "4bf40748f6fe939bdcb69325918535b1c5edea51" },
|
"LuaSnip": { "branch": "master", "commit": "29417eea5b7c4b6beda105ced072855101d9680e" },
|
||||||
"alpha-nvim": { "branch": "main", "commit": "bf3c8bb8c02ed3d9644cc5bbc48e2bdc39349cd7" },
|
"alpha-nvim": { "branch": "main", "commit": "bf3c8bb8c02ed3d9644cc5bbc48e2bdc39349cd7" },
|
||||||
"auto-bufferline.nvim": { "branch": "main", "commit": "f5835a4b62bfb6f6c829f8f050e5102ccf230b3e" },
|
"auto-bufferline.nvim": { "branch": "main", "commit": "f5835a4b62bfb6f6c829f8f050e5102ccf230b3e" },
|
||||||
"auto-conform.nvim": { "branch": "main", "commit": "5f0897235e84bf2f8ff9d634e81678d5bfa63ab8" },
|
"auto-conform.nvim": { "branch": "main", "commit": "5f0897235e84bf2f8ff9d634e81678d5bfa63ab8" },
|
||||||
|
@ -23,6 +23,7 @@
|
||||||
"dressing.nvim": { "branch": "master", "commit": "6ef1ca479d37d4ff66f13eed44d08912caff483a" },
|
"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" },
|
||||||
|
"inc-rename.nvim": { "branch": "main", "commit": "8ba77017ca468f3029bf88ef409c2d20476ea66b" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "04e44b09ee3ff189c69ab082edac1ef7ae2e256c" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "04e44b09ee3ff189c69ab082edac1ef7ae2e256c" },
|
||||||
"laravel.nvim": { "branch": "main", "commit": "e4f39d942352b03396a9df79896b0a8801675199" },
|
"laravel.nvim": { "branch": "main", "commit": "e4f39d942352b03396a9df79896b0a8801675199" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "b1134ab82ee4279e31f7ddf7e34b2a99eb9b7bc9" },
|
"lazy.nvim": { "branch": "main", "commit": "b1134ab82ee4279e31f7ddf7e34b2a99eb9b7bc9" },
|
||||||
|
@ -30,17 +31,17 @@
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "4d0e5b49363cac187326998b96aa6a2884e0e89b" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "4d0e5b49363cac187326998b96aa6a2884e0e89b" },
|
||||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" },
|
"mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||||
"menu": { "branch": "main", "commit": "9269d8ff5775bb1b9b9cad538d1bcd13fa105fe7" },
|
"menu": { "branch": "main", "commit": "a12605e89a5da6c63840104a95362e2bb1e9b847" },
|
||||||
"mini.indentscope": { "branch": "main", "commit": "da9af64649e114aa79480c238fd23f6524bc0903" },
|
"mini.indentscope": { "branch": "main", "commit": "da9af64649e114aa79480c238fd23f6524bc0903" },
|
||||||
"minty": { "branch": "main", "commit": "6e5c4cfc66e5dbb248ab78293d1c147de0c33a54" },
|
"minty": { "branch": "main", "commit": "1ab2b8334cec1770fef096f0a5697bf0c3afb3ca" },
|
||||||
"neotest": { "branch": "master", "commit": "6d3d22cdad49999ef774ebe1bc250a4994038964" },
|
"neotest": { "branch": "master", "commit": "6d3d22cdad49999ef774ebe1bc250a4994038964" },
|
||||||
"neotest-phpunit": { "branch": "main", "commit": "baae8dfa0a3aaacd9f0bb6845d6348f5bcdc48bb" },
|
"neotest-phpunit": { "branch": "main", "commit": "baae8dfa0a3aaacd9f0bb6845d6348f5bcdc48bb" },
|
||||||
"noice.nvim": { "branch": "main", "commit": "5a78b42bec5e775f2db03bf93f6d1e0f3636306c" },
|
"noice.nvim": { "branch": "main", "commit": "d80136061820765baf70ace7dfb98a52575edc4a" },
|
||||||
"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": "e614ff5c26d085a3242e26648e90e56ba5476da2" },
|
"nvim-colorizer.lua": { "branch": "master", "commit": "f134063618a65cad4d7415fddbd96ff7e0c5b4ae" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "7ff6936010b7222fea2caea0f67ed77f1b7c60dd" },
|
"nvim-dap": { "branch": "master", "commit": "8517126e9323e346f6a99b3b594c5a940b914dcd" },
|
||||||
"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" },
|
||||||
"nvim-lint": { "branch": "master", "commit": "36da8dd0ddc4f88e0beae234c20e75397326f143" },
|
"nvim-lint": { "branch": "master", "commit": "36da8dd0ddc4f88e0beae234c20e75397326f143" },
|
||||||
|
@ -57,6 +58,7 @@
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" },
|
"nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||||
"rainbow-delimiters.nvim": { "branch": "master", "commit": "e0f9b3efe150724af2d2ed59997d5ece373840e3" },
|
"rainbow-delimiters.nvim": { "branch": "master", "commit": "e0f9b3efe150724af2d2ed59997d5ece373840e3" },
|
||||||
|
"refactoring.nvim": { "branch": "master", "commit": "53ed6854e0bba64d467c58e87084dcf8b1c22d36" },
|
||||||
"smart-splits.nvim": { "branch": "master", "commit": "11600d75e1b57e9fe1f3ca880a917485fc399e8c" },
|
"smart-splits.nvim": { "branch": "master", "commit": "11600d75e1b57e9fe1f3ca880a917485fc399e8c" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "85922dde3767e01d42a08e750a773effbffaea3e" },
|
"telescope.nvim": { "branch": "master", "commit": "85922dde3767e01d42a08e750a773effbffaea3e" },
|
||||||
"tiny-devicons-auto-colors.nvim": { "branch": "main", "commit": "a39fa4c92268832f6034306793b8acbfec2a7549" },
|
"tiny-devicons-auto-colors.nvim": { "branch": "main", "commit": "a39fa4c92268832f6034306793b8acbfec2a7549" },
|
||||||
|
|
|
@ -1,133 +1,140 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"folke/noice.nvim",
|
"folke/noice.nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
enabled = true,
|
enabled = true,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "MunifTanjim/nui.nvim" },
|
{ "MunifTanjim/nui.nvim" },
|
||||||
},
|
},
|
||||||
event = "CmdlineEnter",
|
event = "CmdlineEnter",
|
||||||
opts = {
|
opts = {
|
||||||
messages = {
|
messages = {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
},
|
},
|
||||||
notify = {
|
notify = {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
},
|
},
|
||||||
lsp = {
|
lsp = {
|
||||||
progress = {
|
progress = {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
},
|
},
|
||||||
hover = {
|
hover = {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
},
|
},
|
||||||
signature = {
|
signature = {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
presets = {
|
||||||
keys = {
|
-- Preset ini menyesuaikan bentuk cursor pada mode commond
|
||||||
{
|
command_bar_cursor = {
|
||||||
"<S-Enter>",
|
enabled = true,
|
||||||
function()
|
cursor_shape = "ver30", -- "ver" menandakan bar vertikal, 30 adalah tinggi dalam persen
|
||||||
require("noice").redirect(vim.fn.getcmdline())
|
},
|
||||||
end,
|
},
|
||||||
mode = "c",
|
},
|
||||||
desc = "Redirect Cmdline",
|
keys = {
|
||||||
},
|
{
|
||||||
{
|
"<S-Enter>",
|
||||||
"<leader>snl",
|
function()
|
||||||
function()
|
require("noice").redirect(vim.fn.getcmdline())
|
||||||
require("noice").cmd("last")
|
end,
|
||||||
end,
|
mode = "c",
|
||||||
desc = "Noice Last Message",
|
desc = "Redirect Cmdline",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>snh",
|
"<leader>snl",
|
||||||
function()
|
function()
|
||||||
require("noice").cmd("history")
|
require("noice").cmd("last")
|
||||||
end,
|
end,
|
||||||
desc = "Noice History",
|
desc = "Noice Last Message",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>sna",
|
"<leader>snh",
|
||||||
function()
|
function()
|
||||||
require("noice").cmd("all")
|
require("noice").cmd("history")
|
||||||
end,
|
end,
|
||||||
desc = "Noice All",
|
desc = "Noice History",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<c-f>",
|
"<leader>sna",
|
||||||
function()
|
function()
|
||||||
if not require("noice.lsp").scroll(4) then
|
require("noice").cmd("all")
|
||||||
return "<c-f>"
|
end,
|
||||||
end
|
desc = "Noice All",
|
||||||
end,
|
},
|
||||||
silent = true,
|
{
|
||||||
expr = true,
|
"<c-f>",
|
||||||
desc = "Scroll forward",
|
function()
|
||||||
mode = { "i", "n", "s" },
|
if not require("noice.lsp").scroll(4) then
|
||||||
},
|
return "<c-f>"
|
||||||
{
|
end
|
||||||
"<c-b>",
|
end,
|
||||||
function()
|
silent = true,
|
||||||
if not require("noice.lsp").scroll(-4) then
|
expr = true,
|
||||||
return "<c-b>"
|
desc = "Scroll forward",
|
||||||
end
|
mode = { "i", "n", "s" },
|
||||||
end,
|
},
|
||||||
silent = true,
|
{
|
||||||
expr = true,
|
"<c-b>",
|
||||||
desc = "Scroll backward",
|
function()
|
||||||
mode = { "i", "n", "s" },
|
if not require("noice.lsp").scroll(-4) then
|
||||||
},
|
return "<c-b>"
|
||||||
},
|
end
|
||||||
},
|
end,
|
||||||
{
|
silent = true,
|
||||||
"hrsh7th/cmp-cmdline",
|
expr = true,
|
||||||
event = "VeryLazy",
|
desc = "Scroll backward",
|
||||||
config = function()
|
mode = { "i", "n", "s" },
|
||||||
local cmp = require("cmp")
|
},
|
||||||
local mapping = {
|
},
|
||||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
},
|
||||||
["<Up>"] = cmp.mapping(cmp.mapping.select_prev_item(), { "i", "c" }),
|
{
|
||||||
["<S-Tab>"] = cmp.mapping(cmp.mapping.select_prev_item(), { "i", "c" }),
|
"hrsh7th/cmp-cmdline",
|
||||||
["<Down>"] = cmp.mapping(cmp.mapping.select_next_item(), { "i", "c" }),
|
event = "VeryLazy",
|
||||||
["<Tab>"] = cmp.mapping(cmp.mapping.select_next_item(), { "i", "c" }),
|
config = function()
|
||||||
}
|
local cmp = require("cmp")
|
||||||
|
local mapping = {
|
||||||
|
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||||
|
["<Up>"] = cmp.mapping(cmp.mapping.select_prev_item(), { "i", "c" }),
|
||||||
|
["<S-Tab>"] = cmp.mapping(cmp.mapping.select_prev_item(), { "i", "c" }),
|
||||||
|
["<Down>"] = cmp.mapping(cmp.mapping.select_next_item(), { "i", "c" }),
|
||||||
|
["<Tab>"] = cmp.mapping(cmp.mapping.select_next_item(), { "i", "c" }),
|
||||||
|
}
|
||||||
|
|
||||||
-- Use buffer source for `/`.
|
-- Use buffer source for `/`.
|
||||||
cmp.setup.cmdline("/", {
|
cmp.setup.cmdline("/", {
|
||||||
preselect = "none",
|
preselect = "none",
|
||||||
completion = {
|
completion = {
|
||||||
completeopt = "menu,preview,menuone,noselect",
|
completeopt = "menu,preview,menuone,noselect",
|
||||||
},
|
},
|
||||||
mapping = mapping,
|
mapping = mapping,
|
||||||
sources = {
|
sources = {
|
||||||
{ name = "buffer" },
|
{ name = "buffer" },
|
||||||
},
|
},
|
||||||
experimental = {
|
experimental = {
|
||||||
ghost_text = true,
|
ghost_text = true,
|
||||||
native_menu = false,
|
native_menu = false,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Use cmdline & path source for ':'.
|
-- Use cmdline & path source for ':'.
|
||||||
cmp.setup.cmdline(":", {
|
cmp.setup.cmdline(":", {
|
||||||
preselect = "none",
|
preselect = "none",
|
||||||
completion = {
|
completion = {
|
||||||
completeopt = "menu,preview,menuone,noselect",
|
completeopt = "menu,preview,menuone,noselect",
|
||||||
},
|
},
|
||||||
mapping = mapping,
|
mapping = mapping,
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = "path" },
|
{ name = "path" },
|
||||||
}, {
|
}, {
|
||||||
{ name = "cmdline" },
|
{ name = "cmdline" },
|
||||||
}),
|
}),
|
||||||
experimental = {
|
experimental = {
|
||||||
ghost_text = true,
|
ghost_text = true,
|
||||||
native_menu = false,
|
native_menu = false,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,53 +1,49 @@
|
||||||
return {
|
return {
|
||||||
"okuuva/auto-save.nvim",
|
"okuuva/auto-save.nvim",
|
||||||
version = "^1.0.0", -- see https://devhints.io/semver, alternatively use '*' to use the latest tagged release
|
version = "^1.0.0", -- see https://devhints.io/semver, alternatively use '*' to use the latest tagged release
|
||||||
cmd = "ASToggle", -- optional for lazy loading on command
|
cmd = "ASToggle", -- optional for lazy loading on command
|
||||||
event = { "InsertLeave", "TextChanged" }, -- optional for lazy loading on trigger events
|
event = { "InsertLeave", "TextChanged" }, -- optional for lazy loading on trigger events
|
||||||
opts = {
|
opts = {
|
||||||
enabled = true, -- start auto-save when the plugin is loaded (i.e. when your package manager loads it)
|
enabled = true, -- start auto-save when the plugin is loaded (i.e. when your package manager loads it)
|
||||||
trigger_events = { -- See :h events
|
trigger_events = { -- See :h events
|
||||||
immediate_save = { "BufLeave", "FocusLost" }, -- vim events that trigger an immediate save
|
immediate_save = { "BufLeave", "FocusLost" }, -- vim events that trigger an immediate save
|
||||||
defer_save = { "InsertLeave", "TextChanged" }, -- vim events that trigger a deferred save (saves after `debounce_delay`)
|
defer_save = { "InsertLeave", "TextChanged" }, -- vim events that trigger a deferred save (saves after `debounce_delay`)
|
||||||
cancel_deferred_save = { "InsertEnter" }, -- vim events that cancel a pending deferred save
|
cancel_deferred_save = { "InsertEnter" }, -- vim events that cancel a pending deferred save
|
||||||
},
|
},
|
||||||
-- function that takes the buffer handle and determines whether to save the current buffer or not
|
-- function that takes the buffer handle and determines whether to save the current buffer or not
|
||||||
-- return true: if buffer is ok to be saved
|
-- return true: if buffer is ok to be saved
|
||||||
-- return false: if it's not ok to be saved
|
-- return false: if it's not ok to be saved
|
||||||
-- if set to `nil` then no specific condition is applied
|
-- if set to `nil` then no specific condition is applied
|
||||||
condition = nil,
|
condition = nil,
|
||||||
write_all_buffers = false, -- write all buffers when the current one meets `condition`
|
write_all_buffers = false, -- write all buffers when the current one meets `condition`
|
||||||
noautocmd = false, -- do not execute autocmds when saving
|
noautocmd = false, -- do not execute autocmds when saving
|
||||||
lockmarks = false, -- lock marks when saving, see `:h lockmarks` for more details
|
lockmarks = false, -- lock marks when saving, see `:h lockmarks` for more details
|
||||||
debounce_delay = 1500, -- delay after which a pending save is executed
|
debounce_delay = 1500, -- delay after which a pending save is executed
|
||||||
-- log debug messages to 'auto-save.log' file in neovim cache directory, set to `true` to enable
|
-- log debug messages to 'auto-save.log' file in neovim cache directory, set to `true` to enable
|
||||||
debug = false,
|
debug = false,
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
require("auto-save").setup(opts)
|
require("auto-save").setup(opts)
|
||||||
local group = vim.api.nvim_create_augroup("autosave", {})
|
local group = vim.api.nvim_create_augroup("autosave", {})
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("User", {
|
vim.api.nvim_create_autocmd("User", {
|
||||||
pattern = "AutoSaveWritePost",
|
pattern = "AutoSaveWritePost",
|
||||||
group = group,
|
group = group,
|
||||||
callback = function(opts)
|
callback = function(opts)
|
||||||
local ftype = vim.bo.filetype
|
local ftype = vim.bo.filetype
|
||||||
if
|
if opts.data.saved_buffer ~= nil and ftype ~= "TelescopePrompt" and not substring(tostring(ftype), "dap") then
|
||||||
opts.data.saved_buffer ~= nil
|
local filename = vim.api.nvim_buf_get_name(opts.data.saved_buffer)
|
||||||
and ftype ~= "TelescopePrompt"
|
local is_ok = pcall(require, "notify")
|
||||||
and not substring(tostring(ftype), "dap")
|
if is_ok then
|
||||||
then
|
require("notify")("AutoSave: saved at " .. vim.fn.strftime("%H:%M:%S"))
|
||||||
local filename = vim.api.nvim_buf_get_name(opts.data.saved_buffer)
|
else
|
||||||
local is_ok = pcall(require, "notify")
|
print("AutoSave: saved " .. filename .. " at " .. vim.fn.strftime("%H:%M:%S"))
|
||||||
if is_ok then
|
end
|
||||||
require("notify")("AutoSave: saved at " .. vim.fn.strftime("%H:%M:%S"))
|
end
|
||||||
else
|
end,
|
||||||
print("AutoSave: saved " .. filename .. " at " .. vim.fn.strftime("%H:%M:%S"))
|
})
|
||||||
end
|
end,
|
||||||
end
|
keys = {
|
||||||
end,
|
{ "<leader>n", ":ASToggle<CR>", desc = " Toggle auto-save" },
|
||||||
})
|
},
|
||||||
end,
|
|
||||||
keys = {
|
|
||||||
{ "<leader>n", ":ASToggle<CR>", desc = " Toggle auto-save" },
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
return {
|
return {
|
||||||
"LunarVim/bigfile.nvim",
|
"LunarVim/bigfile.nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
event = "BufReadPre",
|
event = "BufReadPre",
|
||||||
opts = {
|
opts = {
|
||||||
file_size = 2,
|
file_size = 2,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,26 +1,26 @@
|
||||||
return {
|
return {
|
||||||
-- codeium cmp source
|
-- codeium cmp source
|
||||||
{
|
{
|
||||||
"nvim-cmp",
|
"nvim-cmp",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- codeium
|
-- codeium
|
||||||
{
|
{
|
||||||
"Exafunction/codeium.nvim",
|
"Exafunction/codeium.nvim",
|
||||||
cmd = "Codeium",
|
cmd = "Codeium",
|
||||||
enabled = false,
|
enabled = false,
|
||||||
build = ":Codeium Auth",
|
build = ":Codeium Auth",
|
||||||
opts = {
|
opts = {
|
||||||
enable_chat = true,
|
enable_chat = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
--@param opts cmp.ConfigSchema
|
--@param opts cmp.ConfigSchema
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
table.insert(opts.sources, 1, {
|
table.insert(opts.sources, 1, {
|
||||||
name = "codeium",
|
name = "codeium",
|
||||||
group_index = 1,
|
group_index = 1,
|
||||||
priority = 100,
|
priority = 100,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,25 +1,25 @@
|
||||||
return {
|
return {
|
||||||
"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
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,62 +1,62 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"rcarriga/nvim-dap-ui",
|
"rcarriga/nvim-dap-ui",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
event = "BufRead",
|
event = "BufRead",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "mfussenegger/nvim-dap", lazy = true },
|
{ "mfussenegger/nvim-dap", lazy = true },
|
||||||
{ "nvim-neotest/nvim-nio", lazy = true },
|
{ "nvim-neotest/nvim-nio", lazy = true },
|
||||||
{
|
{
|
||||||
"theHamsta/nvim-dap-virtual-text",
|
"theHamsta/nvim-dap-virtual-text",
|
||||||
opts = {
|
opts = {
|
||||||
virt_text_win_col = 80,
|
virt_text_win_col = 80,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("pcode.user.dapui")
|
require("pcode.user.dapui")
|
||||||
end,
|
end,
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>d", "", desc = " Debug" },
|
{ "<leader>d", "", desc = " Debug" },
|
||||||
{ "<leader>dt", "<cmd>lua require'dap'.toggle_breakpoint()<cr>", desc = "Toggle Breakpoint" },
|
{ "<leader>dt", "<cmd>lua require'dap'.toggle_breakpoint()<cr>", desc = "Toggle Breakpoint" },
|
||||||
{ "<leader>db", "<cmd>lua require'dap'.step_back()<cr>", desc = "Step Back" },
|
{ "<leader>db", "<cmd>lua require'dap'.step_back()<cr>", desc = "Step Back" },
|
||||||
{ "<leader>dc", "<cmd>lua require'dap'.continue()<cr>", desc = "Continue" },
|
{ "<leader>dc", "<cmd>lua require'dap'.continue()<cr>", desc = "Continue" },
|
||||||
{ "<leader>dC", "<cmd>lua require'dap'.run_to_cursor()<cr>", desc = "Run To Cursor" },
|
{ "<leader>dC", "<cmd>lua require'dap'.run_to_cursor()<cr>", desc = "Run To Cursor" },
|
||||||
{ "<leader>dd", "<cmd>lua require'dap'.disconnect()<cr>", desc = "Disconnect" },
|
{ "<leader>dd", "<cmd>lua require'dap'.disconnect()<cr>", desc = "Disconnect" },
|
||||||
{ "<leader>dg", "<cmd>lua require'dap'.session()<cr>", desc = "Get Session" },
|
{ "<leader>dg", "<cmd>lua require'dap'.session()<cr>", desc = "Get Session" },
|
||||||
{ "<leader>di", "<cmd>lua require'dap'.step_into()<cr>", desc = "Step Into" },
|
{ "<leader>di", "<cmd>lua require'dap'.step_into()<cr>", desc = "Step Into" },
|
||||||
{ "<leader>do", "<cmd>lua require'dap'.step_over()<cr>", desc = "Step Over" },
|
{ "<leader>do", "<cmd>lua require'dap'.step_over()<cr>", desc = "Step Over" },
|
||||||
{ "<leader>du", "<cmd>lua require'dap'.step_out()<cr>", desc = "Step Out" },
|
{ "<leader>du", "<cmd>lua require'dap'.step_out()<cr>", desc = "Step Out" },
|
||||||
{ "<leader>dp", "<cmd>lua require'dap'.pause()<cr>", desc = "Pause" },
|
{ "<leader>dp", "<cmd>lua require'dap'.pause()<cr>", desc = "Pause" },
|
||||||
{ "<leader>dr", "<cmd>lua require'dap'.repl.toggle()<cr>", desc = "Toggle Repl" },
|
{ "<leader>dr", "<cmd>lua require'dap'.repl.toggle()<cr>", desc = "Toggle Repl" },
|
||||||
{ "<leader>ds", "<cmd>lua require'dap'.continue()<cr>", desc = "Start" },
|
{ "<leader>ds", "<cmd>lua require'dap'.continue()<cr>", desc = "Start" },
|
||||||
{ "<leader>dq", "<cmd>lua require'dap'.close()<cr>", desc = "Quit" },
|
{ "<leader>dq", "<cmd>lua require'dap'.close()<cr>", desc = "Quit" },
|
||||||
{ "<leader>dU", "<cmd>lua require'dapui'.toggle({reset = true})<cr>", desc = "Toggle UI" },
|
{ "<leader>dU", "<cmd>lua require'dapui'.toggle({reset = true})<cr>", desc = "Toggle UI" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"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" },
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
opts.ensure_installed = opts.ensure_installed or {}
|
opts.ensure_installed = opts.ensure_installed or {}
|
||||||
vim.list_extend(opts.ensure_installed, {})
|
vim.list_extend(opts.ensure_installed, {})
|
||||||
opts.automatic_setup = true
|
opts.automatic_setup = true
|
||||||
opts.handlers = {
|
opts.handlers = {
|
||||||
function(config)
|
function(config)
|
||||||
-- all sources with no handler get passed here
|
-- all sources with no handler get passed here
|
||||||
|
|
||||||
-- Keep original functionality
|
-- Keep original functionality
|
||||||
require("mason-nvim-dap").default_setup(config)
|
require("mason-nvim-dap").default_setup(config)
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
return opts
|
return opts
|
||||||
end,
|
end,
|
||||||
-- enabled = vim.fn.has("win32") == 0,
|
-- enabled = vim.fn.has("win32") == 0,
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
require("mason").setup()
|
require("mason").setup()
|
||||||
require("mason-nvim-dap").setup(opts)
|
require("mason-nvim-dap").setup(opts)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
return {
|
return {
|
||||||
"rachartier/tiny-devicons-auto-colors.nvim",
|
"rachartier/tiny-devicons-auto-colors.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
config = function()
|
config = function()
|
||||||
require("tiny-devicons-auto-colors").setup()
|
require("tiny-devicons-auto-colors").setup()
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,36 +1,65 @@
|
||||||
local M = {
|
local M = {
|
||||||
"RRethy/vim-illuminate",
|
"RRethy/vim-illuminate",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
}
|
}
|
||||||
|
|
||||||
function M.config()
|
M.opts = {
|
||||||
require("illuminate").configure({
|
delay = 200,
|
||||||
filetypes_denylist = {
|
large_file_cutoff = 2000,
|
||||||
"mason",
|
large_file_overrides = {
|
||||||
"harpoon",
|
providers = { "lsp" },
|
||||||
"DressingInput",
|
},
|
||||||
"NeogitCommitMessage",
|
filetypes_denylist = {
|
||||||
"qf",
|
"mason",
|
||||||
"dirvish",
|
"harpoon",
|
||||||
"oil",
|
"DressingInput",
|
||||||
"minifiles",
|
"NeogitCommitMessage",
|
||||||
"fugitive",
|
"qf",
|
||||||
"alpha",
|
"dirvish",
|
||||||
"NvimTree",
|
"oil",
|
||||||
"lazy",
|
"minifiles",
|
||||||
"NeogitStatus",
|
"fugitive",
|
||||||
"Trouble",
|
"alpha",
|
||||||
"netrw",
|
"NvimTree",
|
||||||
"lir",
|
"lazy",
|
||||||
"DiffviewFiles",
|
"NeogitStatus",
|
||||||
"Outline",
|
"Trouble",
|
||||||
"Jaq",
|
"netrw",
|
||||||
"spectre_panel",
|
"lir",
|
||||||
"toggleterm",
|
"DiffviewFiles",
|
||||||
"DressingSelect",
|
"Outline",
|
||||||
"TelescopePrompt",
|
"Jaq",
|
||||||
},
|
"spectre_panel",
|
||||||
})
|
"toggleterm",
|
||||||
|
"DressingSelect",
|
||||||
|
"TelescopePrompt",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
function M.config(_, opts)
|
||||||
|
require("illuminate").configure(opts)
|
||||||
|
local function map(key, dir, buffer)
|
||||||
|
vim.keymap.set("n", key, function()
|
||||||
|
require("illuminate")["goto_" .. dir .. "_reference"](false)
|
||||||
|
end, { desc = dir:sub(1, 1):upper() .. dir:sub(2) .. " Reference", buffer = buffer })
|
||||||
|
end
|
||||||
|
|
||||||
|
map("]]", "next")
|
||||||
|
map("[[", "prev")
|
||||||
|
|
||||||
|
-- also set it after loading ftplugins, since a lot overwrite [[ and ]]
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
callback = function()
|
||||||
|
local buffer = vim.api.nvim_get_current_buf()
|
||||||
|
map("]]", "next", buffer)
|
||||||
|
map("[[", "prev", buffer)
|
||||||
|
end,
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
M.keys = {
|
||||||
|
{ "]]", desc = "Next Reference" },
|
||||||
|
{ "[[", desc = "Prev Reference" },
|
||||||
|
}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -1,32 +1,32 @@
|
||||||
local icons = require("pcode.user.icons")
|
local icons = require("pcode.user.icons")
|
||||||
return {
|
return {
|
||||||
"echasnovski/mini.indentscope",
|
"echasnovski/mini.indentscope",
|
||||||
version = false, -- wait till new 0.7.0 release to put it back on semver
|
version = false, -- wait till new 0.7.0 release to put it back on semver
|
||||||
event = "BufReadPre",
|
event = "BufReadPre",
|
||||||
opts = {
|
opts = {
|
||||||
symbol = icons.ui.LineMiddle,
|
symbol = icons.ui.LineMiddle,
|
||||||
options = { try_as_border = true },
|
options = { try_as_border = true },
|
||||||
},
|
},
|
||||||
init = function()
|
init = function()
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
pattern = {
|
pattern = {
|
||||||
"alpha",
|
"alpha",
|
||||||
"dashboard",
|
"dashboard",
|
||||||
"fzf",
|
"fzf",
|
||||||
"help",
|
"help",
|
||||||
"lazy",
|
"lazy",
|
||||||
"lazyterm",
|
"lazyterm",
|
||||||
"mason",
|
"mason",
|
||||||
"neo-tree",
|
"neo-tree",
|
||||||
"NvimTree",
|
"NvimTree",
|
||||||
"notify",
|
"notify",
|
||||||
"toggleterm",
|
"toggleterm",
|
||||||
"Trouble",
|
"Trouble",
|
||||||
"trouble",
|
"trouble",
|
||||||
},
|
},
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.b.miniindentscope_disable = true
|
vim.b.miniindentscope_disable = true
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
return {
|
return {
|
||||||
"barrett-ruth/live-server.nvim",
|
"barrett-ruth/live-server.nvim",
|
||||||
build = "npm i -g live-server",
|
build = "npm i -g live-server",
|
||||||
cmd = { "LiveServerStart", "LiveServerStop", "LiveServerToggle" },
|
cmd = { "LiveServerStart", "LiveServerStop", "LiveServerToggle" },
|
||||||
config = true,
|
config = true,
|
||||||
keys = {
|
keys = {
|
||||||
-- open http://localhost:5555/ jika menggunakan wsl
|
-- open http://localhost:5555/ jika menggunakan wsl
|
||||||
{ "<leader>rl", "<cmd>LiveServerToggle<cr>", desc = "LiveServer" },
|
{ "<leader>rl", "<cmd>LiveServerToggle<cr>", desc = "LiveServer" },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,40 +1,40 @@
|
||||||
return {
|
return {
|
||||||
-- animations
|
-- animations
|
||||||
{
|
{
|
||||||
"echasnovski/mini.animate",
|
"echasnovski/mini.animate",
|
||||||
event = "BufRead",
|
event = "BufRead",
|
||||||
opts = function()
|
opts = function()
|
||||||
-- don't use animate when scrolling with the mouse
|
-- don't use animate when scrolling with the mouse
|
||||||
local mouse_scrolled = false
|
local mouse_scrolled = false
|
||||||
for _, scroll in ipairs({ "Up", "Down" }) do
|
for _, scroll in ipairs({ "Up", "Down" }) do
|
||||||
local key = "<ScrollWheel" .. scroll .. ">"
|
local key = "<ScrollWheel" .. scroll .. ">"
|
||||||
vim.keymap.set({ "", "i" }, key, function()
|
vim.keymap.set({ "", "i" }, key, function()
|
||||||
mouse_scrolled = true
|
mouse_scrolled = true
|
||||||
return key
|
return key
|
||||||
end, { expr = true })
|
end, { expr = true })
|
||||||
end
|
end
|
||||||
|
|
||||||
local animate = require("mini.animate")
|
local animate = require("mini.animate")
|
||||||
return {
|
return {
|
||||||
resize = {
|
resize = {
|
||||||
timing = animate.gen_timing.linear({ duration = 100, unit = "total" }),
|
timing = animate.gen_timing.linear({ duration = 100, unit = "total" }),
|
||||||
},
|
},
|
||||||
scroll = {
|
scroll = {
|
||||||
timing = animate.gen_timing.linear({ duration = 150, unit = "total" }),
|
timing = animate.gen_timing.linear({ duration = 150, unit = "total" }),
|
||||||
subscroll = animate.gen_subscroll.equal({
|
subscroll = animate.gen_subscroll.equal({
|
||||||
predicate = function(total_scroll)
|
predicate = function(total_scroll)
|
||||||
if mouse_scrolled then
|
if mouse_scrolled then
|
||||||
mouse_scrolled = false
|
mouse_scrolled = false
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
return total_scroll > 1
|
return total_scroll > 1
|
||||||
end,
|
end,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
require("mini.animate").setup(opts)
|
require("mini.animate").setup(opts)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,35 +1,35 @@
|
||||||
local M = {
|
local M = {
|
||||||
"SmiteshP/nvim-navic",
|
"SmiteshP/nvim-navic",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"LunarVim/breadcrumbs.nvim",
|
"LunarVim/breadcrumbs.nvim",
|
||||||
opts = {},
|
opts = {},
|
||||||
config = true,
|
config = true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
function M.config()
|
function M.config()
|
||||||
local icons = require("pcode.user.icons").kind
|
local icons = require("pcode.user.icons").kind
|
||||||
for key, value in pairs(icons) do
|
for key, value in pairs(icons) do
|
||||||
icons[key] = value .. " "
|
icons[key] = value .. " "
|
||||||
end
|
end
|
||||||
require("nvim-navic").setup({
|
require("nvim-navic").setup({
|
||||||
icons = icons,
|
icons = icons,
|
||||||
lsp = {
|
lsp = {
|
||||||
auto_attach = false,
|
auto_attach = false,
|
||||||
preference = nil,
|
preference = nil,
|
||||||
},
|
},
|
||||||
highlight = false,
|
highlight = false,
|
||||||
separator = " > ",
|
separator = " > ",
|
||||||
depth_limit = 0,
|
depth_limit = 0,
|
||||||
depth_limit_indicator = "..",
|
depth_limit_indicator = "..",
|
||||||
safe_output = true,
|
safe_output = true,
|
||||||
lazy_update_context = false,
|
lazy_update_context = false,
|
||||||
click = false,
|
click = false,
|
||||||
format_text = function(text)
|
format_text = function(text)
|
||||||
return text
|
return text
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
return {
|
return {
|
||||||
"karb94/neoscroll.nvim",
|
"karb94/neoscroll.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
config = function()
|
config = function()
|
||||||
require("neoscroll").setup({})
|
require("neoscroll").setup({})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,33 +1,33 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvchad/menu",
|
"nvchad/menu",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
event = { "VeryLazy" },
|
event = { "VeryLazy" },
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "nvchad/volt", lazy = true },
|
{ "nvchad/volt", lazy = true },
|
||||||
{
|
{
|
||||||
"nvchad/minty",
|
"nvchad/minty",
|
||||||
cmd = { "Shades", "Huefy" },
|
cmd = { "Shades", "Huefy" },
|
||||||
lazy = true,
|
lazy = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
mouse = true,
|
mouse = true,
|
||||||
border = true,
|
border = true,
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
-- Keyboard users
|
-- Keyboard users
|
||||||
vim.keymap.set("n", "<C-t>", function()
|
vim.keymap.set("n", "<C-t>", function()
|
||||||
require("menu").open("default")
|
require("menu").open("default")
|
||||||
end, {})
|
end, {})
|
||||||
|
|
||||||
-- mouse users + nvimtree users!
|
-- mouse users + nvimtree users!
|
||||||
vim.keymap.set("n", "<RightMouse>", function()
|
vim.keymap.set("n", "<RightMouse>", function()
|
||||||
vim.cmd.exec('"normal! \\<RightMouse>"')
|
vim.cmd.exec('"normal! \\<RightMouse>"')
|
||||||
|
|
||||||
local options = vim.bo.ft == "NvimTree" and "nvimtree" or "default"
|
local options = vim.bo.ft == "NvimTree" and "nvimtree" or "default"
|
||||||
require("menu").open(options, opts)
|
require("menu").open(options, opts)
|
||||||
end, {})
|
end, {})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,107 +1,107 @@
|
||||||
local M = { "kevinhwang91/nvim-ufo" }
|
local M = { "kevinhwang91/nvim-ufo" }
|
||||||
M.event = "VeryLazy"
|
M.event = "VeryLazy"
|
||||||
M.dependencies = {
|
M.dependencies = {
|
||||||
"kevinhwang91/promise-async",
|
"kevinhwang91/promise-async",
|
||||||
"luukvbaal/statuscol.nvim",
|
"luukvbaal/statuscol.nvim",
|
||||||
}
|
}
|
||||||
M.config = function()
|
M.config = function()
|
||||||
local builtin = require("statuscol.builtin")
|
local builtin = require("statuscol.builtin")
|
||||||
local cfg = {
|
local cfg = {
|
||||||
setopt = true,
|
setopt = true,
|
||||||
relculright = true,
|
relculright = true,
|
||||||
segments = {
|
segments = {
|
||||||
|
|
||||||
{ text = { builtin.foldfunc, " " }, click = "v:lua.ScFa", hl = "Comment" },
|
{ text = { builtin.foldfunc, " " }, click = "v:lua.ScFa", hl = "Comment" },
|
||||||
|
|
||||||
{ text = { "%s" }, click = "v:lua.ScSa" },
|
{ text = { "%s" }, click = "v:lua.ScSa" },
|
||||||
{ text = { builtin.lnumfunc, " " }, click = "v:lua.ScLa" },
|
{ text = { builtin.lnumfunc, " " }, click = "v:lua.ScLa" },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
require("statuscol").setup(cfg)
|
require("statuscol").setup(cfg)
|
||||||
|
|
||||||
vim.o.foldcolumn = "1" -- '0' is not bad
|
vim.o.foldcolumn = "1" -- '0' is not bad
|
||||||
vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
|
vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
|
||||||
vim.o.foldlevelstart = 99
|
vim.o.foldlevelstart = 99
|
||||||
vim.o.foldenable = true
|
vim.o.foldenable = true
|
||||||
vim.o.fillchars = [[eob: ,fold: ,foldopen:▾,foldsep: ,foldclose:▸]]
|
vim.o.fillchars = [[eob: ,fold: ,foldopen:▾,foldsep: ,foldclose:▸]]
|
||||||
|
|
||||||
-- Using ufo provider need remap `zR` and `zM`. If Neovim is 0.6.1, remap yourself
|
-- Using ufo provider need remap `zR` and `zM`. If Neovim is 0.6.1, remap yourself
|
||||||
vim.keymap.set("n", "zR", require("ufo").openAllFolds)
|
vim.keymap.set("n", "zR", require("ufo").openAllFolds)
|
||||||
vim.keymap.set("n", "zM", require("ufo").closeAllFolds)
|
vim.keymap.set("n", "zM", require("ufo").closeAllFolds)
|
||||||
|
|
||||||
local handler = function(virtText, lnum, endLnum, width, truncate)
|
local handler = function(virtText, lnum, endLnum, width, truncate)
|
||||||
local newVirtText = {}
|
local newVirtText = {}
|
||||||
local suffix = (" %d "):format(endLnum - lnum)
|
local suffix = (" %d "):format(endLnum - lnum)
|
||||||
local sufWidth = vim.fn.strdisplaywidth(suffix)
|
local sufWidth = vim.fn.strdisplaywidth(suffix)
|
||||||
local targetWidth = width - sufWidth
|
local targetWidth = width - sufWidth
|
||||||
local curWidth = 0
|
local curWidth = 0
|
||||||
for _, chunk in ipairs(virtText) do
|
for _, chunk in ipairs(virtText) do
|
||||||
local chunkText = chunk[1]
|
local chunkText = chunk[1]
|
||||||
local chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
local chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
||||||
if targetWidth > curWidth + chunkWidth then
|
if targetWidth > curWidth + chunkWidth then
|
||||||
table.insert(newVirtText, chunk)
|
table.insert(newVirtText, chunk)
|
||||||
else
|
else
|
||||||
chunkText = truncate(chunkText, targetWidth - curWidth)
|
chunkText = truncate(chunkText, targetWidth - curWidth)
|
||||||
local hlGroup = chunk[2]
|
local hlGroup = chunk[2]
|
||||||
table.insert(newVirtText, { chunkText, hlGroup })
|
table.insert(newVirtText, { chunkText, hlGroup })
|
||||||
chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
||||||
-- str width returned from truncate() may less than 2nd argument, need padding
|
-- str width returned from truncate() may less than 2nd argument, need padding
|
||||||
if curWidth + chunkWidth < targetWidth then
|
if curWidth + chunkWidth < targetWidth then
|
||||||
suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth)
|
suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth)
|
||||||
end
|
end
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
curWidth = curWidth + chunkWidth
|
curWidth = curWidth + chunkWidth
|
||||||
end
|
end
|
||||||
table.insert(newVirtText, { suffix, "MoreMsg" })
|
table.insert(newVirtText, { suffix, "MoreMsg" })
|
||||||
return newVirtText
|
return newVirtText
|
||||||
end
|
end
|
||||||
|
|
||||||
local ftMap = {
|
local ftMap = {
|
||||||
-- typescriptreact = { "lsp", "treesitter" },
|
-- typescriptreact = { "lsp", "treesitter" },
|
||||||
-- python = { "indent" },
|
-- python = { "indent" },
|
||||||
-- git = "",
|
-- git = "",
|
||||||
}
|
}
|
||||||
|
|
||||||
require("ufo").setup({
|
require("ufo").setup({
|
||||||
fold_virt_text_handler = handler,
|
fold_virt_text_handler = handler,
|
||||||
close_fold_kinds = {},
|
close_fold_kinds = {},
|
||||||
-- close_fold_kinds = { "imports", "comment" },
|
-- close_fold_kinds = { "imports", "comment" },
|
||||||
provider_selector = function(bufnr, filetype, buftype)
|
provider_selector = function(bufnr, filetype, buftype)
|
||||||
-- if you prefer treesitter provider rather than lsp,
|
-- if you prefer treesitter provider rather than lsp,
|
||||||
-- return ftMap[filetype] or {'treesitter', 'indent'}
|
-- return ftMap[filetype] or {'treesitter', 'indent'}
|
||||||
return ftMap[filetype]
|
return ftMap[filetype]
|
||||||
-- return { "treesitter", "indent" }
|
-- return { "treesitter", "indent" }
|
||||||
|
|
||||||
-- refer to ./doc/example.lua for detail
|
-- refer to ./doc/example.lua for detail
|
||||||
end,
|
end,
|
||||||
|
|
||||||
preview = {
|
preview = {
|
||||||
win_config = {
|
win_config = {
|
||||||
border = { "", "─", "", "", "", "─", "", "" },
|
border = { "", "─", "", "", "", "─", "", "" },
|
||||||
winhighlight = "Normal:Folded",
|
winhighlight = "Normal:Folded",
|
||||||
winblend = 0,
|
winblend = 0,
|
||||||
},
|
},
|
||||||
mappings = {
|
mappings = {
|
||||||
scrollU = "<C-k>",
|
scrollU = "<C-k>",
|
||||||
scrollD = "<C-j>",
|
scrollD = "<C-j>",
|
||||||
jumpTop = "[",
|
jumpTop = "[",
|
||||||
jumpBot = "]",
|
jumpBot = "]",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.keymap.set("n", "zR", require("ufo").openAllFolds)
|
vim.keymap.set("n", "zR", require("ufo").openAllFolds)
|
||||||
vim.keymap.set("n", "zM", require("ufo").closeAllFolds)
|
vim.keymap.set("n", "zM", require("ufo").closeAllFolds)
|
||||||
vim.keymap.set("n", "zr", require("ufo").openFoldsExceptKinds)
|
vim.keymap.set("n", "zr", require("ufo").openFoldsExceptKinds)
|
||||||
vim.keymap.set("n", "zm", require("ufo").closeFoldsWith) -- closeAllFolds == closeFoldsWith(0)
|
vim.keymap.set("n", "zm", require("ufo").closeFoldsWith) -- closeAllFolds == closeFoldsWith(0)
|
||||||
vim.keymap.set("n", "K", function()
|
vim.keymap.set("n", "K", function()
|
||||||
local winid = require("ufo").peekFoldedLinesUnderCursor()
|
local winid = require("ufo").peekFoldedLinesUnderCursor()
|
||||||
if not winid then
|
if not winid then
|
||||||
vim.lsp.buf.hover()
|
vim.lsp.buf.hover()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -1,36 +1,36 @@
|
||||||
return {
|
return {
|
||||||
"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",
|
||||||
},
|
},
|
||||||
blacklist = {
|
blacklist = {
|
||||||
"html",
|
"html",
|
||||||
"tsx",
|
"tsx",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
return {
|
return {
|
||||||
-- Incremental rename
|
-- Incremental rename
|
||||||
{
|
{
|
||||||
"smjonas/inc-rename.nvim",
|
"smjonas/inc-rename.nvim",
|
||||||
cmd = "IncRename",
|
cmd = "IncRename",
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
{"<leader>u","",desc=" Edit"},
|
{"<leader>u","",desc=" Edit"},
|
||||||
|
@ -17,27 +17,33 @@ return {
|
||||||
expr = true,
|
expr = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = true,
|
config = true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
-- Refactoring tool
|
"folke/noice.nvim",
|
||||||
{
|
optional = true,
|
||||||
"ThePrimeagen/refactoring.nvim",
|
opts = {
|
||||||
keys = {
|
presets = { inc_rename = true },
|
||||||
{
|
},
|
||||||
"<leader>r",
|
},
|
||||||
function()
|
-- Refactoring tool
|
||||||
require("refactoring").select_refactor({
|
{
|
||||||
show_success_message = true,
|
"ThePrimeagen/refactoring.nvim",
|
||||||
})
|
keys = {
|
||||||
end,
|
{
|
||||||
mode = "v",
|
"<leader>r",
|
||||||
noremap = true,
|
function()
|
||||||
silent = true,
|
require("refactoring").select_refactor({
|
||||||
expr = false,
|
show_success_message = true,
|
||||||
desc = " Refactoring",
|
})
|
||||||
},
|
end,
|
||||||
},
|
mode = "v",
|
||||||
opts = {},
|
noremap = true,
|
||||||
},
|
silent = true,
|
||||||
|
expr = false,
|
||||||
|
desc = " Refactoring",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
vim.filetype.add({
|
vim.filetype.add({
|
||||||
extension = {
|
extension = {
|
||||||
["http"] = "http",
|
["http"] = "http",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"mistweaverco/kulala.nvim",
|
"mistweaverco/kulala.nvim",
|
||||||
ft = "http",
|
ft = "http",
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>R", "", desc = " Rest" },
|
{ "<leader>R", "", desc = " Rest" },
|
||||||
{ "<leader>Rs", "<cmd>lua require('kulala').run()<cr>", desc = "Send the request" },
|
{ "<leader>Rs", "<cmd>lua require('kulala').run()<cr>", desc = "Send the request" },
|
||||||
{ "<leader>Rt", "<cmd>lua require('kulala').toggle_view()<cr>", desc = "Toggle headers/body" },
|
{ "<leader>Rt", "<cmd>lua require('kulala').toggle_view()<cr>", desc = "Toggle headers/body" },
|
||||||
{ "<leader>Rp", "<cmd>lua require('kulala').jump_prev()<cr>", desc = "Jump to previous request" },
|
{ "<leader>Rp", "<cmd>lua require('kulala').jump_prev()<cr>", desc = "Jump to previous request" },
|
||||||
{ "<leader>Rn", "<cmd>lua require('kulala').jump_next()<cr>", desc = "Jump to next request" },
|
{ "<leader>Rn", "<cmd>lua require('kulala').jump_next()<cr>", desc = "Jump to next request" },
|
||||||
},
|
},
|
||||||
opts = {},
|
opts = {},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
opts.ensure_installed = opts.ensure_installed or {}
|
opts.ensure_installed = opts.ensure_installed or {}
|
||||||
vim.list_extend(opts.ensure_installed, { "http", "graphql" })
|
vim.list_extend(opts.ensure_installed, { "http", "graphql" })
|
||||||
return opts
|
return opts
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,42 +5,42 @@
|
||||||
-- manual penggunaan
|
-- manual penggunaan
|
||||||
-- https://www.jetbrains.com/help/idea/exploring-http-syntax.html
|
-- https://www.jetbrains.com/help/idea/exploring-http-syntax.html
|
||||||
return {
|
return {
|
||||||
"rest-nvim/rest.nvim",
|
"rest-nvim/rest.nvim",
|
||||||
-- NOTE: Follow https://github.com/rest-nvim/rest.nvim/issues/306
|
-- NOTE: Follow https://github.com/rest-nvim/rest.nvim/issues/306
|
||||||
-- commit = "91badd46c60df6bd9800c809056af2d80d33da4c",
|
-- commit = "91badd46c60df6bd9800c809056af2d80d33da4c",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
enabled = vim.fn.executable("luarocks") == 1,
|
enabled = vim.fn.executable("luarocks") == 1,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
vim.list_extend(opts.ensure_installed, { "http" })
|
vim.list_extend(opts.ensure_installed, { "http" })
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("rest-nvim").setup()
|
require("rest-nvim").setup()
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
pattern = { "http", "httpResult" },
|
pattern = { "http", "httpResult" },
|
||||||
callback = function()
|
callback = function()
|
||||||
local opt = vim.opt
|
local opt = vim.opt
|
||||||
opt.number = false -- Print line number
|
opt.number = false -- Print line number
|
||||||
opt.preserveindent = false -- Preserve indent structure as much as possible
|
opt.preserveindent = false -- Preserve indent structure as much as possible
|
||||||
opt.relativenumber = false
|
opt.relativenumber = false
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
ft = "http",
|
ft = "http",
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
"<Leader>rh",
|
"<Leader>rh",
|
||||||
"<cmd>Rest run<cr>",
|
"<cmd>Rest run<cr>",
|
||||||
desc = "Run http request under cursor",
|
desc = "Run http request under cursor",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<Leader>rH",
|
"<Leader>rH",
|
||||||
"<cmd>Rest last<cr>",
|
"<cmd>Rest last<cr>",
|
||||||
desc = "Run last http request",
|
desc = "Run last http request",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
return {
|
return {
|
||||||
"dstein64/nvim-scrollview",
|
"dstein64/nvim-scrollview",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
||||||
opts = {
|
opts = {
|
||||||
bg = "LightCyan",
|
bg = "LightCyan",
|
||||||
ctermbg = 160,
|
ctermbg = 160,
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
require("scrollview").setup(opts)
|
require("scrollview").setup(opts)
|
||||||
vim.g.scrollview_excluded_filetypes = { "NvimTree", "vista_kind", "Outline", "neo-tree" }
|
vim.g.scrollview_excluded_filetypes = { "NvimTree", "vista_kind", "Outline", "neo-tree" }
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
return {
|
return {
|
||||||
"mrjones2014/smart-splits.nvim",
|
"mrjones2014/smart-splits.nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
||||||
opts = {
|
opts = {
|
||||||
ignored_filetypes = {
|
ignored_filetypes = {
|
||||||
"nofile",
|
"nofile",
|
||||||
"quickfix",
|
"quickfix",
|
||||||
"qf",
|
"qf",
|
||||||
"prompt",
|
"prompt",
|
||||||
},
|
},
|
||||||
ignored_buftypes = { "nofile" },
|
ignored_buftypes = { "nofile" },
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
require("smart-splits").setup(opts)
|
require("smart-splits").setup(opts)
|
||||||
vim.keymap.set("n", "<C-Left>", require("smart-splits").resize_left)
|
vim.keymap.set("n", "<C-Left>", require("smart-splits").resize_left)
|
||||||
vim.keymap.set("n", "<C-Down>", require("smart-splits").resize_down)
|
vim.keymap.set("n", "<C-Down>", require("smart-splits").resize_down)
|
||||||
vim.keymap.set("n", "<C-Up", require("smart-splits").resize_up)
|
vim.keymap.set("n", "<C-Up", require("smart-splits").resize_up)
|
||||||
vim.keymap.set("n", "<C-Right>", require("smart-splits").resize_right)
|
vim.keymap.set("n", "<C-Right>", require("smart-splits").resize_right)
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,64 +1,64 @@
|
||||||
return {
|
return {
|
||||||
-- transparant config
|
-- transparant config
|
||||||
{
|
{
|
||||||
"xiyaowong/transparent.nvim",
|
"xiyaowong/transparent.nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
event = "BufWinEnter",
|
event = "BufWinEnter",
|
||||||
cmd = { "TransparentToggle", "TransparentEnable", "TransparentDisable" },
|
cmd = { "TransparentToggle", "TransparentEnable", "TransparentDisable" },
|
||||||
config = function()
|
config = function()
|
||||||
require("transparent").setup({
|
require("transparent").setup({
|
||||||
extra_groups = {
|
extra_groups = {
|
||||||
"Normal",
|
"Normal",
|
||||||
"NormalNC",
|
"NormalNC",
|
||||||
"NormalFloat",
|
"NormalFloat",
|
||||||
"FloatBorder",
|
"FloatBorder",
|
||||||
"Comment",
|
"Comment",
|
||||||
"Folded",
|
"Folded",
|
||||||
"GitSignsAdd",
|
"GitSignsAdd",
|
||||||
"GitSignsDelete",
|
"GitSignsDelete",
|
||||||
"GitSignsChange",
|
"GitSignsChange",
|
||||||
"FoldColumn",
|
"FoldColumn",
|
||||||
"WinBar",
|
"WinBar",
|
||||||
"WinBarNC",
|
"WinBarNC",
|
||||||
"NotifyBackground",
|
"NotifyBackground",
|
||||||
},
|
},
|
||||||
exclude_groups = {
|
exclude_groups = {
|
||||||
-- disable active selection backgroun
|
-- disable active selection backgroun
|
||||||
"CursorLine",
|
"CursorLine",
|
||||||
"CursorLineNR",
|
"CursorLineNR",
|
||||||
"CursorLineSign",
|
"CursorLineSign",
|
||||||
"CursorLineFold",
|
"CursorLineFold",
|
||||||
-- disable nvimtree CursorLine
|
-- disable nvimtree CursorLine
|
||||||
"NvimTreeCursorLine",
|
"NvimTreeCursorLine",
|
||||||
-- disable Neotree CursorLine
|
-- disable Neotree CursorLine
|
||||||
"NeoTreeCursorLine",
|
"NeoTreeCursorLine",
|
||||||
-- disable Telescope active selection background
|
-- disable Telescope active selection background
|
||||||
"TelescopeSelection",
|
"TelescopeSelection",
|
||||||
-- disable lualine background color
|
-- disable lualine background color
|
||||||
"LualineNormal",
|
"LualineNormal",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
require("transparent").clear_prefix("BufferLine")
|
require("transparent").clear_prefix("BufferLine")
|
||||||
-- clear prefix for which-key
|
-- clear prefix for which-key
|
||||||
require("transparent").clear_prefix("WhichKey")
|
require("transparent").clear_prefix("WhichKey")
|
||||||
-- clear prefix for lazy.nvim
|
-- clear prefix for lazy.nvim
|
||||||
require("transparent").clear_prefix("Lazy")
|
require("transparent").clear_prefix("Lazy")
|
||||||
-- clear prefix for NvimTree
|
-- clear prefix for NvimTree
|
||||||
require("transparent").clear_prefix("NvimTree")
|
require("transparent").clear_prefix("NvimTree")
|
||||||
-- clear prefix for NeoTree
|
-- clear prefix for NeoTree
|
||||||
require("transparent").clear_prefix("NeoTree")
|
require("transparent").clear_prefix("NeoTree")
|
||||||
-- clear prefix for Telescope
|
-- clear prefix for Telescope
|
||||||
require("transparent").clear_prefix("Telescope")
|
require("transparent").clear_prefix("Telescope")
|
||||||
require("transparent").clear_prefix("mason")
|
require("transparent").clear_prefix("mason")
|
||||||
-- create auto command to set transparent
|
-- create auto command to set transparent
|
||||||
vim.cmd("TransparentDisable")
|
vim.cmd("TransparentDisable")
|
||||||
vim.cmd("TransparentEnable")
|
vim.cmd("TransparentEnable")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"rcarriga/nvim-notify",
|
"rcarriga/nvim-notify",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
opts.background_colour = "#00000000"
|
opts.background_colour = "#00000000"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
return {
|
return {
|
||||||
"nvim-treesitter/nvim-treesitter-context",
|
"nvim-treesitter/nvim-treesitter-context",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
event = { "BufRead", "VeryLazy" },
|
event = { "BufRead", "VeryLazy" },
|
||||||
opts = {},
|
opts = {},
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>T", "", desc = " TS Context" },
|
{ "<leader>T", "", desc = " TS Context" },
|
||||||
{ "<leader>Tt", "<cmd>TSContextToggle<cr>", desc = "Toggle Context" },
|
{ "<leader>Tt", "<cmd>TSContextToggle<cr>", desc = "Toggle Context" },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"lukas-reineke/virt-column.nvim",
|
"lukas-reineke/virt-column.nvim",
|
||||||
event = "BufRead",
|
event = "BufRead",
|
||||||
opts = {},
|
opts = {},
|
||||||
config = function()
|
config = function()
|
||||||
local icons = require("pcode.user.icons")
|
local icons = require("pcode.user.icons")
|
||||||
require("virt-column").overwrite({
|
require("virt-column").overwrite({
|
||||||
exclude = {
|
exclude = {
|
||||||
filetypes = { "help", "text", "markdown" },
|
filetypes = { "help", "text", "markdown" },
|
||||||
},
|
},
|
||||||
char = icons.ui.LineMiddle,
|
char = icons.ui.LineMiddle,
|
||||||
})
|
})
|
||||||
-- Mengatur colum color max 80 caracter
|
-- Mengatur colum color max 80 caracter
|
||||||
vim.api.nvim_create_autocmd("BufWinEnter", {
|
vim.api.nvim_create_autocmd("BufWinEnter", {
|
||||||
pattern = "*",
|
pattern = "*",
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.opt.formatoptions = "croql"
|
vim.opt.formatoptions = "croql"
|
||||||
vim.opt.textwidth = 80
|
vim.opt.textwidth = 80
|
||||||
vim.opt.colorcolumn = "+1"
|
vim.opt.colorcolumn = "+1"
|
||||||
vim.opt.lazyredraw = false
|
vim.opt.lazyredraw = false
|
||||||
-- vim.cmd "hi ColorColumn guibg=#1B2430 ctermbg=246"
|
-- vim.cmd "hi ColorColumn guibg=#1B2430 ctermbg=246"
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
return {
|
return {
|
||||||
"mg979/vim-visual-multi",
|
"mg979/vim-visual-multi",
|
||||||
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
||||||
branch = "master",
|
branch = "master",
|
||||||
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
|
||||||
["Undo"] = "u", -- undo
|
["Undo"] = "u", -- undo
|
||||||
["Redo"] = "<C-r>", -- redo
|
["Redo"] = "<C-r>", -- redo
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
return {
|
return {
|
||||||
"gbprod/yanky.nvim",
|
"gbprod/yanky.nvim",
|
||||||
event = "BufReadPre",
|
event = "BufReadPre",
|
||||||
opts = {
|
opts = {
|
||||||
ring = {
|
ring = {
|
||||||
history_length = 50,
|
history_length = 50,
|
||||||
storage = "memory",
|
storage = "memory",
|
||||||
},
|
},
|
||||||
preserve_cursor_position = {
|
preserve_cursor_position = {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
require("yanky").setup(opts)
|
require("yanky").setup(opts)
|
||||||
-- cycle through the yank history, only work after paste
|
-- cycle through the yank history, only work after paste
|
||||||
vim.keymap.set("n", "[y", "<Plug>(YankyCycleForward)")
|
vim.keymap.set("n", "[y", "<Plug>(YankyCycleForward)")
|
||||||
vim.keymap.set("n", "]y", "<Plug>(YankyCycleBackward)")
|
vim.keymap.set("n", "]y", "<Plug>(YankyCycleBackward)")
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,22 +1,21 @@
|
||||||
return {
|
return {
|
||||||
"folke/zen-mode.nvim",
|
"folke/zen-mode.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts = {
|
opts = {
|
||||||
plugins = {
|
plugins = {
|
||||||
options = {
|
options = {
|
||||||
-- hide statusline
|
-- hide statusline
|
||||||
laststatus = 0,
|
laststatus = 0,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
on_open = function(win)
|
on_open = function(win)
|
||||||
require("notify")("Zen Mode ON")
|
require("notify")("Zen Mode ON")
|
||||||
end,
|
end,
|
||||||
on_close = function()
|
on_close = function()
|
||||||
require("notify")("Zen Mode OFF")
|
require("notify")("Zen Mode OFF")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>z", "<cmd>ZenMode<cr>", desc = " Toggle Zen Mode" },
|
{ "<leader>z", "<cmd>ZenMode<cr>", desc = " Toggle Zen Mode" },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,129 +1,129 @@
|
||||||
return {
|
return {
|
||||||
-- overidse dashboard
|
-- overidse dashboard
|
||||||
{
|
{
|
||||||
"goolord/alpha-nvim",
|
"goolord/alpha-nvim",
|
||||||
opts = {
|
opts = {
|
||||||
dash_model = {
|
dash_model = {
|
||||||
[[ _ __ __ ]],
|
[[ _ __ __ ]],
|
||||||
[[ ___ ___ (____ / /__ _______ ___/ ___ ]],
|
[[ ___ ___ (____ / /__ _______ ___/ ___ ]],
|
||||||
[[ / _ / _ \ / / _ \/ '_/ / __/ _ / _ / -_) ]],
|
[[ / _ / _ \ / / _ \/ '_/ / __/ _ / _ / -_) ]],
|
||||||
[[ / .__\_____/ /\___/_/\_\ \__/\___\_,_/\__/ ]],
|
[[ / .__\_____/ /\___/_/\_\ \__/\___\_,_/\__/ ]],
|
||||||
[[ /_/ |___/ ]],
|
[[ /_/ |___/ ]],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- overide lualine
|
-- overide lualine
|
||||||
{
|
{
|
||||||
"pojokcodeid/auto-lualine.nvim",
|
"pojokcodeid/auto-lualine.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
-- for more options check out https://github.com/pojokcodeid/auto-lualine.nvim
|
-- for more options check out https://github.com/pojokcodeid/auto-lualine.nvim
|
||||||
setColor = "auto",
|
setColor = "auto",
|
||||||
setOption = "roundedall",
|
setOption = "roundedall",
|
||||||
setMode = 5,
|
setMode = 5,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- overide formatting
|
-- overide formatting
|
||||||
{
|
{
|
||||||
"pojokcodeid/auto-conform.nvim",
|
"pojokcodeid/auto-conform.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
format_on_save = true,
|
format_on_save = true,
|
||||||
format_timeout_ms = 5000,
|
format_timeout_ms = 5000,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- install treesitter
|
-- install treesitter
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
vim.list_extend(opts.ensure_installed, { "lua", "c" })
|
vim.list_extend(opts.ensure_installed, { "lua", "c" })
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
-- install mason (lsp, dap, linters, formatters)
|
-- install mason (lsp, dap, linters, formatters)
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
opts = { ensure_installed = { "stylua" } },
|
opts = { ensure_installed = { "stylua" } },
|
||||||
},
|
},
|
||||||
-- overide lsp config
|
-- overide lsp config
|
||||||
{
|
{
|
||||||
"williamboman/mason-lspconfig.nvim",
|
"williamboman/mason-lspconfig.nvim",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
vim.list_extend(opts.skip_config, { "jdtls" })
|
vim.list_extend(opts.skip_config, { "jdtls" })
|
||||||
opts.virtual_text = true
|
opts.virtual_text = true
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
-- add whichkey mappings
|
-- add whichkey mappings
|
||||||
{
|
{
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
opts.mappings = opts.mappings or {}
|
opts.mappings = opts.mappings or {}
|
||||||
vim.list_extend(opts.mappings, {
|
vim.list_extend(opts.mappings, {
|
||||||
{ "<leader>h", "<cmd>nohlsearch<CR>", desc = " No Highlight", mode = "n" },
|
{ "<leader>h", "<cmd>nohlsearch<CR>", desc = " No Highlight", mode = "n" },
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
-- overide telescope
|
-- overide telescope
|
||||||
{
|
{
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
opts.pickers = {
|
opts.pickers = {
|
||||||
find_files = {
|
find_files = {
|
||||||
hidden = true,
|
hidden = true,
|
||||||
},
|
},
|
||||||
live_grep = {
|
live_grep = {
|
||||||
theme = "dropdown",
|
theme = "dropdown",
|
||||||
only_sort_text = true,
|
only_sort_text = true,
|
||||||
additional_args = function()
|
additional_args = function()
|
||||||
return { "--multiline" }
|
return { "--multiline" }
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
-- add code runner
|
-- add code runner
|
||||||
{
|
{
|
||||||
"CRAG666/code_runner.nvim",
|
"CRAG666/code_runner.nvim",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
vim.list_extend(opts.filetype, { go = "go run $fileName" })
|
vim.list_extend(opts.filetype, { go = "go run $fileName" })
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
-- custem nvimtree
|
-- custem nvimtree
|
||||||
{
|
{
|
||||||
"nvim-tree/nvim-tree.lua",
|
"nvim-tree/nvim-tree.lua",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
-- set nvimtree float view (default left side)
|
-- set nvimtree float view (default left side)
|
||||||
-- opts.view = {
|
-- opts.view = {
|
||||||
-- adaptive_size = false,
|
-- adaptive_size = false,
|
||||||
-- centralize_selection = true,
|
-- centralize_selection = true,
|
||||||
-- side = "left",
|
-- side = "left",
|
||||||
-- preserve_window_proportions = false,
|
-- preserve_window_proportions = false,
|
||||||
-- number = false,
|
-- number = false,
|
||||||
-- relativenumber = false,
|
-- relativenumber = false,
|
||||||
-- signcolumn = "yes",
|
-- signcolumn = "yes",
|
||||||
-- float = {
|
-- float = {
|
||||||
-- enable = true,
|
-- enable = true,
|
||||||
-- open_win_config = function()
|
-- open_win_config = function()
|
||||||
-- local screen_w = vim.opt.columns:get()
|
-- local screen_w = vim.opt.columns:get()
|
||||||
-- local screen_h = vim.opt.lines:get() - vim.opt.cmdheight:get()
|
-- local screen_h = vim.opt.lines:get() - vim.opt.cmdheight:get()
|
||||||
-- local window_w = screen_w * 0.5
|
-- local window_w = screen_w * 0.5
|
||||||
-- local window_h = screen_h * 0.9
|
-- local window_h = screen_h * 0.9
|
||||||
-- local window_w_int = math.floor(window_w)
|
-- local window_w_int = math.floor(window_w)
|
||||||
-- local window_h_int = math.floor(window_h)
|
-- local window_h_int = math.floor(window_h)
|
||||||
-- local center_x = (screen_w - window_w) / 2
|
-- local center_x = (screen_w - window_w) / 2
|
||||||
-- local center_y = ((vim.opt.lines:get() - window_h) / 2) - vim.opt.cmdheight:get()
|
-- local center_y = ((vim.opt.lines:get() - window_h) / 2) - vim.opt.cmdheight:get()
|
||||||
-- return {
|
-- return {
|
||||||
-- border = "rounded",
|
-- border = "rounded",
|
||||||
-- relative = "editor",
|
-- relative = "editor",
|
||||||
-- row = center_y,
|
-- row = center_y,
|
||||||
-- col = center_x,
|
-- col = center_x,
|
||||||
-- width = window_w_int,
|
-- width = window_w_int,
|
||||||
-- height = window_h_int,
|
-- height = window_h_int,
|
||||||
-- }
|
-- }
|
||||||
-- end,
|
-- end,
|
||||||
-- },
|
-- },
|
||||||
-- width = function()
|
-- width = function()
|
||||||
-- return math.floor(vim.opt.columns:get() * 0.5)
|
-- return math.floor(vim.opt.columns:get() * 0.5)
|
||||||
-- end,
|
-- end,
|
||||||
-- }
|
-- }
|
||||||
return opts
|
return opts
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ pcode.extras = {
|
||||||
minianimate = false,
|
minianimate = false,
|
||||||
neoscroll = false,
|
neoscroll = false,
|
||||||
nvimufo = false,
|
nvimufo = false,
|
||||||
refactoring = false,
|
refactoring = true,
|
||||||
rest = false,
|
rest = false,
|
||||||
treesittercontex = false,
|
treesittercontex = false,
|
||||||
codeium = true,
|
codeium = true,
|
||||||
|
|
|
@ -69,3 +69,5 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||||
opt.relativenumber = false
|
opt.relativenumber = false
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
vim.opt.guicursor = "n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue