refactor: restructure core modules into config directory for better organization
This commit is contained in:
29 files changed
+1751
-1924
No files matched your search
+164
-40
@@ -1,11 +1,75 @@
|
||||
return {
|
||||
|
||||
-- gitignore generator
|
||||
{
|
||||
'zbirenbaum/neodim',
|
||||
"wintermute-cell/gitignore.nvim",
|
||||
cmd = { "Gitignore" },
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- git signs
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
events = { "BufReadPost", "BufNewFile" },
|
||||
opts = {
|
||||
signcolumn = true,
|
||||
current_line_blame = true,
|
||||
attach_to_untracked = false,
|
||||
watch_gitdir = {
|
||||
follow_files = true,
|
||||
},
|
||||
signs = {
|
||||
add = { text = " " },
|
||||
change = { text = " " },
|
||||
delete = { text = " " },
|
||||
topdelete = { text = " " },
|
||||
changedelete = { text = " " },
|
||||
untracked = { text = " " },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Todo Comments
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
event = "BufRead",
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- Working with file permissions
|
||||
{
|
||||
"lambdalisue/vim-suda",
|
||||
cmd = { "SudaRead", "SudaWrite" },
|
||||
},
|
||||
|
||||
-- Undo tree
|
||||
{
|
||||
"mbbill/undotree",
|
||||
cmd = "UndotreeToggle",
|
||||
keys = { { "<leader>u", "<cmd>UndotreeToggle<cr>", desc = "Undo Tree" } },
|
||||
},
|
||||
|
||||
-- visual multi
|
||||
{
|
||||
"mg979/vim-visual-multi",
|
||||
event = "VeryLazy",
|
||||
init = function()
|
||||
vim.g.VM_maps = {
|
||||
["Find Under"] = "<M-d>",
|
||||
["Find Subword Under"] = "<M-d>",
|
||||
["Select All"] = "<C-M-d>",
|
||||
["Add Cursor Down"] = "<C-M-j>",
|
||||
["Add Cursor Up"] = "<C-M-k>",
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
-- dimming the highlights of unused functions, variables, parameters, and more
|
||||
{
|
||||
"zbirenbaum/neodim",
|
||||
enabled = false,
|
||||
event = 'LspAttach',
|
||||
event = "LspAttach",
|
||||
config = function()
|
||||
require('neodim').setup({
|
||||
require("neodim").setup({
|
||||
alpha = 0.5,
|
||||
blend_color = nil,
|
||||
hide = {
|
||||
@@ -14,9 +78,9 @@ return {
|
||||
signs = true,
|
||||
},
|
||||
regex = {
|
||||
'[uU]nused',
|
||||
'[nN]ever [rR]ead',
|
||||
'[nN]ot [rR]ead',
|
||||
"[uU]nused",
|
||||
"[nN]ever [rR]ead",
|
||||
"[nN]ot [rR]ead",
|
||||
},
|
||||
priority = 128,
|
||||
disable = {},
|
||||
@@ -24,50 +88,110 @@ return {
|
||||
end,
|
||||
},
|
||||
|
||||
-- comment
|
||||
-- file operations
|
||||
{
|
||||
'numToStr/Comment.nvim',
|
||||
dependencies = {
|
||||
'JoosepAlviste/nvim-ts-context-commentstring',
|
||||
"chrisgrieser/nvim-genghis",
|
||||
keys = {
|
||||
{
|
||||
"<leader>fn",
|
||||
function()
|
||||
require("genghis").createNewFile()
|
||||
end,
|
||||
desc = "New File",
|
||||
},
|
||||
{
|
||||
"<leader>fd",
|
||||
function()
|
||||
require("genghis").duplicateFile()
|
||||
end,
|
||||
desc = "Duplicate File",
|
||||
},
|
||||
{
|
||||
"<leader>fr",
|
||||
function()
|
||||
require("genghis").renameFile()
|
||||
end,
|
||||
desc = "Rename File",
|
||||
},
|
||||
{
|
||||
"<leader>fx",
|
||||
function()
|
||||
require("genghis").chmodx()
|
||||
end,
|
||||
desc = "Make Executable",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Better folding
|
||||
{
|
||||
"kevinhwang91/nvim-ufo",
|
||||
dependencies = "kevinhwang91/promise-async",
|
||||
event = "BufReadPost",
|
||||
keys = {
|
||||
{
|
||||
"zR",
|
||||
function()
|
||||
require("ufo").openAllFolds()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"zM",
|
||||
function()
|
||||
require("ufo").closeAllFolds()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"zr",
|
||||
function()
|
||||
require("ufo").openFoldsExceptKinds()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"zm",
|
||||
function()
|
||||
require("ufo").closeFoldsWith()
|
||||
end,
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require('Comment').setup({
|
||||
pre_hook = require('ts_context_commentstring.integrations.comment_nvim').create_pre_hook(),
|
||||
mappings = {
|
||||
basic = true,
|
||||
extra = true,
|
||||
},
|
||||
vim.o.foldcolumn = "1"
|
||||
vim.o.foldlevel = 99
|
||||
vim.o.foldlevelstart = 99
|
||||
vim.o.foldenable = true
|
||||
|
||||
require("ufo").setup({
|
||||
provider_selector = function()
|
||||
return { "treesitter", "indent" }
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- rendering for html and markdown
|
||||
{
|
||||
"OXY2DEV/markview.nvim",
|
||||
lazy = false,
|
||||
-- to load before treesitter
|
||||
priority = 45,
|
||||
opts = {
|
||||
preview = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ 'gcc', mode = 'n', desc = 'Toggle comment line' },
|
||||
{ 'gc', mode = { 'n', 'o' }, desc = 'Toggle comment linewise' },
|
||||
{ 'gc', mode = 'x', desc = 'Toggle comment linewise (visual)' },
|
||||
{ 'gbc', mode = 'n', desc = 'Toggle comment block' },
|
||||
{ 'gb', mode = { 'n', 'o' }, desc = 'Toggle comment blockwise' },
|
||||
{ 'gb', mode = 'x', desc = 'Toggle comment blockwise (visual)' },
|
||||
{ "<leader>cv", "<Cmd>Markview toggle<CR>", desc = "Toggle markdown preview", mode = "n" },
|
||||
},
|
||||
},
|
||||
|
||||
-- Todo Comments
|
||||
-- markdown preview
|
||||
{
|
||||
'folke/todo-comments.nvim',
|
||||
event = 'BufRead',
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- visual multi
|
||||
{
|
||||
'mg979/vim-visual-multi',
|
||||
event = 'VeryLazy',
|
||||
"iamcco/markdown-preview.nvim",
|
||||
build = "cd app && yarn install",
|
||||
init = function()
|
||||
vim.g.VM_maps = {
|
||||
['Find Under'] = '<M-d>',
|
||||
['Find Subword Under'] = '<M-d>',
|
||||
['Select All'] = '<C-M-d>',
|
||||
['Add Cursor Down'] = '<C-M-j>',
|
||||
['Add Cursor Up'] = '<C-M-k>',
|
||||
}
|
||||
vim.g.mkdp_filetypes = { "markdown" }
|
||||
end,
|
||||
ft = "markdown",
|
||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview" },
|
||||
},
|
||||
}
|
||||
Reference in new issue
Block a user