mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-08-05 02:14:37 +02:00
enc: update config, add cmp colorfull and cmp RG
This commit is contained in:
parent
20e96da865
commit
76277745b3
8 changed files with 419 additions and 222 deletions
|
@ -1,54 +1,55 @@
|
||||||
{
|
{
|
||||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||||
"LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" },
|
"LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" },
|
||||||
"alpha-nvim": { "branch": "main", "commit": "a35468cd72645dbd52c0624ceead5f301c566dff" },
|
"alpha-nvim": { "branch": "main", "commit": "2b3cbcdd980cae1e022409289245053f62fb50f6" },
|
||||||
"auto-bufferline.nvim": { "branch": "main", "commit": "2766951c88e7fdf667b25799771d209fe1f025f3" },
|
"auto-bufferline.nvim": { "branch": "main", "commit": "6a69520dcb0dc615df3cf972f69027aae3f75c3e" },
|
||||||
"auto-conform.nvim": { "branch": "main", "commit": "5f0897235e84bf2f8ff9d634e81678d5bfa63ab8" },
|
"auto-conform.nvim": { "branch": "main", "commit": "5f0897235e84bf2f8ff9d634e81678d5bfa63ab8" },
|
||||||
"auto-lint.nvim": { "branch": "main", "commit": "aff13cb8eaa055e66e940d43b7d83166397e5413" },
|
"auto-lint.nvim": { "branch": "main", "commit": "aff13cb8eaa055e66e940d43b7d83166397e5413" },
|
||||||
"auto-lsp.nvim": { "branch": "main", "commit": "c0e6f49bcf789b476ee551279f5b3ec9a8081bbd" },
|
"auto-lsp.nvim": { "branch": "main", "commit": "f32c94fff2862c313f4e150eb39dd0dc9bf18755" },
|
||||||
"auto-lualine.nvim": { "branch": "main", "commit": "9f0d6210344057eba2454113d3b07ef6eb58b5eb" },
|
"auto-lualine.nvim": { "branch": "main", "commit": "201da916411a56d0b27905528a7cb49a320ee054" },
|
||||||
"breadcrumbs.nvim": { "branch": "master", "commit": "9f764278784ce2f10dbe2f555ba14be2451d36a0" },
|
"breadcrumbs.nvim": { "branch": "master", "commit": "9f764278784ce2f10dbe2f555ba14be2451d36a0" },
|
||||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||||
"cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" },
|
"cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
||||||
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
|
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
|
||||||
"cmp-path": { "branch": "main", "commit": "e52e640b7befd8113b3350f46e8cfcfe98fcf730" },
|
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
||||||
|
"cmp-rg": { "branch": "master", "commit": "70a43543f61b6083ba9c3b7deb9ccee671410ac6" },
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||||
"code_runner.nvim": { "branch": "main", "commit": "65c8d11f507073b915f10faa88ea05bd4fbf69ce" },
|
"code_runner.nvim": { "branch": "main", "commit": "65c8d11f507073b915f10faa88ea05bd4fbf69ce" },
|
||||||
"codeium.vim": { "branch": "main", "commit": "272c6e2755e8faa90e26bcdcd9fde6b9e61751ea" },
|
"colorful-menu.nvim": { "branch": "master", "commit": "bc3e82609f2fcf7dad7ca87c20e65e51d5d9d87c" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "973f3cb73887d510321653044791d7937c7ec0fa" },
|
"conform.nvim": { "branch": "master", "commit": "973f3cb73887d510321653044791d7937c7ec0fa" },
|
||||||
"dracula.nvim": { "branch": "main", "commit": "96c9d19ce81b26053055ad6f688277d655b3f7d2" },
|
"dracula.nvim": { "branch": "main", "commit": "96c9d19ce81b26053055ad6f688277d655b3f7d2" },
|
||||||
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
|
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "362fe61f9f19e9bceff178792780df5cce118a7d" },
|
"gitsigns.nvim": { "branch": "main", "commit": "8270378ab83540b03d09c0194ba3e208f9d0cb72" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
"hlchunk.nvim": { "branch": "main", "commit": "474ec5d0f220158afa83aaefab32402e710d3032" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
|
"lsp_signature.nvim": { "branch": "master", "commit": "62cadce83aaceed677ffe7a2d6a57141af7131ea" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" },
|
"lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "c2465eb07db648026eee81005a659abe26e6d077" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "844d247d998c2f9a6a3baad8bb9748edc55ce69f" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
|
"mason.nvim": { "branch": "main", "commit": "9e25c98d4826998460926f8c5c2284848d80ae89" },
|
||||||
"mini.indentscope": { "branch": "main", "commit": "5fdc3edf7bb1b6365980c2c47dac2f19ec93c97b" },
|
|
||||||
"multiple-cursors.nvim": { "branch": "main", "commit": "1ac15d047a4b265cc2389957bcc56ee561b29e02" },
|
"multiple-cursors.nvim": { "branch": "main", "commit": "1ac15d047a4b265cc2389957bcc56ee561b29e02" },
|
||||||
|
"neocodeium": { "branch": "main", "commit": "272aed226827d8dadb85b4d9e2c9bb6bd30b4033" },
|
||||||
"noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" },
|
"noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" },
|
"nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
||||||
"nvim-lint": { "branch": "master", "commit": "3c5e34c24834a67b1cb37600ab7663eefd2b0390" },
|
"nvim-lint": { "branch": "master", "commit": "7ef127aaede2a4d5ad8df8321e2eb4e567f29594" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "7fac9025a967a4d0846660f751cd392fac6bb788" },
|
"nvim-lspconfig": { "branch": "master", "commit": "d0dbf489a8810672fa9a61f4a86e5cf89214b772" },
|
||||||
"nvim-material-icon": { "branch": "main", "commit": "c25a4e56be2f846dfdf8f30b980adc17f219d019" },
|
"nvim-material-icon": { "branch": "main", "commit": "c25a4e56be2f846dfdf8f30b980adc17f219d019" },
|
||||||
"nvim-navic": { "branch": "master", "commit": "f887d794a0f4594882814d7780980a949200a238" },
|
"nvim-navic": { "branch": "master", "commit": "f887d794a0f4594882814d7780980a949200a238" },
|
||||||
"nvim-notify": { "branch": "master", "commit": "a22f5d7ac511c2df2fd3290a9f04c48d5a822e2e" },
|
"nvim-notify": { "branch": "master", "commit": "397c7c1184745fca649e5104de659e6392ef5a4d" },
|
||||||
"nvim-scrollview": { "branch": "main", "commit": "095181bc2adb64af670dae73208871a731f0bb86" },
|
"nvim-tree.lua": { "branch": "master", "commit": "65bae449224b8a3bc149471b96587b23b13a9946" },
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "b0b49552c9462900a882fe772993b01d780445fe" },
|
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
||||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" },
|
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "19d6211c78169e78bab372b585b6fb17ad974e82" },
|
"nvim-web-devicons": { "branch": "master", "commit": "3362099de3368aa620a8105b19ed04c2053e38c0" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||||
"rainbow-delimiters.nvim": { "branch": "master", "commit": "55ad4fb76ab68460f700599b7449385f0c4e858e" },
|
"rainbow-delimiters.nvim": { "branch": "master", "commit": "97bf4b8ef9298644a29fcd9dd41a0210cf08cac7" },
|
||||||
"smart-splits.nvim": { "branch": "master", "commit": "c088d64c6e0e3221d24ef1f9337b5fe15557ddcc" },
|
"showkeys": { "branch": "main", "commit": "cb0a50296f11f1e585acffba8c253b9e8afc1f84" },
|
||||||
|
"smart-splits.nvim": { "branch": "master", "commit": "f46b79cf9e83b0a13a4e3f83e3bd5b0d2f172bf2" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||||
"tiny-devicons-auto-colors.nvim": { "branch": "main", "commit": "51f548421f8a74680eff27d283c9d5ea6e8d0074" },
|
|
||||||
"toggleterm.nvim": { "branch": "main", "commit": "9a88eae817ef395952e08650b3283726786fb5fb" },
|
"toggleterm.nvim": { "branch": "main", "commit": "9a88eae817ef395952e08650b3283726786fb5fb" },
|
||||||
"vim-illuminate": { "branch": "master", "commit": "0d1e93684da00ab7c057410fecfc24f434698898" },
|
"vim-illuminate": { "branch": "master", "commit": "0d1e93684da00ab7c057410fecfc24f434698898" },
|
||||||
"virt-column.nvim": { "branch": "master", "commit": "b87e3e0864211a32724a2ebf3be37e24e9e2fa99" },
|
"virt-column.nvim": { "branch": "master", "commit": "b87e3e0864211a32724a2ebf3be37e24e9e2fa99" },
|
||||||
|
|
|
@ -3,7 +3,7 @@ return {
|
||||||
"L3MON4D3/LuaSnip",
|
"L3MON4D3/LuaSnip",
|
||||||
event = "InsertEnter",
|
event = "InsertEnter",
|
||||||
version = "v2.*",
|
version = "v2.*",
|
||||||
build = "make install_jsregexp",
|
-- build = "make install_jsregexp",
|
||||||
opts = {
|
opts = {
|
||||||
history = true,
|
history = true,
|
||||||
delete_check_events = "TextChanged",
|
delete_check_events = "TextChanged",
|
||||||
|
@ -24,6 +24,8 @@ return {
|
||||||
"hrsh7th/cmp-path",
|
"hrsh7th/cmp-path",
|
||||||
"saadparwaiz1/cmp_luasnip",
|
"saadparwaiz1/cmp_luasnip",
|
||||||
"hrsh7th/cmp-nvim-lua",
|
"hrsh7th/cmp-nvim-lua",
|
||||||
|
"xzbdmw/colorful-menu.nvim",
|
||||||
|
"lukas-reineke/cmp-rg",
|
||||||
},
|
},
|
||||||
opts = function()
|
opts = function()
|
||||||
local cmp = require("cmp")
|
local cmp = require("cmp")
|
||||||
|
@ -84,19 +86,45 @@ return {
|
||||||
{ name = "buffer" },
|
{ name = "buffer" },
|
||||||
{ name = "path" },
|
{ name = "path" },
|
||||||
{ name = "nvim_lua" },
|
{ name = "nvim_lua" },
|
||||||
|
{ name = "rg" },
|
||||||
}),
|
}),
|
||||||
formatting = {
|
formatting = {
|
||||||
fields = { "kind", "abbr", "menu" },
|
fields = { "kind", "abbr", "menu" },
|
||||||
format = function(entry, vim_item)
|
format = function(entry, vim_item)
|
||||||
vim_item.menu = vim.api.nvim_get_mode().mode == "c" and "" or all_trim(vim_item.kind)
|
vim_item.menu = vim.api.nvim_get_mode().mode == "c" and "" or all_trim(vim_item.kind)
|
||||||
vim_item.kind = string.format("%s", all_trim(require("pcode.user.icons")["kind"][vim_item.kind]))
|
vim_item.kind = string.format("%s", all_trim(require("pcode.user.icons")["kind2"][vim_item.kind]))
|
||||||
-- vim_item.menu = ({
|
|
||||||
-- nvim_lsp = "(LSP)",
|
local original_notify = vim.notify
|
||||||
-- luasnip = "(Snippet)",
|
vim.notify = function(msg, level, opts)
|
||||||
-- buffer = "(Buffer)",
|
if type(msg) == "string" and msg:match("has new line character, please open an issue") then
|
||||||
-- path = "(Path)",
|
return
|
||||||
-- codeium = "(Codeium)",
|
end
|
||||||
-- })[entry.source.name]
|
original_notify(msg, level, opts)
|
||||||
|
end
|
||||||
|
|
||||||
|
local ok, highlights_info = pcall(require("colorful-menu").cmp_highlights, entry)
|
||||||
|
if ok and highlights_info ~= nil then
|
||||||
|
vim_item.abbr_hl_group = highlights_info.highlights
|
||||||
|
|
||||||
|
-- ambil nama group hilightnya saja
|
||||||
|
-- eg. "@parameter"
|
||||||
|
local var_hilight = highlights_info.highlights[1][1]
|
||||||
|
local id = vim.fn.hlID(var_hilight)
|
||||||
|
|
||||||
|
local var_out = "@tag"
|
||||||
|
-- cek apakah hilight terdefinisi
|
||||||
|
if id ~= 0 then
|
||||||
|
var_out = var_hilight
|
||||||
|
else
|
||||||
|
var_out = var_hilight:match("([^%.]+)")
|
||||||
|
end
|
||||||
|
|
||||||
|
vim_item.menu_hl_group = var_out
|
||||||
|
-- vim.notify(var_out)
|
||||||
|
else
|
||||||
|
vim_item.abbr_hl_group = "CmpItemAbbr"
|
||||||
|
vim_item.menu_hl_group = "CmpItemAbbr"
|
||||||
|
end
|
||||||
return vim_item
|
return vim_item
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
|
@ -4,7 +4,7 @@ return {
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
"stevearc/conform.nvim",
|
"stevearc/conform.nvim",
|
||||||
},
|
},
|
||||||
event = "VeryLazy",
|
event = "BufRead",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
opts.formatters = opts.formatters or {}
|
opts.formatters = opts.formatters or {}
|
||||||
opts.formatters_by_ft = opts.formatters_by_ft or {}
|
opts.formatters_by_ft = opts.formatters_by_ft or {}
|
||||||
|
|
34
lua/pcode/plugins/dressing.lua
Normal file
34
lua/pcode/plugins/dressing.lua
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
return {
|
||||||
|
"stevearc/dressing.nvim",
|
||||||
|
lazy = true,
|
||||||
|
init = function()
|
||||||
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
|
vim.ui.select = function(...)
|
||||||
|
require("lazy").load({ plugins = { "dressing.nvim" } })
|
||||||
|
return vim.ui.select(...)
|
||||||
|
end
|
||||||
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
|
--[[ vim.ui.input = function(...)
|
||||||
|
require("lazy").load({ plugins = { "dressing.nvim" } })
|
||||||
|
return vim.ui.input(...)
|
||||||
|
end ]]
|
||||||
|
end,
|
||||||
|
opts = {
|
||||||
|
input = {
|
||||||
|
title_pos = "center",
|
||||||
|
relative = "editor",
|
||||||
|
default_prompt = "➤ ",
|
||||||
|
win_options = { winhighlight = "Normal:Normal,NormalNC:Normal" },
|
||||||
|
prefer_width = 30,
|
||||||
|
max_width = { 140, 0.9 },
|
||||||
|
min_width = { 50, 0.2 },
|
||||||
|
},
|
||||||
|
select = {
|
||||||
|
backend = { "telescope", "builtin" },
|
||||||
|
builtin = { win_options = { winhighlight = "Normal:Normal,NormalNC:Normal" } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
require("dressing").setup(opts)
|
||||||
|
end,
|
||||||
|
}
|
|
@ -1,4 +1,13 @@
|
||||||
return {
|
local M = {}
|
||||||
|
if pcode.use_nvimtree then
|
||||||
|
-- for fix error last close buffer
|
||||||
|
vim.api.nvim_create_autocmd({ "QuitPre" }, {
|
||||||
|
callback = function()
|
||||||
|
vim.cmd("NvimTreeClose")
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
M = {
|
||||||
"nvim-tree/nvim-tree.lua",
|
"nvim-tree/nvim-tree.lua",
|
||||||
cmd = { "NvimTreeFindFileToggle", "NvimTree", "NvimTreeOpen", "NvimTreeToggle", "NvimTreeFocus", "NvimTreeClose" },
|
cmd = { "NvimTreeFindFileToggle", "NvimTree", "NvimTreeOpen", "NvimTreeToggle", "NvimTreeFocus", "NvimTreeClose" },
|
||||||
keys = {
|
keys = {
|
||||||
|
@ -54,16 +63,16 @@ return {
|
||||||
root_folder_label = false,
|
root_folder_label = false,
|
||||||
highlight_git = true,
|
highlight_git = true,
|
||||||
indent_markers = { enable = true },
|
indent_markers = { enable = true },
|
||||||
--[[ indent_markers = {
|
-- indent_markers = {
|
||||||
enable = true,
|
-- enable = true,
|
||||||
inline_arrows = true,
|
-- inline_arrows = true,
|
||||||
icons = {
|
-- icons = {
|
||||||
corner = "└",
|
-- corner = "└",
|
||||||
edge = "│",
|
-- edge = "│",
|
||||||
item = "│",
|
-- item = "│",
|
||||||
none = " ",
|
-- none = " ",
|
||||||
},
|
-- },
|
||||||
}, ]]
|
-- },
|
||||||
icons = {
|
icons = {
|
||||||
webdev_colors = true,
|
webdev_colors = true,
|
||||||
git_placement = "before",
|
git_placement = "before",
|
||||||
|
@ -172,3 +181,141 @@ return {
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
local git_available = vim.fn.executable("git") == 1
|
||||||
|
|
||||||
|
M = {
|
||||||
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
|
branch = "v3.x",
|
||||||
|
event = { "BufRead", "BufNewFile" },
|
||||||
|
cmd = "Neotree",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
},
|
||||||
|
|
||||||
|
deactivate = function()
|
||||||
|
vim.cmd([[Neotree close]])
|
||||||
|
end,
|
||||||
|
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>e",
|
||||||
|
"<CMD>Neotree toggle<CR>",
|
||||||
|
desc = "Explorer",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
init = function()
|
||||||
|
vim.api.nvim_create_autocmd("BufEnter", {
|
||||||
|
group = vim.api.nvim_create_augroup("Neotree_start_directory", { clear = true }),
|
||||||
|
desc = "Start Neo-tree with directory",
|
||||||
|
once = true,
|
||||||
|
callback = function()
|
||||||
|
if not package.loaded["neo-tree"] then
|
||||||
|
local stats = vim.uv.fs_stat(vim.fn.argv(0))
|
||||||
|
if stats and stats.type == "directory" then
|
||||||
|
require("neo-tree")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
|
||||||
|
opts = {
|
||||||
|
popup_border_style = "rounded",
|
||||||
|
enable_git_status = git_available,
|
||||||
|
auto_clean_after_session_restore = true,
|
||||||
|
close_if_last_window = true,
|
||||||
|
|
||||||
|
sources = vim.tbl_filter(function(src)
|
||||||
|
return src ~= nil
|
||||||
|
end, {
|
||||||
|
"filesystem",
|
||||||
|
"buffers",
|
||||||
|
git_available and "git_status" or nil,
|
||||||
|
}),
|
||||||
|
|
||||||
|
source_selector = {
|
||||||
|
winbar = true,
|
||||||
|
content_layout = "center",
|
||||||
|
sources = {
|
||||||
|
{ source = "filesystem", display_name = " Files " },
|
||||||
|
{ source = "buffers", display_name = " Buffers " },
|
||||||
|
{ source = "git_status", display_name = " Git " },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
window = {
|
||||||
|
position = "left",
|
||||||
|
width = 35,
|
||||||
|
},
|
||||||
|
|
||||||
|
default_component_configs = {
|
||||||
|
icon = {
|
||||||
|
folder_closed = "",
|
||||||
|
folder_open = "",
|
||||||
|
folder_empty = "",
|
||||||
|
},
|
||||||
|
git_status = {
|
||||||
|
symbols = {
|
||||||
|
unstaged = "",
|
||||||
|
staged = "",
|
||||||
|
added = "", -- or "✚", but this is redundant info if you use git_status_colors on the name
|
||||||
|
modified = "", -- or "", but this is redundant info if you use git_status_colors on the name
|
||||||
|
deleted = "", -- this can only be used in the git_status source
|
||||||
|
renamed = "", -- this can only be used in the git_status source
|
||||||
|
-- Status type
|
||||||
|
untracked = "",
|
||||||
|
ignored = "",
|
||||||
|
conflict = "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
filesystem = {
|
||||||
|
filtered_items = {
|
||||||
|
visible = false,
|
||||||
|
hide_dotfiles = false,
|
||||||
|
hide_gitignored = false,
|
||||||
|
hide_hidden = true,
|
||||||
|
hide_by_name = {
|
||||||
|
".git",
|
||||||
|
"node_modules",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
buffers = {
|
||||||
|
follow_current_file = {
|
||||||
|
enabled = true,
|
||||||
|
leave_dirs_open = false,
|
||||||
|
},
|
||||||
|
group_empty_dirs = true,
|
||||||
|
show_unloaded = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
config = function(_, opts)
|
||||||
|
require("neo-tree").setup(opts)
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("TermClose", {
|
||||||
|
pattern = "*lazygit*",
|
||||||
|
callback = function()
|
||||||
|
if package.loaded["neo-tree.sources.git_status"] then
|
||||||
|
require("neo-tree.sources.git_status").refresh()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- vim.cmd [[
|
||||||
|
-- highlight NeoTreeTabActive guifg=#ffffff guibg=#5f87af
|
||||||
|
-- highlight NeoTreeTabInactive guifg=#aaaaaa guibg=NONE
|
||||||
|
-- highlight NeoTreeTabSeparatorActive guifg=#5f87af guibg=NONE
|
||||||
|
-- highlight NeoTreeTabSeparatorInactive guifg=#3a3a3a guibg=NONE
|
||||||
|
-- ]]
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|
|
@ -25,7 +25,9 @@ return {
|
||||||
["@tag.css"] = { fg = colors.pink },
|
["@tag.css"] = { fg = colors.pink },
|
||||||
["@keyword.css"] = { fg = colors.fg },
|
["@keyword.css"] = { fg = colors.fg },
|
||||||
["@string.css"] = { fg = colors.pink },
|
["@string.css"] = { fg = colors.pink },
|
||||||
|
["@punctuation.delimiter.lua"] = { fg = colors.orange },
|
||||||
NvimTreeFolderIcon = { fg = "#6776a7" },
|
NvimTreeFolderIcon = { fg = "#6776a7" },
|
||||||
|
NeoTreeDirectoryIcon = { fg = "#6776a7" },
|
||||||
CmpItemAbbr = { fg = "#ABB2BF" },
|
CmpItemAbbr = { fg = "#ABB2BF" },
|
||||||
CmpItemKind = { fg = "#ABB2BF" },
|
CmpItemKind = { fg = "#ABB2BF" },
|
||||||
CmpItemAbbrDeprecated = { fg = "#ABB2BF" },
|
CmpItemAbbrDeprecated = { fg = "#ABB2BF" },
|
||||||
|
@ -51,6 +53,11 @@ return {
|
||||||
WinBar = { bg = colors.bg },
|
WinBar = { bg = colors.bg },
|
||||||
WinBarNC = { fg = colors.fg, bg = colors.bg },
|
WinBarNC = { fg = colors.fg, bg = colors.bg },
|
||||||
MasonBackdrop = { link = "NormalFloat" },
|
MasonBackdrop = { link = "NormalFloat" },
|
||||||
|
CodeiumSuggestion = { fg = "#94969c" },
|
||||||
|
NeoTreeTabInactive = { fg = "#6776a7", bg = colors.bg },
|
||||||
|
NeoTreeTabSeparatorActive = { fg = "#6776a7", bg = colors.bg },
|
||||||
|
NeoTreeTabSeparatorInactive = { fg = "#6776a7", bg = colors.bg },
|
||||||
|
NeoTreeTabActive = { fg = colors.fg, bg = colors.selection },
|
||||||
},
|
},
|
||||||
transparent_bg = false,
|
transparent_bg = false,
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,13 +3,6 @@ local api = vim.api
|
||||||
-- General Settings
|
-- General Settings
|
||||||
api.nvim_create_augroup("_general_settings", { clear = true })
|
api.nvim_create_augroup("_general_settings", { clear = true })
|
||||||
|
|
||||||
-- api.nvim_create_autocmd("TextYankPost", {
|
|
||||||
-- group = "_general_settings",
|
|
||||||
-- callback = function()
|
|
||||||
-- require("vim.highlight").on_yank({ higroup = "Visual", timeout = 200 })
|
|
||||||
-- end,
|
|
||||||
-- })
|
|
||||||
|
|
||||||
api.nvim_create_autocmd("FileType", {
|
api.nvim_create_autocmd("FileType", {
|
||||||
group = "_general_settings",
|
group = "_general_settings",
|
||||||
pattern = "qf",
|
pattern = "qf",
|
||||||
|
@ -72,13 +65,6 @@ api.nvim_create_autocmd("BufWritePre", {
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- for fix error last close buffer
|
|
||||||
vim.api.nvim_create_autocmd({ "QuitPre" }, {
|
|
||||||
callback = function()
|
|
||||||
vim.cmd("NvimTreeClose")
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
local autocmd = vim.api.nvim_create_autocmd
|
local autocmd = vim.api.nvim_create_autocmd
|
||||||
autocmd("VimEnter", {
|
autocmd("VimEnter", {
|
||||||
pattern = "*",
|
pattern = "*",
|
||||||
|
@ -116,15 +102,6 @@ vim.api.nvim_create_autocmd("ExitPre", {
|
||||||
desc = "Set cursor back to beam when leaving Neovim.",
|
desc = "Set cursor back to beam when leaving Neovim.",
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Create an autocmd to set keymap for Java files
|
|
||||||
-- vim.api.nvim_create_augroup("java_gradle_run", { clear = true })
|
|
||||||
-- vim.api.nvim_create_autocmd("FileType", {
|
|
||||||
-- pattern = "java",
|
|
||||||
-- callback = function()
|
|
||||||
-- vim.api.nvim_set_keymap("n", "<leader>rg", "<cmd>terminal<cr>gradle run<cr>", { noremap = true, silent = true })
|
|
||||||
-- end,
|
|
||||||
-- })
|
|
||||||
|
|
||||||
-- Extras
|
-- Extras
|
||||||
local function lsp_status()
|
local function lsp_status()
|
||||||
local bufnr = vim.api.nvim_get_current_buf()
|
local bufnr = vim.api.nvim_get_current_buf()
|
||||||
|
|
|
@ -22,7 +22,9 @@ pcode.lang = {
|
||||||
pcode.extras = {
|
pcode.extras = {
|
||||||
autosave = false,
|
autosave = false,
|
||||||
bigfiles = false,
|
bigfiles = false,
|
||||||
|
codeium = false,
|
||||||
codeiumnvim = false,
|
codeiumnvim = false,
|
||||||
|
neocodeium = true,
|
||||||
liveserver = false,
|
liveserver = false,
|
||||||
minianimate = false,
|
minianimate = false,
|
||||||
neoscroll = false,
|
neoscroll = false,
|
||||||
|
@ -30,16 +32,15 @@ pcode.extras = {
|
||||||
refactoring = false,
|
refactoring = false,
|
||||||
rest = false,
|
rest = false,
|
||||||
treesittercontex = false,
|
treesittercontex = false,
|
||||||
codeium = true,
|
|
||||||
colorizer = false,
|
colorizer = false,
|
||||||
dap = false,
|
dap = false,
|
||||||
deviconcolor = true,
|
deviconcolor = false,
|
||||||
illuminate = true,
|
illuminate = true,
|
||||||
indentscupe = true,
|
indentscupe = false,
|
||||||
navic = true,
|
navic = true,
|
||||||
nvimmenu = false,
|
nvimmenu = false,
|
||||||
rainbowdelimiters = true,
|
rainbowdelimiters = true,
|
||||||
scrollview = true,
|
scrollview = false,
|
||||||
smartsplit = true,
|
smartsplit = true,
|
||||||
verticalcolumn = true,
|
verticalcolumn = true,
|
||||||
visualmulti = true,
|
visualmulti = true,
|
||||||
|
@ -52,6 +53,7 @@ pcode.extras = {
|
||||||
dressing = true,
|
dressing = true,
|
||||||
telescopediff = false,
|
telescopediff = false,
|
||||||
cheatsheet = false,
|
cheatsheet = false,
|
||||||
|
showkeys = true,
|
||||||
}
|
}
|
||||||
-- activate config themes
|
-- activate config themes
|
||||||
pcode.themes = {
|
pcode.themes = {
|
||||||
|
@ -100,4 +102,5 @@ pcode.themes = {
|
||||||
pcode.transparent = false
|
pcode.transparent = false
|
||||||
pcode.localcode = true
|
pcode.localcode = true
|
||||||
pcode.snippets_path = vim.fn.stdpath("config") .. "/mysnippets"
|
pcode.snippets_path = vim.fn.stdpath("config") .. "/mysnippets"
|
||||||
|
pcode.use_nvimtree = true
|
||||||
pcode.nvimtree_float = false
|
pcode.nvimtree_float = false
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue