Skip to content
Closed

update #2017

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
727 changes: 648 additions & 79 deletions init.lua

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions lazyvim.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extras": [

],
"news": {
"NEWS.md": "7429"
},
"version": 7
}
1 change: 1 addition & 0 deletions lua/chadrc.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
return {}
15 changes: 15 additions & 0 deletions lua/config/lazy.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
local out = vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ 'Failed to clone lazy.nvim:\n', 'ErrorMsg' },
{ out, 'WarningMsg' },
{ '\nPress any key to exit...' },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
134 changes: 134 additions & 0 deletions lua/custom/plugins/alpha.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
return {

'goolord/alpha-nvim',
dependencies = {
'nvim-tree/nvim-web-devicons',
},
config = function()
local alpha = require 'alpha'
local dashboard = require 'alpha.themes.dashboard'

_Gopts = {
position = 'center',
hl = 'Type',
wrap = 'overflow',
}

-- DASHBOARD HEADER

local function getGreeting(name)
local tableTime = os.date '*t'
local datetime = os.date ' %Y-%m-%d-%A  %H:%M:%S '
local hour = tableTime.hour
local greetingsTable = {
[1] = ' Sleep well',
[2] = ' Good morning',
[3] = ' Good afternoon',
[4] = ' Good evening',
[5] = '󰖔 Good night',
}
local greetingIndex = 0
if hour == 23 or hour < 7 then
greetingIndex = 1
elseif hour < 12 then
greetingIndex = 2
elseif hour >= 12 and hour < 18 then
greetingIndex = 3
elseif hour >= 18 and hour < 21 then
greetingIndex = 4
elseif hour >= 21 then
greetingIndex = 5
end
return datetime .. ' ' .. greetingsTable[greetingIndex] .. ', ' .. name
end

local logo = [[
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⢔⢅⠣⡣⢑⠅⡇⣆⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠤⡐⢌⢆⠣⡱⡨⢂⠕⠬⡨⢪⣠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢊⠐⠌⠔⣁⢦⣣⢵⢬⡢⣃⠅⡉⠺⡮⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠠⢕⢣⢳⡸⣌⠮⢓⡹⣺⢔⣔⣐⢑⢌⠪⡮⠁⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⣀⡦⢗⡞⣟⢮⢥⢀⠣⡗⠉⢳⢹⢪⡫⢞⡮⣖⡥⡣⠺⠀⠀⠀⠀⠀⢀⠠⠈⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⢕⡺⡶⡴⣁⡹⡱⢷⡑⡕⢅⠘⠮⣍⢧⢷⡸⡢⡑⢕⠫⡯⡳⣄⠀⠀⡐⠈⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠀⠀⢀⢪⡨⢓⡐⣈⠫⠓⡆⠍⠅⠣⡘⡈⢧⢸⢵⢱⡱⢩⢝⡔⡢⢑⢽⢝⡮⣳⡨⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⡧⡤⡎⡚⡉⡅⡋⣊⢝⢼⠇⣌⠌⡆⠙⡺⡬⡇⡇⠅⡢⠑⡑⣵⡳⣆⡂⡝⢪⢣⡻⣪⢆⡀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⡏⡜⢜⠍⠲⠢⡨⡫⡵⠗⢧⣢⡁⠜⠀⡌⢝⢌⡇⠅⠌⠢⡉⡮⡎⠌⢌⠚⣧⡳⣝⢮⡫⣞⡀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡣⠞⡣⡢⡑⠡⠑⡦⡊⢎⠉⢌⢚⠄⠪⡘⢜⢼⠂⡡⠠⡈⢄⠪⠸⢭⢌⠝⡘⠕⡎⠕⡝⡮⡪⢄⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠰⢐⢊⢚⠧⢚⡵⣌⣑⠅⢨⢑⢐⠀⠡⠡⣀⠁⢄⢇⡧⠠⠐⠅⡂⠌⠂⠀⢓⢕⢮⢰⢅⠹⡨⡊⢎⡎⡎⡆⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠄⠘⣀⣲⢽⣸⡔⠀⣀⠡⠺⠐⠁⡱⡝⣬⢖⡝⠡⢊⢔⢢⠑⡐⠅⡈⠀⠀⢌⢎⠕⡕⡕⣇⠕⡬⡂⠱⡕⡵⡀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠥⠩⡓⡕⡍⣹⠁⠄⡬⢐⢀⢴⢯⣳⢕⠥⡑⣙⢜⢔⠅⠂⠨⠀⡠⠀⠜⠬⡨⣘⠸⣜⢬⠂⡑⢡⢪⢪⢣⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⡣⣊⡂⡂⠅⠈⢒⢚⡱⡮⡫⡕⢏⠮⢫⢚⠳⠌⡮⣀⢀⠀⠄⢄⠢⠀⠂⡈⡲⡕⡸⡵⡱⡀⠄⠂⢁⠳⡀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠊⣗⢾⠴⡐⡐⡯⠏⣪⠦⠬⢥⠏⠦⡡⡝⡣⡨⡌⡄⠌⡈⠄⠕⠌⡐⡀⡴⡕⡼⡱⡓⢔⠐⠈⠀⠨⠈⠂⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢊⢆⢇⢇⡳⢙⢲⠺⠭⠬⡉⣐⢰⡣⣈⢂⠥⡀⢀⠀⢢⢈⠠⠀⢄⡯⢮⢫⡪⡣⣃⠪⠈⠀⠄⢑⠀⠄
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠢⡑⣈⢾⡸⣪⠲⣋⢭⣍⡡⠖⣌⡐⣔⠸⡌⡃⠌⠤⡰⣐⡐⣰⠼⠵⡝⢕⠱⡑⢵⢕⠇⠈⠀⠀⡳⣐⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡂⢐⡡⡔⢖⢕⢬⢤⣫⡈⡧⢆⢕⠪⡆⡪⠈⡔⡉⡪⢨⢪⠪⡢⣣⢣⠫⠡⠱⠡⡑⡌⡇⠏⠀⠠⠈⠀⢀⠠⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠔⡨⢪⠱⠨⠨⢒⢊⠲⡱⣪⠺⣍⢂⠵⡘⣘⡠⡣⡣⡒⡬⠠⢱⠱⣱⢕⠥⡨⡸⠸⢜⢜⠬⠊⠀⢀⠐⡀⠌⠠⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢄⠢⡢⠢⠊⠆⢅⠢⡑⢌⠢⢑⠐⢕⢝⠀⠉⡧⡘⡀⢢⠪⠘⠌⠎⢈⢎⠬⠐⠌⠊⠈⠄⠀⡀⢀⠀⢀⠠⠠⠀⡀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⡠⡴⠼⢜⢌⠪⡠⢥⢁⠪⢐⠔⢄⢕⢌⡀⠐⠀⠡⠉⠎⠊⢀⠐⢀⢠⠅⠇⠋⠨⠀⠂⠁⠀⠀⡈⠠⠀⠄⠠⠀⠄⠀⠅⠊⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⢀⢄⣄⠀⠀⠀⠀⢄⢖⠁⡎⠪⡣⢅⢓⢜⡐⢕⢕⠂⠌⡊⠢⢑⠘⠘⢈⠂⠂⠃⠑⠐⠈⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢐⠐⡨⠀⠢⠈⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⢁⠢⢊⡠⢂⠢⡲⠑⡌⠪⠉⠀⠀⠠⠘⠔⢅⠣⠡⠂⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⡀⢀⠀⠀⢀⢓⠃⢂⠡⠴⢑⠗⠠⡅⡮⡨⡂⢝⡥⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠆⠁⠀⠀⠅⡀⠀⠀⠁⠀⠀⠀⠈⠈⠈⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠆⠀⠐⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
]]

local userName = 'Lazy'
local greeting = getGreeting(userName)
local marginBottom = 0
dashboard.section.header.val = vim.split(logo, '\n')

-- Split logo into lines
local logoLines = {}
for line in logo:gmatch '[^\r\n]+' do
table.insert(logoLines, line)
end

-- Calculate padding for centering the greeting
local logoWidth = logo:find '\n' - 18 -- Assuming the logo width is the width of the first line
local greetingWidth = #greeting
local padding = math.floor((logoWidth - greetingWidth) / 2)

-- Generate spaces for padding
local paddedGreeting = string.rep(' ', padding) .. greeting

-- Add margin lines below the padded greeting
local margin = string.rep('\n', marginBottom)

-- Concatenate logo, padded greeting, and margin
local adjustedLogo = logo .. '\n' .. paddedGreeting .. margin

dashboard.section.buttons.val = {
dashboard.button('n', ' New file', ':ene <BAR> startinsert <CR>'),
dashboard.button('f', ' Find file', ':cd $HOME | silent Telescope find_files hidden=true no_ignore=true <CR>'),
dashboard.button('t', ' Find text', ':Telescope live_grep <CR>'),
dashboard.button('r', '󰄉 Recent files', ':Telescope oldfiles <CR>'),
dashboard.button('u', '󱐥 Update plugins', '<cmd>Lazy update<CR>'),
dashboard.button('c', ' Settings', ':e $HOME/.config/nvim/init.lua<CR>'),
dashboard.button('p', ' Projects', ':e $HOME/git <CR>'),
dashboard.button('<C-p>', ' Clase', ':e $HOME/obsidian/Clase/ <CR>'),
dashboard.button('d', '󱗼 Dotfiles', ':e $HOME/.dotfiles <CR>'),
dashboard.button('q', '󰿅 Quit', '<cmd>qa<CR>'),
}

-- local function footer()
-- return "Footer Text"
-- end

-- dashboard.section.footer.val = vim.split('\n\n' .. getGreeting 'Lazy', '\n')

vim.api.nvim_create_autocmd('User', {
pattern = 'LazyVimStarted',
desc = 'Add Alpha dashboard footer',
once = true,
callback = function()
local stats = require('lazy').stats()
local ms = math.floor(stats.startuptime * 100 + 0.5) / 100
dashboard.section.footer.val = { ' ', ' ', ' ', ' Loaded ' .. stats.count .. ' plugins  in ' .. ms .. ' ms ' }
dashboard.section.header.opts.hl = 'DashboardFooter'
pcall(vim.cmd.AlphaRedraw)
end,
})

dashboard.opts.opts.noautocmd = true
alpha.setup(dashboard.opts)
end,
}
1 change: 1 addition & 0 deletions lua/custom/plugins/emoji.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
return { "xiyaowong/telescope-emoji" }
8 changes: 8 additions & 0 deletions lua/custom/plugins/gitflog.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
return {
"rbong/vim-flog",
lazy = true,
cmd = { "Flog", "Flogsplit", "Floggit" },
dependencies = {
"tpope/vim-fugitive",
},
}
32 changes: 32 additions & 0 deletions lua/custom/plugins/gitgraph.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
return {
'isakbm/gitgraph.nvim',
---@type I.GGConfig
opts = {
symbols = {
merge_commit = 'M',
commit = '*',

},
format = {
timestamp = '%H:%M:%S %d-%m-%Y',
fields = { 'hash', 'timestamp', 'author', 'branch_name', 'tag' },
},
hooks = {
on_select_commit = function(commit)
print('selected commit:', commit.hash)
end,
on_select_range_commit = function(from, to)
print('selected range:', from.hash, to.hash)
end,
},
},
keys = {
{
"<leader>gl",
function()
require('gitgraph').draw({}, { all = true, max_count = 5000 })
end,
desc = "GitGraph - Draw",
},
},
}
6 changes: 6 additions & 0 deletions lua/custom/plugins/inc-rename.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
return {
'smjonas/inc-rename.nvim',
config = function()
require('inc_rename').setup()
end,
}
78 changes: 77 additions & 1 deletion lua/custom/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,80 @@
-- I promise not to create any merge conflicts in this directory :)
--
-- See the kickstart.nvim README for more information
return {}
return {

{
'folke/ts-comments.nvim',
opts = {
{
lang = {
astro = '<!-- %s -->',
axaml = '<!-- %s -->',
blueprint = '// %s',
c = '// %s',
c_sharp = '// %s',
clojure = { ';; %s', '; %s' },
cpp = '// %s',
cs_project = '<!-- %s -->',
cue = '// %s',
fsharp = '// %s',
fsharp_project = '<!-- %s -->',
gleam = '// %s',
glimmer = '{{! %s }}',
graphql = '# %s',
handlebars = '{{! %s }}',
hcl = '# %s',
html = '<!-- %s -->',
hyprlang = '# %s',
ini = '; %s',
ipynb = '# %s',
javascript = {
'// %s', -- default commentstring when no treesitter node matches
'/* %s */',
call_expression = '// %s', -- specific commentstring for call_expression
jsx_attribute = '// %s',
jsx_element = '{/* %s */}',
jsx_fragment = '{/* %s */}',
spread_element = '// %s',
statement_block = '// %s',
},
kdl = '// %s',
php = '// %s',
rego = '# %s',
rescript = '// %s',
rust = { '// %s', '/* %s */' },
sql = '-- %s',
styled = '/* %s */',
svelte = '<!-- %s -->',
templ = {
'// %s',
component_block = '<!-- %s -->',
},
terraform = '# %s',
tsx = {
'// %s', -- default commentstring when no treesitter node matches
'/* %s */',
call_expression = '// %s', -- specific commentstring for call_expression
jsx_attribute = '// %s',
jsx_element = '{/* %s */}',
jsx_fragment = '{/* %s */}',
spread_element = '// %s',
statement_block = '// %s',
},
twig = '{# %s #}',
typescript = { '// %s', '/* %s */' }, -- langs can have multiple commentstrings
vue = '<!-- %s -->',
xaml = '<!-- %s -->',
},
},
},
event = 'VeryLazy',
enabled = vim.fn.has 'nvim-0.10.0' == 1,
},
{
'NvChad/nvim-colorizer.lua',
event = 'BufReadPre',
opts = { -- set to setup table
},
},
}
4 changes: 4 additions & 0 deletions lua/custom/plugins/lualine.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
return {
'nvim-lualine/lualine.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
}
7 changes: 7 additions & 0 deletions lua/custom/plugins/nerdicons.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
return {
"glepnir/nerdicons.nvim",
cmd = "NerdIcons",
config = function()
require("nerdicons").setup({})
end,
}
Loading
Loading