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" },
|
||||
"Eva-Theme.nvim": { "branch": "master", "commit": "568fdba3a2a3088bec2198e7bb8f28d482629e58" },
|
||||
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
|
||||
"LuaSnip": { "branch": "master", "commit": "4bf40748f6fe939bdcb69325918535b1c5edea51" },
|
||||
"LuaSnip": { "branch": "master", "commit": "29417eea5b7c4b6beda105ced072855101d9680e" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "bf3c8bb8c02ed3d9644cc5bbc48e2bdc39349cd7" },
|
||||
"auto-bufferline.nvim": { "branch": "main", "commit": "f5835a4b62bfb6f6c829f8f050e5102ccf230b3e" },
|
||||
"auto-conform.nvim": { "branch": "main", "commit": "5f0897235e84bf2f8ff9d634e81678d5bfa63ab8" },
|
||||
|
@ -23,6 +23,7 @@
|
|||
"dressing.nvim": { "branch": "master", "commit": "6ef1ca479d37d4ff66f13eed44d08912caff483a" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "4daf7022f1481edf1e8fb9947df13bb07c18e89a" },
|
||||
"inc-rename.nvim": { "branch": "main", "commit": "8ba77017ca468f3029bf88ef409c2d20476ea66b" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "04e44b09ee3ff189c69ab082edac1ef7ae2e256c" },
|
||||
"laravel.nvim": { "branch": "main", "commit": "e4f39d942352b03396a9df79896b0a8801675199" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "b1134ab82ee4279e31f7ddf7e34b2a99eb9b7bc9" },
|
||||
|
@ -30,17 +31,17 @@
|
|||
"mason-lspconfig.nvim": { "branch": "main", "commit": "4d0e5b49363cac187326998b96aa6a2884e0e89b" },
|
||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" },
|
||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||
"menu": { "branch": "main", "commit": "9269d8ff5775bb1b9b9cad538d1bcd13fa105fe7" },
|
||||
"menu": { "branch": "main", "commit": "a12605e89a5da6c63840104a95362e2bb1e9b847" },
|
||||
"mini.indentscope": { "branch": "main", "commit": "da9af64649e114aa79480c238fd23f6524bc0903" },
|
||||
"minty": { "branch": "main", "commit": "6e5c4cfc66e5dbb248ab78293d1c147de0c33a54" },
|
||||
"minty": { "branch": "main", "commit": "1ab2b8334cec1770fef096f0a5697bf0c3afb3ca" },
|
||||
"neotest": { "branch": "master", "commit": "6d3d22cdad49999ef774ebe1bc250a4994038964" },
|
||||
"neotest-phpunit": { "branch": "main", "commit": "baae8dfa0a3aaacd9f0bb6845d6348f5bcdc48bb" },
|
||||
"noice.nvim": { "branch": "main", "commit": "5a78b42bec5e775f2db03bf93f6d1e0f3636306c" },
|
||||
"noice.nvim": { "branch": "main", "commit": "d80136061820765baf70ace7dfb98a52575edc4a" },
|
||||
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "f17d9b4394027ff4442b298398dfcaab97e40c4f" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "e614ff5c26d085a3242e26648e90e56ba5476da2" },
|
||||
"nvim-dap": { "branch": "master", "commit": "7ff6936010b7222fea2caea0f67ed77f1b7c60dd" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "f134063618a65cad4d7415fddbd96ff7e0c5b4ae" },
|
||||
"nvim-dap": { "branch": "master", "commit": "8517126e9323e346f6a99b3b594c5a940b914dcd" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" },
|
||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "76d80c3d171224315b61c006502a1e30c213a9ab" },
|
||||
"nvim-lint": { "branch": "master", "commit": "36da8dd0ddc4f88e0beae234c20e75397326f143" },
|
||||
|
@ -57,6 +58,7 @@
|
|||
"nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||
"rainbow-delimiters.nvim": { "branch": "master", "commit": "e0f9b3efe150724af2d2ed59997d5ece373840e3" },
|
||||
"refactoring.nvim": { "branch": "master", "commit": "53ed6854e0bba64d467c58e87084dcf8b1c22d36" },
|
||||
"smart-splits.nvim": { "branch": "master", "commit": "11600d75e1b57e9fe1f3ca880a917485fc399e8c" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "85922dde3767e01d42a08e750a773effbffaea3e" },
|
||||
"tiny-devicons-auto-colors.nvim": { "branch": "main", "commit": "a39fa4c92268832f6034306793b8acbfec2a7549" },
|
||||
|
|
|
@ -1,133 +1,140 @@
|
|||
return {
|
||||
{
|
||||
"folke/noice.nvim",
|
||||
lazy = true,
|
||||
enabled = true,
|
||||
dependencies = {
|
||||
{ "MunifTanjim/nui.nvim" },
|
||||
},
|
||||
event = "CmdlineEnter",
|
||||
opts = {
|
||||
messages = {
|
||||
enabled = false,
|
||||
},
|
||||
notify = {
|
||||
enabled = false,
|
||||
},
|
||||
lsp = {
|
||||
progress = {
|
||||
enabled = false,
|
||||
},
|
||||
hover = {
|
||||
enabled = false,
|
||||
},
|
||||
signature = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<S-Enter>",
|
||||
function()
|
||||
require("noice").redirect(vim.fn.getcmdline())
|
||||
end,
|
||||
mode = "c",
|
||||
desc = "Redirect Cmdline",
|
||||
},
|
||||
{
|
||||
"<leader>snl",
|
||||
function()
|
||||
require("noice").cmd("last")
|
||||
end,
|
||||
desc = "Noice Last Message",
|
||||
},
|
||||
{
|
||||
"<leader>snh",
|
||||
function()
|
||||
require("noice").cmd("history")
|
||||
end,
|
||||
desc = "Noice History",
|
||||
},
|
||||
{
|
||||
"<leader>sna",
|
||||
function()
|
||||
require("noice").cmd("all")
|
||||
end,
|
||||
desc = "Noice All",
|
||||
},
|
||||
{
|
||||
"<c-f>",
|
||||
function()
|
||||
if not require("noice.lsp").scroll(4) then
|
||||
return "<c-f>"
|
||||
end
|
||||
end,
|
||||
silent = true,
|
||||
expr = true,
|
||||
desc = "Scroll forward",
|
||||
mode = { "i", "n", "s" },
|
||||
},
|
||||
{
|
||||
"<c-b>",
|
||||
function()
|
||||
if not require("noice.lsp").scroll(-4) then
|
||||
return "<c-b>"
|
||||
end
|
||||
end,
|
||||
silent = true,
|
||||
expr = true,
|
||||
desc = "Scroll backward",
|
||||
mode = { "i", "n", "s" },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"hrsh7th/cmp-cmdline",
|
||||
event = "VeryLazy",
|
||||
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" }),
|
||||
}
|
||||
{
|
||||
"folke/noice.nvim",
|
||||
lazy = true,
|
||||
enabled = true,
|
||||
dependencies = {
|
||||
{ "MunifTanjim/nui.nvim" },
|
||||
},
|
||||
event = "CmdlineEnter",
|
||||
opts = {
|
||||
messages = {
|
||||
enabled = false,
|
||||
},
|
||||
notify = {
|
||||
enabled = false,
|
||||
},
|
||||
lsp = {
|
||||
progress = {
|
||||
enabled = false,
|
||||
},
|
||||
hover = {
|
||||
enabled = false,
|
||||
},
|
||||
signature = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
presets = {
|
||||
-- Preset ini menyesuaikan bentuk cursor pada mode commond
|
||||
command_bar_cursor = {
|
||||
enabled = true,
|
||||
cursor_shape = "ver30", -- "ver" menandakan bar vertikal, 30 adalah tinggi dalam persen
|
||||
},
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<S-Enter>",
|
||||
function()
|
||||
require("noice").redirect(vim.fn.getcmdline())
|
||||
end,
|
||||
mode = "c",
|
||||
desc = "Redirect Cmdline",
|
||||
},
|
||||
{
|
||||
"<leader>snl",
|
||||
function()
|
||||
require("noice").cmd("last")
|
||||
end,
|
||||
desc = "Noice Last Message",
|
||||
},
|
||||
{
|
||||
"<leader>snh",
|
||||
function()
|
||||
require("noice").cmd("history")
|
||||
end,
|
||||
desc = "Noice History",
|
||||
},
|
||||
{
|
||||
"<leader>sna",
|
||||
function()
|
||||
require("noice").cmd("all")
|
||||
end,
|
||||
desc = "Noice All",
|
||||
},
|
||||
{
|
||||
"<c-f>",
|
||||
function()
|
||||
if not require("noice.lsp").scroll(4) then
|
||||
return "<c-f>"
|
||||
end
|
||||
end,
|
||||
silent = true,
|
||||
expr = true,
|
||||
desc = "Scroll forward",
|
||||
mode = { "i", "n", "s" },
|
||||
},
|
||||
{
|
||||
"<c-b>",
|
||||
function()
|
||||
if not require("noice.lsp").scroll(-4) then
|
||||
return "<c-b>"
|
||||
end
|
||||
end,
|
||||
silent = true,
|
||||
expr = true,
|
||||
desc = "Scroll backward",
|
||||
mode = { "i", "n", "s" },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"hrsh7th/cmp-cmdline",
|
||||
event = "VeryLazy",
|
||||
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 `/`.
|
||||
cmp.setup.cmdline("/", {
|
||||
preselect = "none",
|
||||
completion = {
|
||||
completeopt = "menu,preview,menuone,noselect",
|
||||
},
|
||||
mapping = mapping,
|
||||
sources = {
|
||||
{ name = "buffer" },
|
||||
},
|
||||
experimental = {
|
||||
ghost_text = true,
|
||||
native_menu = false,
|
||||
},
|
||||
})
|
||||
-- Use buffer source for `/`.
|
||||
cmp.setup.cmdline("/", {
|
||||
preselect = "none",
|
||||
completion = {
|
||||
completeopt = "menu,preview,menuone,noselect",
|
||||
},
|
||||
mapping = mapping,
|
||||
sources = {
|
||||
{ name = "buffer" },
|
||||
},
|
||||
experimental = {
|
||||
ghost_text = true,
|
||||
native_menu = false,
|
||||
},
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':'.
|
||||
cmp.setup.cmdline(":", {
|
||||
preselect = "none",
|
||||
completion = {
|
||||
completeopt = "menu,preview,menuone,noselect",
|
||||
},
|
||||
mapping = mapping,
|
||||
sources = cmp.config.sources({
|
||||
{ name = "path" },
|
||||
}, {
|
||||
{ name = "cmdline" },
|
||||
}),
|
||||
experimental = {
|
||||
ghost_text = true,
|
||||
native_menu = false,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
-- Use cmdline & path source for ':'.
|
||||
cmp.setup.cmdline(":", {
|
||||
preselect = "none",
|
||||
completion = {
|
||||
completeopt = "menu,preview,menuone,noselect",
|
||||
},
|
||||
mapping = mapping,
|
||||
sources = cmp.config.sources({
|
||||
{ name = "path" },
|
||||
}, {
|
||||
{ name = "cmdline" },
|
||||
}),
|
||||
experimental = {
|
||||
ghost_text = true,
|
||||
native_menu = false,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,53 +1,49 @@
|
|||
return {
|
||||
"okuuva/auto-save.nvim",
|
||||
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
|
||||
event = { "InsertLeave", "TextChanged" }, -- optional for lazy loading on trigger events
|
||||
opts = {
|
||||
enabled = true, -- start auto-save when the plugin is loaded (i.e. when your package manager loads it)
|
||||
trigger_events = { -- See :h events
|
||||
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`)
|
||||
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
|
||||
-- return true: if buffer is ok to be saved
|
||||
-- return false: if it's not ok to be saved
|
||||
-- if set to `nil` then no specific condition is applied
|
||||
condition = nil,
|
||||
write_all_buffers = false, -- write all buffers when the current one meets `condition`
|
||||
noautocmd = false, -- do not execute autocmds when saving
|
||||
lockmarks = false, -- lock marks when saving, see `:h lockmarks` for more details
|
||||
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
|
||||
debug = false,
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("auto-save").setup(opts)
|
||||
local group = vim.api.nvim_create_augroup("autosave", {})
|
||||
"okuuva/auto-save.nvim",
|
||||
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
|
||||
event = { "InsertLeave", "TextChanged" }, -- optional for lazy loading on trigger events
|
||||
opts = {
|
||||
enabled = true, -- start auto-save when the plugin is loaded (i.e. when your package manager loads it)
|
||||
trigger_events = { -- See :h events
|
||||
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`)
|
||||
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
|
||||
-- return true: if buffer is ok to be saved
|
||||
-- return false: if it's not ok to be saved
|
||||
-- if set to `nil` then no specific condition is applied
|
||||
condition = nil,
|
||||
write_all_buffers = false, -- write all buffers when the current one meets `condition`
|
||||
noautocmd = false, -- do not execute autocmds when saving
|
||||
lockmarks = false, -- lock marks when saving, see `:h lockmarks` for more details
|
||||
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
|
||||
debug = false,
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("auto-save").setup(opts)
|
||||
local group = vim.api.nvim_create_augroup("autosave", {})
|
||||
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "AutoSaveWritePost",
|
||||
group = group,
|
||||
callback = function(opts)
|
||||
local ftype = vim.bo.filetype
|
||||
if
|
||||
opts.data.saved_buffer ~= nil
|
||||
and ftype ~= "TelescopePrompt"
|
||||
and not substring(tostring(ftype), "dap")
|
||||
then
|
||||
local filename = vim.api.nvim_buf_get_name(opts.data.saved_buffer)
|
||||
local is_ok = pcall(require, "notify")
|
||||
if is_ok then
|
||||
require("notify")("AutoSave: saved at " .. vim.fn.strftime("%H:%M:%S"))
|
||||
else
|
||||
print("AutoSave: saved " .. filename .. " at " .. vim.fn.strftime("%H:%M:%S"))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>n", ":ASToggle<CR>", desc = " Toggle auto-save" },
|
||||
},
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "AutoSaveWritePost",
|
||||
group = group,
|
||||
callback = function(opts)
|
||||
local ftype = vim.bo.filetype
|
||||
if opts.data.saved_buffer ~= nil and ftype ~= "TelescopePrompt" and not substring(tostring(ftype), "dap") then
|
||||
local filename = vim.api.nvim_buf_get_name(opts.data.saved_buffer)
|
||||
local is_ok = pcall(require, "notify")
|
||||
if is_ok then
|
||||
require("notify")("AutoSave: saved at " .. vim.fn.strftime("%H:%M:%S"))
|
||||
else
|
||||
print("AutoSave: saved " .. filename .. " at " .. vim.fn.strftime("%H:%M:%S"))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>n", ":ASToggle<CR>", desc = " Toggle auto-save" },
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
return {
|
||||
"LunarVim/bigfile.nvim",
|
||||
lazy = true,
|
||||
event = "BufReadPre",
|
||||
opts = {
|
||||
file_size = 2,
|
||||
},
|
||||
"LunarVim/bigfile.nvim",
|
||||
lazy = true,
|
||||
event = "BufReadPre",
|
||||
opts = {
|
||||
file_size = 2,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
return {
|
||||
-- codeium cmp source
|
||||
{
|
||||
"nvim-cmp",
|
||||
dependencies = {
|
||||
-- codeium
|
||||
{
|
||||
"Exafunction/codeium.nvim",
|
||||
cmd = "Codeium",
|
||||
enabled = false,
|
||||
build = ":Codeium Auth",
|
||||
opts = {
|
||||
enable_chat = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
--@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sources, 1, {
|
||||
name = "codeium",
|
||||
group_index = 1,
|
||||
priority = 100,
|
||||
})
|
||||
end,
|
||||
},
|
||||
-- codeium cmp source
|
||||
{
|
||||
"nvim-cmp",
|
||||
dependencies = {
|
||||
-- codeium
|
||||
{
|
||||
"Exafunction/codeium.nvim",
|
||||
cmd = "Codeium",
|
||||
enabled = false,
|
||||
build = ":Codeium Auth",
|
||||
opts = {
|
||||
enable_chat = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
--@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sources, 1, {
|
||||
name = "codeium",
|
||||
group_index = 1,
|
||||
priority = 100,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
return {
|
||||
"NvChad/nvim-colorizer.lua",
|
||||
lazy = true,
|
||||
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
||||
opts = {
|
||||
user_default_options = {
|
||||
RGB = true, -- #RGB hex codes
|
||||
RRGGBB = true, -- #RRGGBB hex codes
|
||||
names = true, -- "Name" codes like Blue
|
||||
RRGGBBAA = true, -- #RRGGBBAA hex codes
|
||||
rgb_fn = true, -- CSS rgb() and rgba() functions
|
||||
hsl_fn = true, -- CSS hsl() and hsla() functions
|
||||
css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
|
||||
css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn
|
||||
-- Available modes: foreground, background
|
||||
mode = "background", -- Set the display mode.
|
||||
tailwind = true,
|
||||
},
|
||||
filetypes = {
|
||||
"*", -- Highlight all files, but customize some others.
|
||||
css = { rgb_fn = true }, -- Enable parsing rgb(...) functions in css.
|
||||
html = { names = false }, -- Disable parsing "names" like Blue or Gray
|
||||
},
|
||||
},
|
||||
"NvChad/nvim-colorizer.lua",
|
||||
lazy = true,
|
||||
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
||||
opts = {
|
||||
user_default_options = {
|
||||
RGB = true, -- #RGB hex codes
|
||||
RRGGBB = true, -- #RRGGBB hex codes
|
||||
names = true, -- "Name" codes like Blue
|
||||
RRGGBBAA = true, -- #RRGGBBAA hex codes
|
||||
rgb_fn = true, -- CSS rgb() and rgba() functions
|
||||
hsl_fn = true, -- CSS hsl() and hsla() functions
|
||||
css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
|
||||
css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn
|
||||
-- Available modes: foreground, background
|
||||
mode = "background", -- Set the display mode.
|
||||
tailwind = true,
|
||||
},
|
||||
filetypes = {
|
||||
"*", -- Highlight all files, but customize some others.
|
||||
css = { rgb_fn = true }, -- Enable parsing rgb(...) functions in css.
|
||||
html = { names = false }, -- Disable parsing "names" like Blue or Gray
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,62 +1,62 @@
|
|||
return {
|
||||
{
|
||||
"rcarriga/nvim-dap-ui",
|
||||
lazy = true,
|
||||
event = "BufRead",
|
||||
dependencies = {
|
||||
{ "mfussenegger/nvim-dap", lazy = true },
|
||||
{ "nvim-neotest/nvim-nio", lazy = true },
|
||||
{
|
||||
"theHamsta/nvim-dap-virtual-text",
|
||||
opts = {
|
||||
virt_text_win_col = 80,
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("pcode.user.dapui")
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>d", "", desc = " Debug" },
|
||||
{ "<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>dc", "<cmd>lua require'dap'.continue()<cr>", desc = "Continue" },
|
||||
{ "<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>dg", "<cmd>lua require'dap'.session()<cr>", desc = "Get Session" },
|
||||
{ "<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>du", "<cmd>lua require'dap'.step_out()<cr>", desc = "Step Out" },
|
||||
{ "<leader>dp", "<cmd>lua require'dap'.pause()<cr>", desc = "Pause" },
|
||||
{ "<leader>dr", "<cmd>lua require'dap'.repl.toggle()<cr>", desc = "Toggle Repl" },
|
||||
{ "<leader>ds", "<cmd>lua require'dap'.continue()<cr>", desc = "Start" },
|
||||
{ "<leader>dq", "<cmd>lua require'dap'.close()<cr>", desc = "Quit" },
|
||||
{ "<leader>dU", "<cmd>lua require'dapui'.toggle({reset = true})<cr>", desc = "Toggle UI" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"jay-babu/mason-nvim-dap.nvim",
|
||||
lazy = true,
|
||||
event = "BufRead",
|
||||
dependencies = { "williamboman/mason.nvim", "mfussenegger/nvim-dap" },
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, {})
|
||||
opts.automatic_setup = true
|
||||
opts.handlers = {
|
||||
function(config)
|
||||
-- all sources with no handler get passed here
|
||||
{
|
||||
"rcarriga/nvim-dap-ui",
|
||||
lazy = true,
|
||||
event = "BufRead",
|
||||
dependencies = {
|
||||
{ "mfussenegger/nvim-dap", lazy = true },
|
||||
{ "nvim-neotest/nvim-nio", lazy = true },
|
||||
{
|
||||
"theHamsta/nvim-dap-virtual-text",
|
||||
opts = {
|
||||
virt_text_win_col = 80,
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("pcode.user.dapui")
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>d", "", desc = " Debug" },
|
||||
{ "<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>dc", "<cmd>lua require'dap'.continue()<cr>", desc = "Continue" },
|
||||
{ "<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>dg", "<cmd>lua require'dap'.session()<cr>", desc = "Get Session" },
|
||||
{ "<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>du", "<cmd>lua require'dap'.step_out()<cr>", desc = "Step Out" },
|
||||
{ "<leader>dp", "<cmd>lua require'dap'.pause()<cr>", desc = "Pause" },
|
||||
{ "<leader>dr", "<cmd>lua require'dap'.repl.toggle()<cr>", desc = "Toggle Repl" },
|
||||
{ "<leader>ds", "<cmd>lua require'dap'.continue()<cr>", desc = "Start" },
|
||||
{ "<leader>dq", "<cmd>lua require'dap'.close()<cr>", desc = "Quit" },
|
||||
{ "<leader>dU", "<cmd>lua require'dapui'.toggle({reset = true})<cr>", desc = "Toggle UI" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"jay-babu/mason-nvim-dap.nvim",
|
||||
lazy = true,
|
||||
event = "BufRead",
|
||||
dependencies = { "williamboman/mason.nvim", "mfussenegger/nvim-dap" },
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, {})
|
||||
opts.automatic_setup = true
|
||||
opts.handlers = {
|
||||
function(config)
|
||||
-- all sources with no handler get passed here
|
||||
|
||||
-- Keep original functionality
|
||||
require("mason-nvim-dap").default_setup(config)
|
||||
end,
|
||||
}
|
||||
return opts
|
||||
end,
|
||||
-- enabled = vim.fn.has("win32") == 0,
|
||||
config = function(_, opts)
|
||||
require("mason").setup()
|
||||
require("mason-nvim-dap").setup(opts)
|
||||
end,
|
||||
},
|
||||
-- Keep original functionality
|
||||
require("mason-nvim-dap").default_setup(config)
|
||||
end,
|
||||
}
|
||||
return opts
|
||||
end,
|
||||
-- enabled = vim.fn.has("win32") == 0,
|
||||
config = function(_, opts)
|
||||
require("mason").setup()
|
||||
require("mason-nvim-dap").setup(opts)
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
return {
|
||||
"rachartier/tiny-devicons-auto-colors.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("tiny-devicons-auto-colors").setup()
|
||||
end,
|
||||
"rachartier/tiny-devicons-auto-colors.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("tiny-devicons-auto-colors").setup()
|
||||
end,
|
||||
}
|
||||
|
|
|
@ -1,36 +1,65 @@
|
|||
local M = {
|
||||
"RRethy/vim-illuminate",
|
||||
event = "VeryLazy",
|
||||
"RRethy/vim-illuminate",
|
||||
event = "VeryLazy",
|
||||
}
|
||||
|
||||
function M.config()
|
||||
require("illuminate").configure({
|
||||
filetypes_denylist = {
|
||||
"mason",
|
||||
"harpoon",
|
||||
"DressingInput",
|
||||
"NeogitCommitMessage",
|
||||
"qf",
|
||||
"dirvish",
|
||||
"oil",
|
||||
"minifiles",
|
||||
"fugitive",
|
||||
"alpha",
|
||||
"NvimTree",
|
||||
"lazy",
|
||||
"NeogitStatus",
|
||||
"Trouble",
|
||||
"netrw",
|
||||
"lir",
|
||||
"DiffviewFiles",
|
||||
"Outline",
|
||||
"Jaq",
|
||||
"spectre_panel",
|
||||
"toggleterm",
|
||||
"DressingSelect",
|
||||
"TelescopePrompt",
|
||||
},
|
||||
})
|
||||
M.opts = {
|
||||
delay = 200,
|
||||
large_file_cutoff = 2000,
|
||||
large_file_overrides = {
|
||||
providers = { "lsp" },
|
||||
},
|
||||
filetypes_denylist = {
|
||||
"mason",
|
||||
"harpoon",
|
||||
"DressingInput",
|
||||
"NeogitCommitMessage",
|
||||
"qf",
|
||||
"dirvish",
|
||||
"oil",
|
||||
"minifiles",
|
||||
"fugitive",
|
||||
"alpha",
|
||||
"NvimTree",
|
||||
"lazy",
|
||||
"NeogitStatus",
|
||||
"Trouble",
|
||||
"netrw",
|
||||
"lir",
|
||||
"DiffviewFiles",
|
||||
"Outline",
|
||||
"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
|
||||
|
||||
M.keys = {
|
||||
{ "]]", desc = "Next Reference" },
|
||||
{ "[[", desc = "Prev Reference" },
|
||||
}
|
||||
|
||||
return M
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
local icons = require("pcode.user.icons")
|
||||
return {
|
||||
"echasnovski/mini.indentscope",
|
||||
version = false, -- wait till new 0.7.0 release to put it back on semver
|
||||
event = "BufReadPre",
|
||||
opts = {
|
||||
symbol = icons.ui.LineMiddle,
|
||||
options = { try_as_border = true },
|
||||
},
|
||||
init = function()
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = {
|
||||
"alpha",
|
||||
"dashboard",
|
||||
"fzf",
|
||||
"help",
|
||||
"lazy",
|
||||
"lazyterm",
|
||||
"mason",
|
||||
"neo-tree",
|
||||
"NvimTree",
|
||||
"notify",
|
||||
"toggleterm",
|
||||
"Trouble",
|
||||
"trouble",
|
||||
},
|
||||
callback = function()
|
||||
vim.b.miniindentscope_disable = true
|
||||
end,
|
||||
})
|
||||
end,
|
||||
"echasnovski/mini.indentscope",
|
||||
version = false, -- wait till new 0.7.0 release to put it back on semver
|
||||
event = "BufReadPre",
|
||||
opts = {
|
||||
symbol = icons.ui.LineMiddle,
|
||||
options = { try_as_border = true },
|
||||
},
|
||||
init = function()
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = {
|
||||
"alpha",
|
||||
"dashboard",
|
||||
"fzf",
|
||||
"help",
|
||||
"lazy",
|
||||
"lazyterm",
|
||||
"mason",
|
||||
"neo-tree",
|
||||
"NvimTree",
|
||||
"notify",
|
||||
"toggleterm",
|
||||
"Trouble",
|
||||
"trouble",
|
||||
},
|
||||
callback = function()
|
||||
vim.b.miniindentscope_disable = true
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
return {
|
||||
"barrett-ruth/live-server.nvim",
|
||||
build = "npm i -g live-server",
|
||||
cmd = { "LiveServerStart", "LiveServerStop", "LiveServerToggle" },
|
||||
config = true,
|
||||
keys = {
|
||||
-- open http://localhost:5555/ jika menggunakan wsl
|
||||
{ "<leader>rl", "<cmd>LiveServerToggle<cr>", desc = "LiveServer" },
|
||||
},
|
||||
"barrett-ruth/live-server.nvim",
|
||||
build = "npm i -g live-server",
|
||||
cmd = { "LiveServerStart", "LiveServerStop", "LiveServerToggle" },
|
||||
config = true,
|
||||
keys = {
|
||||
-- open http://localhost:5555/ jika menggunakan wsl
|
||||
{ "<leader>rl", "<cmd>LiveServerToggle<cr>", desc = "LiveServer" },
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,40 +1,40 @@
|
|||
return {
|
||||
-- animations
|
||||
{
|
||||
"echasnovski/mini.animate",
|
||||
event = "BufRead",
|
||||
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
|
||||
-- animations
|
||||
{
|
||||
"echasnovski/mini.animate",
|
||||
event = "BufRead",
|
||||
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,
|
||||
}),
|
||||
},
|
||||
}
|
||||
end,
|
||||
config = function(_, opts)
|
||||
require("mini.animate").setup(opts)
|
||||
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,
|
||||
}),
|
||||
},
|
||||
}
|
||||
end,
|
||||
config = function(_, opts)
|
||||
require("mini.animate").setup(opts)
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,35 +1,35 @@
|
|||
local M = {
|
||||
"SmiteshP/nvim-navic",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"LunarVim/breadcrumbs.nvim",
|
||||
opts = {},
|
||||
config = true,
|
||||
},
|
||||
"SmiteshP/nvim-navic",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"LunarVim/breadcrumbs.nvim",
|
||||
opts = {},
|
||||
config = true,
|
||||
},
|
||||
}
|
||||
|
||||
function M.config()
|
||||
local icons = require("pcode.user.icons").kind
|
||||
for key, value in pairs(icons) do
|
||||
icons[key] = value .. " "
|
||||
end
|
||||
require("nvim-navic").setup({
|
||||
icons = icons,
|
||||
lsp = {
|
||||
auto_attach = false,
|
||||
preference = nil,
|
||||
},
|
||||
highlight = false,
|
||||
separator = " > ",
|
||||
depth_limit = 0,
|
||||
depth_limit_indicator = "..",
|
||||
safe_output = true,
|
||||
lazy_update_context = false,
|
||||
click = false,
|
||||
format_text = function(text)
|
||||
return text
|
||||
end,
|
||||
})
|
||||
local icons = require("pcode.user.icons").kind
|
||||
for key, value in pairs(icons) do
|
||||
icons[key] = value .. " "
|
||||
end
|
||||
require("nvim-navic").setup({
|
||||
icons = icons,
|
||||
lsp = {
|
||||
auto_attach = false,
|
||||
preference = nil,
|
||||
},
|
||||
highlight = false,
|
||||
separator = " > ",
|
||||
depth_limit = 0,
|
||||
depth_limit_indicator = "..",
|
||||
safe_output = true,
|
||||
lazy_update_context = false,
|
||||
click = false,
|
||||
format_text = function(text)
|
||||
return text
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
return {
|
||||
"karb94/neoscroll.nvim",
|
||||
event = "VeryLazy",
|
||||
lazy = true,
|
||||
config = function()
|
||||
require("neoscroll").setup({})
|
||||
end,
|
||||
"karb94/neoscroll.nvim",
|
||||
event = "VeryLazy",
|
||||
lazy = true,
|
||||
config = function()
|
||||
require("neoscroll").setup({})
|
||||
end,
|
||||
}
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
return {
|
||||
{
|
||||
"nvchad/menu",
|
||||
lazy = true,
|
||||
event = { "VeryLazy" },
|
||||
dependencies = {
|
||||
{ "nvchad/volt", lazy = true },
|
||||
{
|
||||
"nvchad/minty",
|
||||
cmd = { "Shades", "Huefy" },
|
||||
lazy = true,
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
mouse = true,
|
||||
border = true,
|
||||
},
|
||||
config = function(_, opts)
|
||||
-- Keyboard users
|
||||
vim.keymap.set("n", "<C-t>", function()
|
||||
require("menu").open("default")
|
||||
end, {})
|
||||
{
|
||||
"nvchad/menu",
|
||||
lazy = true,
|
||||
event = { "VeryLazy" },
|
||||
dependencies = {
|
||||
{ "nvchad/volt", lazy = true },
|
||||
{
|
||||
"nvchad/minty",
|
||||
cmd = { "Shades", "Huefy" },
|
||||
lazy = true,
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
mouse = true,
|
||||
border = true,
|
||||
},
|
||||
config = function(_, opts)
|
||||
-- Keyboard users
|
||||
vim.keymap.set("n", "<C-t>", function()
|
||||
require("menu").open("default")
|
||||
end, {})
|
||||
|
||||
-- mouse users + nvimtree users!
|
||||
vim.keymap.set("n", "<RightMouse>", function()
|
||||
vim.cmd.exec('"normal! \\<RightMouse>"')
|
||||
-- mouse users + nvimtree users!
|
||||
vim.keymap.set("n", "<RightMouse>", function()
|
||||
vim.cmd.exec('"normal! \\<RightMouse>"')
|
||||
|
||||
local options = vim.bo.ft == "NvimTree" and "nvimtree" or "default"
|
||||
require("menu").open(options, opts)
|
||||
end, {})
|
||||
end,
|
||||
},
|
||||
local options = vim.bo.ft == "NvimTree" and "nvimtree" or "default"
|
||||
require("menu").open(options, opts)
|
||||
end, {})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,107 +1,107 @@
|
|||
local M = { "kevinhwang91/nvim-ufo" }
|
||||
M.event = "VeryLazy"
|
||||
M.dependencies = {
|
||||
"kevinhwang91/promise-async",
|
||||
"luukvbaal/statuscol.nvim",
|
||||
"kevinhwang91/promise-async",
|
||||
"luukvbaal/statuscol.nvim",
|
||||
}
|
||||
M.config = function()
|
||||
local builtin = require("statuscol.builtin")
|
||||
local cfg = {
|
||||
setopt = true,
|
||||
relculright = true,
|
||||
segments = {
|
||||
local builtin = require("statuscol.builtin")
|
||||
local cfg = {
|
||||
setopt = true,
|
||||
relculright = true,
|
||||
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 = { builtin.lnumfunc, " " }, click = "v:lua.ScLa" },
|
||||
},
|
||||
}
|
||||
{ text = { "%s" }, click = "v:lua.ScSa" },
|
||||
{ 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.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
|
||||
vim.o.foldlevelstart = 99
|
||||
vim.o.foldenable = true
|
||||
vim.o.fillchars = [[eob: ,fold: ,foldopen:▾,foldsep: ,foldclose:▸]]
|
||||
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.foldlevelstart = 99
|
||||
vim.o.foldenable = true
|
||||
vim.o.fillchars = [[eob: ,fold: ,foldopen:▾,foldsep: ,foldclose:▸]]
|
||||
|
||||
-- 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", "zM", require("ufo").closeAllFolds)
|
||||
-- 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", "zM", require("ufo").closeAllFolds)
|
||||
|
||||
local handler = function(virtText, lnum, endLnum, width, truncate)
|
||||
local newVirtText = {}
|
||||
local suffix = (" %d "):format(endLnum - lnum)
|
||||
local sufWidth = vim.fn.strdisplaywidth(suffix)
|
||||
local targetWidth = width - sufWidth
|
||||
local curWidth = 0
|
||||
for _, chunk in ipairs(virtText) do
|
||||
local chunkText = chunk[1]
|
||||
local chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
||||
if targetWidth > curWidth + chunkWidth then
|
||||
table.insert(newVirtText, chunk)
|
||||
else
|
||||
chunkText = truncate(chunkText, targetWidth - curWidth)
|
||||
local hlGroup = chunk[2]
|
||||
table.insert(newVirtText, { chunkText, hlGroup })
|
||||
chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
||||
-- str width returned from truncate() may less than 2nd argument, need padding
|
||||
if curWidth + chunkWidth < targetWidth then
|
||||
suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth)
|
||||
end
|
||||
break
|
||||
end
|
||||
curWidth = curWidth + chunkWidth
|
||||
end
|
||||
table.insert(newVirtText, { suffix, "MoreMsg" })
|
||||
return newVirtText
|
||||
end
|
||||
local handler = function(virtText, lnum, endLnum, width, truncate)
|
||||
local newVirtText = {}
|
||||
local suffix = (" %d "):format(endLnum - lnum)
|
||||
local sufWidth = vim.fn.strdisplaywidth(suffix)
|
||||
local targetWidth = width - sufWidth
|
||||
local curWidth = 0
|
||||
for _, chunk in ipairs(virtText) do
|
||||
local chunkText = chunk[1]
|
||||
local chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
||||
if targetWidth > curWidth + chunkWidth then
|
||||
table.insert(newVirtText, chunk)
|
||||
else
|
||||
chunkText = truncate(chunkText, targetWidth - curWidth)
|
||||
local hlGroup = chunk[2]
|
||||
table.insert(newVirtText, { chunkText, hlGroup })
|
||||
chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
||||
-- str width returned from truncate() may less than 2nd argument, need padding
|
||||
if curWidth + chunkWidth < targetWidth then
|
||||
suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth)
|
||||
end
|
||||
break
|
||||
end
|
||||
curWidth = curWidth + chunkWidth
|
||||
end
|
||||
table.insert(newVirtText, { suffix, "MoreMsg" })
|
||||
return newVirtText
|
||||
end
|
||||
|
||||
local ftMap = {
|
||||
-- typescriptreact = { "lsp", "treesitter" },
|
||||
-- python = { "indent" },
|
||||
-- git = "",
|
||||
}
|
||||
local ftMap = {
|
||||
-- typescriptreact = { "lsp", "treesitter" },
|
||||
-- python = { "indent" },
|
||||
-- git = "",
|
||||
}
|
||||
|
||||
require("ufo").setup({
|
||||
fold_virt_text_handler = handler,
|
||||
close_fold_kinds = {},
|
||||
-- close_fold_kinds = { "imports", "comment" },
|
||||
provider_selector = function(bufnr, filetype, buftype)
|
||||
-- if you prefer treesitter provider rather than lsp,
|
||||
-- return ftMap[filetype] or {'treesitter', 'indent'}
|
||||
return ftMap[filetype]
|
||||
-- return { "treesitter", "indent" }
|
||||
require("ufo").setup({
|
||||
fold_virt_text_handler = handler,
|
||||
close_fold_kinds = {},
|
||||
-- close_fold_kinds = { "imports", "comment" },
|
||||
provider_selector = function(bufnr, filetype, buftype)
|
||||
-- if you prefer treesitter provider rather than lsp,
|
||||
-- return ftMap[filetype] or {'treesitter', 'indent'}
|
||||
return ftMap[filetype]
|
||||
-- return { "treesitter", "indent" }
|
||||
|
||||
-- refer to ./doc/example.lua for detail
|
||||
end,
|
||||
-- refer to ./doc/example.lua for detail
|
||||
end,
|
||||
|
||||
preview = {
|
||||
win_config = {
|
||||
border = { "", "─", "", "", "", "─", "", "" },
|
||||
winhighlight = "Normal:Folded",
|
||||
winblend = 0,
|
||||
},
|
||||
mappings = {
|
||||
scrollU = "<C-k>",
|
||||
scrollD = "<C-j>",
|
||||
jumpTop = "[",
|
||||
jumpBot = "]",
|
||||
},
|
||||
},
|
||||
})
|
||||
preview = {
|
||||
win_config = {
|
||||
border = { "", "─", "", "", "", "─", "", "" },
|
||||
winhighlight = "Normal:Folded",
|
||||
winblend = 0,
|
||||
},
|
||||
mappings = {
|
||||
scrollU = "<C-k>",
|
||||
scrollD = "<C-j>",
|
||||
jumpTop = "[",
|
||||
jumpBot = "]",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "zR", require("ufo").openAllFolds)
|
||||
vim.keymap.set("n", "zM", require("ufo").closeAllFolds)
|
||||
vim.keymap.set("n", "zr", require("ufo").openFoldsExceptKinds)
|
||||
vim.keymap.set("n", "zm", require("ufo").closeFoldsWith) -- closeAllFolds == closeFoldsWith(0)
|
||||
vim.keymap.set("n", "K", function()
|
||||
local winid = require("ufo").peekFoldedLinesUnderCursor()
|
||||
if not winid then
|
||||
vim.lsp.buf.hover()
|
||||
end
|
||||
end)
|
||||
vim.keymap.set("n", "zR", require("ufo").openAllFolds)
|
||||
vim.keymap.set("n", "zM", require("ufo").closeAllFolds)
|
||||
vim.keymap.set("n", "zr", require("ufo").openFoldsExceptKinds)
|
||||
vim.keymap.set("n", "zm", require("ufo").closeFoldsWith) -- closeAllFolds == closeFoldsWith(0)
|
||||
vim.keymap.set("n", "K", function()
|
||||
local winid = require("ufo").peekFoldedLinesUnderCursor()
|
||||
if not winid then
|
||||
vim.lsp.buf.hover()
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
@ -1,36 +1,36 @@
|
|||
return {
|
||||
"hiphish/rainbow-delimiters.nvim",
|
||||
lazy = true,
|
||||
event = "BufRead",
|
||||
config = function()
|
||||
-- Modul ini berisi beberapa definisi default
|
||||
local rainbow_delimiters = require("rainbow-delimiters")
|
||||
vim.g.rainbow_delimiters = {
|
||||
strategy = {
|
||||
[""] = rainbow_delimiters.strategy["global"],
|
||||
vim = rainbow_delimiters.strategy["local"],
|
||||
},
|
||||
query = {
|
||||
[""] = "rainbow-delimiters",
|
||||
-- lua = "rainbow-blocks",
|
||||
},
|
||||
priority = {
|
||||
[""] = 110,
|
||||
lua = 210,
|
||||
},
|
||||
highlight = {
|
||||
"RainbowDelimiterRed",
|
||||
"RainbowDelimiterYellow",
|
||||
"RainbowDelimiterBlue",
|
||||
"RainbowDelimiterOrange",
|
||||
"RainbowDelimiterGreen",
|
||||
"RainbowDelimiterViolet",
|
||||
"RainbowDelimiterCyan",
|
||||
},
|
||||
blacklist = {
|
||||
"html",
|
||||
"tsx",
|
||||
},
|
||||
}
|
||||
end,
|
||||
"hiphish/rainbow-delimiters.nvim",
|
||||
lazy = true,
|
||||
event = "BufRead",
|
||||
config = function()
|
||||
-- Modul ini berisi beberapa definisi default
|
||||
local rainbow_delimiters = require("rainbow-delimiters")
|
||||
vim.g.rainbow_delimiters = {
|
||||
strategy = {
|
||||
[""] = rainbow_delimiters.strategy["global"],
|
||||
vim = rainbow_delimiters.strategy["local"],
|
||||
},
|
||||
query = {
|
||||
[""] = "rainbow-delimiters",
|
||||
-- lua = "rainbow-blocks",
|
||||
},
|
||||
priority = {
|
||||
[""] = 110,
|
||||
lua = 210,
|
||||
},
|
||||
highlight = {
|
||||
"RainbowDelimiterRed",
|
||||
"RainbowDelimiterYellow",
|
||||
"RainbowDelimiterBlue",
|
||||
"RainbowDelimiterOrange",
|
||||
"RainbowDelimiterGreen",
|
||||
"RainbowDelimiterViolet",
|
||||
"RainbowDelimiterCyan",
|
||||
},
|
||||
blacklist = {
|
||||
"html",
|
||||
"tsx",
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
return {
|
||||
-- Incremental rename
|
||||
{
|
||||
"smjonas/inc-rename.nvim",
|
||||
cmd = "IncRename",
|
||||
-- Incremental rename
|
||||
{
|
||||
"smjonas/inc-rename.nvim",
|
||||
cmd = "IncRename",
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{"<leader>u","",desc=" Edit"},
|
||||
|
@ -17,27 +17,33 @@ return {
|
|||
expr = true,
|
||||
},
|
||||
},
|
||||
config = true,
|
||||
},
|
||||
|
||||
-- Refactoring tool
|
||||
{
|
||||
"ThePrimeagen/refactoring.nvim",
|
||||
keys = {
|
||||
{
|
||||
"<leader>r",
|
||||
function()
|
||||
require("refactoring").select_refactor({
|
||||
show_success_message = true,
|
||||
})
|
||||
end,
|
||||
mode = "v",
|
||||
noremap = true,
|
||||
silent = true,
|
||||
expr = false,
|
||||
desc = " Refactoring",
|
||||
},
|
||||
},
|
||||
opts = {},
|
||||
},
|
||||
config = true,
|
||||
},
|
||||
{
|
||||
"folke/noice.nvim",
|
||||
optional = true,
|
||||
opts = {
|
||||
presets = { inc_rename = true },
|
||||
},
|
||||
},
|
||||
-- Refactoring tool
|
||||
{
|
||||
"ThePrimeagen/refactoring.nvim",
|
||||
keys = {
|
||||
{
|
||||
"<leader>r",
|
||||
function()
|
||||
require("refactoring").select_refactor({
|
||||
show_success_message = true,
|
||||
})
|
||||
end,
|
||||
mode = "v",
|
||||
noremap = true,
|
||||
silent = true,
|
||||
expr = false,
|
||||
desc = " Refactoring",
|
||||
},
|
||||
},
|
||||
opts = {},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
vim.filetype.add({
|
||||
extension = {
|
||||
["http"] = "http",
|
||||
},
|
||||
extension = {
|
||||
["http"] = "http",
|
||||
},
|
||||
})
|
||||
return {
|
||||
{
|
||||
"mistweaverco/kulala.nvim",
|
||||
ft = "http",
|
||||
keys = {
|
||||
{ "<leader>R", "", desc = " Rest" },
|
||||
{ "<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>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" },
|
||||
},
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, { "http", "graphql" })
|
||||
return opts
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mistweaverco/kulala.nvim",
|
||||
ft = "http",
|
||||
keys = {
|
||||
{ "<leader>R", "", desc = " Rest" },
|
||||
{ "<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>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" },
|
||||
},
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, { "http", "graphql" })
|
||||
return opts
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -5,42 +5,42 @@
|
|||
-- manual penggunaan
|
||||
-- https://www.jetbrains.com/help/idea/exploring-http-syntax.html
|
||||
return {
|
||||
"rest-nvim/rest.nvim",
|
||||
-- NOTE: Follow https://github.com/rest-nvim/rest.nvim/issues/306
|
||||
-- commit = "91badd46c60df6bd9800c809056af2d80d33da4c",
|
||||
event = "VeryLazy",
|
||||
enabled = vim.fn.executable("luarocks") == 1,
|
||||
dependencies = {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
vim.list_extend(opts.ensure_installed, { "http" })
|
||||
end,
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("rest-nvim").setup()
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "http", "httpResult" },
|
||||
callback = function()
|
||||
local opt = vim.opt
|
||||
opt.number = false -- Print line number
|
||||
opt.preserveindent = false -- Preserve indent structure as much as possible
|
||||
opt.relativenumber = false
|
||||
end,
|
||||
})
|
||||
end,
|
||||
ft = "http",
|
||||
keys = {
|
||||
{
|
||||
"<Leader>rh",
|
||||
"<cmd>Rest run<cr>",
|
||||
desc = "Run http request under cursor",
|
||||
},
|
||||
{
|
||||
"<Leader>rH",
|
||||
"<cmd>Rest last<cr>",
|
||||
desc = "Run last http request",
|
||||
},
|
||||
},
|
||||
"rest-nvim/rest.nvim",
|
||||
-- NOTE: Follow https://github.com/rest-nvim/rest.nvim/issues/306
|
||||
-- commit = "91badd46c60df6bd9800c809056af2d80d33da4c",
|
||||
event = "VeryLazy",
|
||||
enabled = vim.fn.executable("luarocks") == 1,
|
||||
dependencies = {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
vim.list_extend(opts.ensure_installed, { "http" })
|
||||
end,
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("rest-nvim").setup()
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "http", "httpResult" },
|
||||
callback = function()
|
||||
local opt = vim.opt
|
||||
opt.number = false -- Print line number
|
||||
opt.preserveindent = false -- Preserve indent structure as much as possible
|
||||
opt.relativenumber = false
|
||||
end,
|
||||
})
|
||||
end,
|
||||
ft = "http",
|
||||
keys = {
|
||||
{
|
||||
"<Leader>rh",
|
||||
"<cmd>Rest run<cr>",
|
||||
desc = "Run http request under cursor",
|
||||
},
|
||||
{
|
||||
"<Leader>rH",
|
||||
"<cmd>Rest last<cr>",
|
||||
desc = "Run last http request",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
return {
|
||||
"dstein64/nvim-scrollview",
|
||||
lazy = true,
|
||||
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
||||
opts = {
|
||||
bg = "LightCyan",
|
||||
ctermbg = 160,
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("scrollview").setup(opts)
|
||||
vim.g.scrollview_excluded_filetypes = { "NvimTree", "vista_kind", "Outline", "neo-tree" }
|
||||
end,
|
||||
"dstein64/nvim-scrollview",
|
||||
lazy = true,
|
||||
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
||||
opts = {
|
||||
bg = "LightCyan",
|
||||
ctermbg = 160,
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("scrollview").setup(opts)
|
||||
vim.g.scrollview_excluded_filetypes = { "NvimTree", "vista_kind", "Outline", "neo-tree" }
|
||||
end,
|
||||
}
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
return {
|
||||
"mrjones2014/smart-splits.nvim",
|
||||
lazy = true,
|
||||
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
||||
opts = {
|
||||
ignored_filetypes = {
|
||||
"nofile",
|
||||
"quickfix",
|
||||
"qf",
|
||||
"prompt",
|
||||
},
|
||||
ignored_buftypes = { "nofile" },
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("smart-splits").setup(opts)
|
||||
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-Up", require("smart-splits").resize_up)
|
||||
vim.keymap.set("n", "<C-Right>", require("smart-splits").resize_right)
|
||||
end,
|
||||
"mrjones2014/smart-splits.nvim",
|
||||
lazy = true,
|
||||
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
||||
opts = {
|
||||
ignored_filetypes = {
|
||||
"nofile",
|
||||
"quickfix",
|
||||
"qf",
|
||||
"prompt",
|
||||
},
|
||||
ignored_buftypes = { "nofile" },
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("smart-splits").setup(opts)
|
||||
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-Up", require("smart-splits").resize_up)
|
||||
vim.keymap.set("n", "<C-Right>", require("smart-splits").resize_right)
|
||||
end,
|
||||
}
|
||||
|
|
|
@ -1,64 +1,64 @@
|
|||
return {
|
||||
-- transparant config
|
||||
{
|
||||
"xiyaowong/transparent.nvim",
|
||||
lazy = true,
|
||||
event = "BufWinEnter",
|
||||
cmd = { "TransparentToggle", "TransparentEnable", "TransparentDisable" },
|
||||
config = function()
|
||||
require("transparent").setup({
|
||||
extra_groups = {
|
||||
"Normal",
|
||||
"NormalNC",
|
||||
"NormalFloat",
|
||||
"FloatBorder",
|
||||
"Comment",
|
||||
"Folded",
|
||||
"GitSignsAdd",
|
||||
"GitSignsDelete",
|
||||
"GitSignsChange",
|
||||
"FoldColumn",
|
||||
"WinBar",
|
||||
"WinBarNC",
|
||||
"NotifyBackground",
|
||||
},
|
||||
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")
|
||||
-- create auto command to set transparent
|
||||
vim.cmd("TransparentDisable")
|
||||
vim.cmd("TransparentEnable")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"rcarriga/nvim-notify",
|
||||
opts = function(_, opts)
|
||||
opts.background_colour = "#00000000"
|
||||
end,
|
||||
},
|
||||
-- transparant config
|
||||
{
|
||||
"xiyaowong/transparent.nvim",
|
||||
lazy = true,
|
||||
event = "BufWinEnter",
|
||||
cmd = { "TransparentToggle", "TransparentEnable", "TransparentDisable" },
|
||||
config = function()
|
||||
require("transparent").setup({
|
||||
extra_groups = {
|
||||
"Normal",
|
||||
"NormalNC",
|
||||
"NormalFloat",
|
||||
"FloatBorder",
|
||||
"Comment",
|
||||
"Folded",
|
||||
"GitSignsAdd",
|
||||
"GitSignsDelete",
|
||||
"GitSignsChange",
|
||||
"FoldColumn",
|
||||
"WinBar",
|
||||
"WinBarNC",
|
||||
"NotifyBackground",
|
||||
},
|
||||
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")
|
||||
-- create auto command to set transparent
|
||||
vim.cmd("TransparentDisable")
|
||||
vim.cmd("TransparentEnable")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"rcarriga/nvim-notify",
|
||||
opts = function(_, opts)
|
||||
opts.background_colour = "#00000000"
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
return {
|
||||
"nvim-treesitter/nvim-treesitter-context",
|
||||
lazy = true,
|
||||
event = { "BufRead", "VeryLazy" },
|
||||
opts = {},
|
||||
keys = {
|
||||
{ "<leader>T", "", desc = " TS Context" },
|
||||
{ "<leader>Tt", "<cmd>TSContextToggle<cr>", desc = "Toggle Context" },
|
||||
},
|
||||
"nvim-treesitter/nvim-treesitter-context",
|
||||
lazy = true,
|
||||
event = { "BufRead", "VeryLazy" },
|
||||
opts = {},
|
||||
keys = {
|
||||
{ "<leader>T", "", desc = " TS Context" },
|
||||
{ "<leader>Tt", "<cmd>TSContextToggle<cr>", desc = "Toggle Context" },
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
return {
|
||||
{
|
||||
"lukas-reineke/virt-column.nvim",
|
||||
event = "BufRead",
|
||||
opts = {},
|
||||
config = function()
|
||||
local icons = require("pcode.user.icons")
|
||||
require("virt-column").overwrite({
|
||||
exclude = {
|
||||
filetypes = { "help", "text", "markdown" },
|
||||
},
|
||||
char = icons.ui.LineMiddle,
|
||||
})
|
||||
-- Mengatur colum color max 80 caracter
|
||||
vim.api.nvim_create_autocmd("BufWinEnter", {
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
vim.opt.formatoptions = "croql"
|
||||
vim.opt.textwidth = 80
|
||||
vim.opt.colorcolumn = "+1"
|
||||
vim.opt.lazyredraw = false
|
||||
-- vim.cmd "hi ColorColumn guibg=#1B2430 ctermbg=246"
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"lukas-reineke/virt-column.nvim",
|
||||
event = "BufRead",
|
||||
opts = {},
|
||||
config = function()
|
||||
local icons = require("pcode.user.icons")
|
||||
require("virt-column").overwrite({
|
||||
exclude = {
|
||||
filetypes = { "help", "text", "markdown" },
|
||||
},
|
||||
char = icons.ui.LineMiddle,
|
||||
})
|
||||
-- Mengatur colum color max 80 caracter
|
||||
vim.api.nvim_create_autocmd("BufWinEnter", {
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
vim.opt.formatoptions = "croql"
|
||||
vim.opt.textwidth = 80
|
||||
vim.opt.colorcolumn = "+1"
|
||||
vim.opt.lazyredraw = false
|
||||
-- vim.cmd "hi ColorColumn guibg=#1B2430 ctermbg=246"
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
return {
|
||||
"mg979/vim-visual-multi",
|
||||
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
||||
branch = "master",
|
||||
lazy = true,
|
||||
init = function()
|
||||
vim.g.VM_mouse_mappings = 1 -- equal CTRL + Left Click on VSCODE
|
||||
vim.g.VM_maps = {
|
||||
["Find 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 Up"] = "<M-C-Up>", -- equal CTRL+ALT+UP on VSCODE
|
||||
["Undo"] = "u", -- undo
|
||||
["Redo"] = "<C-r>", -- redo
|
||||
}
|
||||
end,
|
||||
"mg979/vim-visual-multi",
|
||||
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
||||
branch = "master",
|
||||
lazy = true,
|
||||
init = function()
|
||||
vim.g.VM_mouse_mappings = 1 -- equal CTRL + Left Click on VSCODE
|
||||
vim.g.VM_maps = {
|
||||
["Find 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 Up"] = "<M-C-Up>", -- equal CTRL+ALT+UP on VSCODE
|
||||
["Undo"] = "u", -- undo
|
||||
["Redo"] = "<C-r>", -- redo
|
||||
}
|
||||
end,
|
||||
}
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
return {
|
||||
"gbprod/yanky.nvim",
|
||||
event = "BufReadPre",
|
||||
opts = {
|
||||
ring = {
|
||||
history_length = 50,
|
||||
storage = "memory",
|
||||
},
|
||||
preserve_cursor_position = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("yanky").setup(opts)
|
||||
-- cycle through the yank history, only work after paste
|
||||
vim.keymap.set("n", "[y", "<Plug>(YankyCycleForward)")
|
||||
vim.keymap.set("n", "]y", "<Plug>(YankyCycleBackward)")
|
||||
end,
|
||||
"gbprod/yanky.nvim",
|
||||
event = "BufReadPre",
|
||||
opts = {
|
||||
ring = {
|
||||
history_length = 50,
|
||||
storage = "memory",
|
||||
},
|
||||
preserve_cursor_position = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("yanky").setup(opts)
|
||||
-- cycle through the yank history, only work after paste
|
||||
vim.keymap.set("n", "[y", "<Plug>(YankyCycleForward)")
|
||||
vim.keymap.set("n", "]y", "<Plug>(YankyCycleBackward)")
|
||||
end,
|
||||
}
|
||||
|
|
|
@ -1,22 +1,21 @@
|
|||
return {
|
||||
"folke/zen-mode.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
plugins = {
|
||||
options = {
|
||||
-- hide statusline
|
||||
laststatus = 0,
|
||||
},
|
||||
},
|
||||
on_open = function(win)
|
||||
require("notify")("Zen Mode ON")
|
||||
end,
|
||||
on_close = function()
|
||||
require("notify")("Zen Mode OFF")
|
||||
end,
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>z", "<cmd>ZenMode<cr>", desc = " Toggle Zen Mode" },
|
||||
},
|
||||
"folke/zen-mode.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
plugins = {
|
||||
options = {
|
||||
-- hide statusline
|
||||
laststatus = 0,
|
||||
},
|
||||
},
|
||||
on_open = function(win)
|
||||
require("notify")("Zen Mode ON")
|
||||
end,
|
||||
on_close = function()
|
||||
require("notify")("Zen Mode OFF")
|
||||
end,
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>z", "<cmd>ZenMode<cr>", desc = " Toggle Zen Mode" },
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -1,129 +1,129 @@
|
|||
return {
|
||||
-- overidse dashboard
|
||||
{
|
||||
"goolord/alpha-nvim",
|
||||
opts = {
|
||||
dash_model = {
|
||||
[[ _ __ __ ]],
|
||||
[[ ___ ___ (____ / /__ _______ ___/ ___ ]],
|
||||
[[ / _ / _ \ / / _ \/ '_/ / __/ _ / _ / -_) ]],
|
||||
[[ / .__\_____/ /\___/_/\_\ \__/\___\_,_/\__/ ]],
|
||||
[[ /_/ |___/ ]],
|
||||
},
|
||||
},
|
||||
},
|
||||
-- overide lualine
|
||||
{
|
||||
"pojokcodeid/auto-lualine.nvim",
|
||||
opts = {
|
||||
-- for more options check out https://github.com/pojokcodeid/auto-lualine.nvim
|
||||
setColor = "auto",
|
||||
setOption = "roundedall",
|
||||
setMode = 5,
|
||||
},
|
||||
},
|
||||
-- overide formatting
|
||||
{
|
||||
"pojokcodeid/auto-conform.nvim",
|
||||
opts = {
|
||||
format_on_save = true,
|
||||
format_timeout_ms = 5000,
|
||||
},
|
||||
},
|
||||
-- install treesitter
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
vim.list_extend(opts.ensure_installed, { "lua", "c" })
|
||||
end,
|
||||
},
|
||||
-- install mason (lsp, dap, linters, formatters)
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = { ensure_installed = { "stylua" } },
|
||||
},
|
||||
-- overide lsp config
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
opts = function(_, opts)
|
||||
vim.list_extend(opts.skip_config, { "jdtls" })
|
||||
opts.virtual_text = true
|
||||
end,
|
||||
},
|
||||
-- add whichkey mappings
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
opts = function(_, opts)
|
||||
opts.mappings = opts.mappings or {}
|
||||
vim.list_extend(opts.mappings, {
|
||||
{ "<leader>h", "<cmd>nohlsearch<CR>", desc = " No Highlight", mode = "n" },
|
||||
})
|
||||
end,
|
||||
},
|
||||
-- overide telescope
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
opts = function(_, opts)
|
||||
opts.pickers = {
|
||||
find_files = {
|
||||
hidden = true,
|
||||
},
|
||||
live_grep = {
|
||||
theme = "dropdown",
|
||||
only_sort_text = true,
|
||||
additional_args = function()
|
||||
return { "--multiline" }
|
||||
end,
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
-- add code runner
|
||||
{
|
||||
"CRAG666/code_runner.nvim",
|
||||
opts = function(_, opts)
|
||||
vim.list_extend(opts.filetype, { go = "go run $fileName" })
|
||||
end,
|
||||
},
|
||||
-- custem nvimtree
|
||||
{
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
opts = function(_, opts)
|
||||
-- set nvimtree float view (default left side)
|
||||
-- opts.view = {
|
||||
-- adaptive_size = false,
|
||||
-- centralize_selection = true,
|
||||
-- side = "left",
|
||||
-- preserve_window_proportions = false,
|
||||
-- number = false,
|
||||
-- relativenumber = false,
|
||||
-- signcolumn = "yes",
|
||||
-- float = {
|
||||
-- enable = true,
|
||||
-- open_win_config = function()
|
||||
-- local screen_w = vim.opt.columns:get()
|
||||
-- local screen_h = vim.opt.lines:get() - vim.opt.cmdheight:get()
|
||||
-- local window_w = screen_w * 0.5
|
||||
-- local window_h = screen_h * 0.9
|
||||
-- local window_w_int = math.floor(window_w)
|
||||
-- local window_h_int = math.floor(window_h)
|
||||
-- local center_x = (screen_w - window_w) / 2
|
||||
-- local center_y = ((vim.opt.lines:get() - window_h) / 2) - vim.opt.cmdheight:get()
|
||||
-- return {
|
||||
-- border = "rounded",
|
||||
-- relative = "editor",
|
||||
-- row = center_y,
|
||||
-- col = center_x,
|
||||
-- width = window_w_int,
|
||||
-- height = window_h_int,
|
||||
-- }
|
||||
-- end,
|
||||
-- },
|
||||
-- width = function()
|
||||
-- return math.floor(vim.opt.columns:get() * 0.5)
|
||||
-- end,
|
||||
-- }
|
||||
return opts
|
||||
end,
|
||||
},
|
||||
-- overidse dashboard
|
||||
{
|
||||
"goolord/alpha-nvim",
|
||||
opts = {
|
||||
dash_model = {
|
||||
[[ _ __ __ ]],
|
||||
[[ ___ ___ (____ / /__ _______ ___/ ___ ]],
|
||||
[[ / _ / _ \ / / _ \/ '_/ / __/ _ / _ / -_) ]],
|
||||
[[ / .__\_____/ /\___/_/\_\ \__/\___\_,_/\__/ ]],
|
||||
[[ /_/ |___/ ]],
|
||||
},
|
||||
},
|
||||
},
|
||||
-- overide lualine
|
||||
{
|
||||
"pojokcodeid/auto-lualine.nvim",
|
||||
opts = {
|
||||
-- for more options check out https://github.com/pojokcodeid/auto-lualine.nvim
|
||||
setColor = "auto",
|
||||
setOption = "roundedall",
|
||||
setMode = 5,
|
||||
},
|
||||
},
|
||||
-- overide formatting
|
||||
{
|
||||
"pojokcodeid/auto-conform.nvim",
|
||||
opts = {
|
||||
format_on_save = true,
|
||||
format_timeout_ms = 5000,
|
||||
},
|
||||
},
|
||||
-- install treesitter
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
vim.list_extend(opts.ensure_installed, { "lua", "c" })
|
||||
end,
|
||||
},
|
||||
-- install mason (lsp, dap, linters, formatters)
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = { ensure_installed = { "stylua" } },
|
||||
},
|
||||
-- overide lsp config
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
opts = function(_, opts)
|
||||
vim.list_extend(opts.skip_config, { "jdtls" })
|
||||
opts.virtual_text = true
|
||||
end,
|
||||
},
|
||||
-- add whichkey mappings
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
opts = function(_, opts)
|
||||
opts.mappings = opts.mappings or {}
|
||||
vim.list_extend(opts.mappings, {
|
||||
{ "<leader>h", "<cmd>nohlsearch<CR>", desc = " No Highlight", mode = "n" },
|
||||
})
|
||||
end,
|
||||
},
|
||||
-- overide telescope
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
opts = function(_, opts)
|
||||
opts.pickers = {
|
||||
find_files = {
|
||||
hidden = true,
|
||||
},
|
||||
live_grep = {
|
||||
theme = "dropdown",
|
||||
only_sort_text = true,
|
||||
additional_args = function()
|
||||
return { "--multiline" }
|
||||
end,
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
-- add code runner
|
||||
{
|
||||
"CRAG666/code_runner.nvim",
|
||||
opts = function(_, opts)
|
||||
vim.list_extend(opts.filetype, { go = "go run $fileName" })
|
||||
end,
|
||||
},
|
||||
-- custem nvimtree
|
||||
{
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
opts = function(_, opts)
|
||||
-- set nvimtree float view (default left side)
|
||||
-- opts.view = {
|
||||
-- adaptive_size = false,
|
||||
-- centralize_selection = true,
|
||||
-- side = "left",
|
||||
-- preserve_window_proportions = false,
|
||||
-- number = false,
|
||||
-- relativenumber = false,
|
||||
-- signcolumn = "yes",
|
||||
-- float = {
|
||||
-- enable = true,
|
||||
-- open_win_config = function()
|
||||
-- local screen_w = vim.opt.columns:get()
|
||||
-- local screen_h = vim.opt.lines:get() - vim.opt.cmdheight:get()
|
||||
-- local window_w = screen_w * 0.5
|
||||
-- local window_h = screen_h * 0.9
|
||||
-- local window_w_int = math.floor(window_w)
|
||||
-- local window_h_int = math.floor(window_h)
|
||||
-- local center_x = (screen_w - window_w) / 2
|
||||
-- local center_y = ((vim.opt.lines:get() - window_h) / 2) - vim.opt.cmdheight:get()
|
||||
-- return {
|
||||
-- border = "rounded",
|
||||
-- relative = "editor",
|
||||
-- row = center_y,
|
||||
-- col = center_x,
|
||||
-- width = window_w_int,
|
||||
-- height = window_h_int,
|
||||
-- }
|
||||
-- end,
|
||||
-- },
|
||||
-- width = function()
|
||||
-- return math.floor(vim.opt.columns:get() * 0.5)
|
||||
-- end,
|
||||
-- }
|
||||
return opts
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ pcode.extras = {
|
|||
minianimate = false,
|
||||
neoscroll = false,
|
||||
nvimufo = false,
|
||||
refactoring = false,
|
||||
refactoring = true,
|
||||
rest = false,
|
||||
treesittercontex = false,
|
||||
codeium = true,
|
||||
|
|
|
@ -69,3 +69,5 @@ vim.api.nvim_create_autocmd("FileType", {
|
|||
opt.relativenumber = false
|
||||
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