📦 Initial Commit
This commit is contained in:
parent
5125fd927a
commit
e77acb091e
23 changed files with 516 additions and 24 deletions
15
lua/custom/plugins/autopairs.lua
Normal file
15
lua/custom/plugins/autopairs.lua
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
return {
|
||||
"windwp/nvim-autopairs",
|
||||
-- Optional dependency
|
||||
dependencies = { 'hrsh7th/nvim-cmp' },
|
||||
config = function()
|
||||
require("nvim-autopairs").setup {}
|
||||
-- If you want to automatically add `(` after selecting a function or method
|
||||
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
||||
local cmp = require('cmp')
|
||||
cmp.event:on(
|
||||
'confirm_done',
|
||||
cmp_autopairs.on_confirm_done()
|
||||
)
|
||||
end,
|
||||
}
|
||||
19
lua/custom/plugins/bufferline.lua
Normal file
19
lua/custom/plugins/bufferline.lua
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
return {
|
||||
'akinsho/bufferline.nvim',
|
||||
version = "*",
|
||||
dependencies = 'nvim-tree/nvim-web-devicons',
|
||||
config = function()
|
||||
vim.opt.termguicolors = true
|
||||
require('bufferline').setup({
|
||||
options = {
|
||||
diagnostics = "nvim_lsp",
|
||||
hover = {
|
||||
enabled = true,
|
||||
delay = 200,
|
||||
reveal = {'close'}
|
||||
}
|
||||
}
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
6
lua/custom/plugins/color_highlight.lua
Normal file
6
lua/custom/plugins/color_highlight.lua
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
'brenoprata10/nvim-highlight-colors',
|
||||
config = function ()
|
||||
require('nvim-highlight-colors').setup {}
|
||||
end,
|
||||
}
|
||||
7
lua/custom/plugins/colorpicker.lua
Normal file
7
lua/custom/plugins/colorpicker.lua
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
return {
|
||||
"max397574/colortils.nvim",
|
||||
cmd = "Colortils",
|
||||
config = function()
|
||||
require("colortils").setup()
|
||||
end,
|
||||
}
|
||||
15
lua/custom/plugins/cursorline.lua
Normal file
15
lua/custom/plugins/cursorline.lua
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
return {
|
||||
'yamatsum/nvim-cursorline',
|
||||
opts = {
|
||||
cursorline = {
|
||||
enable = true,
|
||||
timeout = 0,
|
||||
number = false,
|
||||
},
|
||||
cursorword = {
|
||||
enable = true,
|
||||
min_length = 3,
|
||||
hl = { underline = true },
|
||||
}
|
||||
}
|
||||
}
|
||||
3
lua/custom/plugins/cursorword.lua
Normal file
3
lua/custom/plugins/cursorword.lua
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
return {
|
||||
'xiyaowong/nvim-cursorword',
|
||||
}
|
||||
62
lua/custom/plugins/dashboard.lua
Normal file
62
lua/custom/plugins/dashboard.lua
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
return {
|
||||
"goolord/alpha-nvim",
|
||||
event = "VimEnter",
|
||||
dependencies = { {'nvim-tree/nvim-web-devicons'}},
|
||||
opts = function()
|
||||
local dashboard = require("alpha.themes.dashboard")
|
||||
local logo = [[
|
||||
██████╗ ██████╗ ██████╗ ██╗
|
||||
██╔══██╗██╔═══██╗██╔══██╗██║
|
||||
██████╔╝██║ ██║██████╔╝██║
|
||||
██╔══██╗██║ ██║██╔══██╗██║
|
||||
██║ ██║╚██████╔╝██║ ██║██║
|
||||
╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝
|
||||
]]
|
||||
|
||||
dashboard.section.header.val = vim.split(logo, "\n")
|
||||
dashboard.section.buttons.val = {
|
||||
dashboard.button("f", " " .. " Find file", ":Telescope find_files <CR>"),
|
||||
dashboard.button("n", " " .. " New file", ":ene <BAR> startinsert <CR>"),
|
||||
dashboard.button("r", " " .. " Recent files", ":Telescope oldfiles <CR>"),
|
||||
dashboard.button("g", " " .. " Find text", ":Telescope live_grep <CR>"),
|
||||
dashboard.button("c", " " .. " Config", ":e $MYVIMRC <CR>"),
|
||||
dashboard.button("s", " " .. " Restore Session", [[:lua require("persistence").load() <cr>]]),
|
||||
dashboard.button("l", " " .. " Lazy", ":Lazy<CR>"),
|
||||
dashboard.button("q", " " .. " Quit", ":qa<CR>"),
|
||||
}
|
||||
for _, button in ipairs(dashboard.section.buttons.val) do
|
||||
button.opts.hl = "AlphaButtons"
|
||||
button.opts.hl_shortcut = "AlphaShortcut"
|
||||
end
|
||||
dashboard.section.header.opts.hl = "AlphaHeader"
|
||||
dashboard.section.buttons.opts.hl = "AlphaButtons"
|
||||
dashboard.section.footer.opts.hl = "AlphaFooter"
|
||||
dashboard.opts.layout[1].val = 8
|
||||
return dashboard
|
||||
end,
|
||||
config = function(_, dashboard)
|
||||
-- close Lazy and re-open when the dashboard is ready
|
||||
if vim.o.filetype == "lazy" then
|
||||
vim.cmd.close()
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "AlphaReady",
|
||||
callback = function()
|
||||
require("lazy").show()
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
require("alpha").setup(dashboard.opts)
|
||||
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "LazyVimStarted",
|
||||
callback = function()
|
||||
local stats = require("lazy").stats()
|
||||
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
||||
dashboard.section.footer.val = "⚡ Rori's Editor loaded " .. stats.count .. " plugins in " .. ms .. "ms"
|
||||
pcall(vim.cmd.AlphaRedraw)
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
12
lua/custom/plugins/discord_presence.lua
Normal file
12
lua/custom/plugins/discord_presence.lua
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
return {
|
||||
'andweeb/presence.nvim',
|
||||
opts = {
|
||||
editing_text = "🛠️ Editing %s",
|
||||
file_explorer_text = "📝 Browsing %s",
|
||||
git_commit_text = "📝 Committing changes",
|
||||
plugin_manager_text = "📦 Managing plugins",
|
||||
reading_text = "📝 Reading %s",
|
||||
workspace_text = "🔨 Working on %s",
|
||||
line_number_text = "📝 Line %s out of %s",
|
||||
}
|
||||
}
|
||||
16
lua/custom/plugins/fold.lua
Normal file
16
lua/custom/plugins/fold.lua
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
return {
|
||||
'anuvyklack/pretty-fold.nvim',
|
||||
config = function()
|
||||
require('pretty-fold').ft_setup('lua', {
|
||||
matchup_patterns = {
|
||||
{ '^%s*do$', 'end' }, -- do ... end blocks
|
||||
{ '^%s*if', 'end' }, -- if ... end
|
||||
{ '^%s*for', 'end' }, -- for
|
||||
{ 'function%s*%(', 'end' }, -- 'function( or 'function (''
|
||||
{ '{', '}' },
|
||||
{ '%(', ')' }, -- % to escape lua pattern char
|
||||
{ '%[', ']' }, -- % to escape lua pattern char
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
@ -2,4 +2,51 @@
|
|||
-- I promise not to create any merge conflicts in this directory :)
|
||||
--
|
||||
-- See the kickstart.nvim README for more information
|
||||
return {}
|
||||
|
||||
function load_plugin (name)
|
||||
return require('custom.plugins.' .. name)
|
||||
end
|
||||
|
||||
return {
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
'preservim/nerdtree',
|
||||
|
||||
'hrsh7th/nvim-cmp',
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-buffer',
|
||||
'hrsh7th/cmp-path',
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
'hrsh7th/cmp-nvim-lua',
|
||||
'jose-elias-alvarez/null-ls.nvim',
|
||||
'simrat39/rust-tools.nvim',
|
||||
-- 'jose-elias-alvarez/nvim-lsp-ts-utils',
|
||||
{
|
||||
'p00f/clangd_extensions.nvim',
|
||||
lazy = false,
|
||||
},
|
||||
|
||||
'L3MON4D3/LuaSnip',
|
||||
'rafamadriz/friendly-snippets',
|
||||
|
||||
'RRethy/vim-illuminate',
|
||||
'ray-x/lsp_signature.nvim',
|
||||
'nvim-treesitter/nvim-treesitter-context',
|
||||
|
||||
|
||||
load_plugin('discord_presence'),
|
||||
|
||||
load_plugin('oil'),
|
||||
load_plugin('bufferline'),
|
||||
load_plugin('terminal'),
|
||||
load_plugin('autopairs'),
|
||||
load_plugin('dashboard'),
|
||||
load_plugin('todocomment'),
|
||||
load_plugin('notify'),
|
||||
load_plugin('cursorword'),
|
||||
load_plugin('cursorline'),
|
||||
load_plugin('transparent'),
|
||||
load_plugin('fold'),
|
||||
load_plugin('colorpicker'),
|
||||
load_plugin('color_highlight'),
|
||||
}
|
||||
|
||||
|
|
|
|||
20
lua/custom/plugins/inlayhint.lua
Normal file
20
lua/custom/plugins/inlayhint.lua
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
return {
|
||||
'lvimuser/lsp-inlayhints.nvim',
|
||||
lazy = false,
|
||||
config = function()
|
||||
require('lsp-inlayhints.init').setup();
|
||||
vim.api.nvim_create_augroup("LspAttach_inlayhints", {})
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = "LspAttach_inlayhints",
|
||||
callback = function(args)
|
||||
if not (args.data and args.data.client_id) then
|
||||
return
|
||||
end
|
||||
|
||||
local bufnr = args.buf
|
||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||
require("lsp-inlayhints").on_attach(client, bufnr)
|
||||
end,
|
||||
})
|
||||
end
|
||||
}
|
||||
10
lua/custom/plugins/notify.lua
Normal file
10
lua/custom/plugins/notify.lua
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
return {
|
||||
"rcarriga/nvim-notify",
|
||||
config = function()
|
||||
local notify = require("notify")
|
||||
-- this for transparency
|
||||
notify.setup({ background_colour = "#000000" })
|
||||
-- this overwrites the vim notify function
|
||||
vim.notify = notify.notify
|
||||
end
|
||||
}
|
||||
6
lua/custom/plugins/oil.lua
Normal file
6
lua/custom/plugins/oil.lua
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
'stevearc/oil.nvim',
|
||||
opts = {},
|
||||
-- Optional dependencies
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
}
|
||||
27
lua/custom/plugins/terminal.lua
Normal file
27
lua/custom/plugins/terminal.lua
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
return {
|
||||
"numToStr/FTerm.nvim",
|
||||
opts = {
|
||||
cmd = "bash",
|
||||
blend = 50,
|
||||
width = function()
|
||||
return vim.opt.columns * 20
|
||||
end,
|
||||
}
|
||||
}
|
||||
-- return {
|
||||
-- "akinsho/toggleterm.nvim",
|
||||
-- -- cmd = { "ToggleTerm", "TermExec" },
|
||||
-- opts = {
|
||||
-- size = function()
|
||||
-- return vim.opt.columns * 20
|
||||
-- end,
|
||||
-- hide_numbers = false,
|
||||
-- shading_factor = 2,
|
||||
-- direction = "float",
|
||||
-- float_opts = {
|
||||
-- border = "curved",
|
||||
-- highlights = { border = "Normal", background = "Normal" },
|
||||
-- },
|
||||
-- },
|
||||
-- }
|
||||
--
|
||||
15
lua/custom/plugins/todocomment.lua
Normal file
15
lua/custom/plugins/todocomment.lua
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
return {
|
||||
"folke/todo-comments.nvim",
|
||||
cmd = { "TodoTrouble", "TodoTelescope" }, event = { "BufReadPost", "BufNewFile" },
|
||||
config = true,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
||||
{ "<leader>xt", "<cmd>TodoTrouble<cr>", desc = "Todo (Trouble)" },
|
||||
{ "<leader>xT", "<cmd>TodoTrouble keywords=TODO,FIX,FIXME<cr>", desc = "Todo/Fix/Fixme (Trouble)" },
|
||||
{ "<leader>st", "<cmd>TodoTelescope<cr>", desc = "Todo" },
|
||||
{ "<leader>sT", "<cmd>TodoTelescope keywords=TODO,FIX,FIXME<cr>", desc = "Todo/Fix/Fixme" },
|
||||
},
|
||||
}
|
||||
|
||||
9
lua/custom/plugins/transparent.lua
Normal file
9
lua/custom/plugins/transparent.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
return {
|
||||
'xiyaowong/transparent.nvim',
|
||||
opts = {
|
||||
extra_groups = {
|
||||
"NormalFloat", -- plugins which have float panel such as Lazy, Mason, LspInfo
|
||||
"NvimTreeNormal", -- NvimTree
|
||||
},
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue