-
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
375 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,63 @@ | ||
return { | ||
"nvimdev/dashboard-nvim", | ||
event = "VimEnter", | ||
opts = function() | ||
local logo = [[ | ||
████████╗███████╗ ██████╗██╗ ██╗██████╗ ██╗ ██╗███████╗██╗ ██╗███████╗ | ||
╚══██╔══╝██╔════╝██╔════╝██║ ██║██╔══██╗██║ ██║██╔════╝██║ ██║██╔════╝ | ||
██║ █████╗ ██║ ███████║██║ ██║██║ ██║█████╗ ██║ ██║███████╗ | ||
██║ ██╔══╝ ██║ ██╔══██║██║ ██║██║ ██║██╔══╝ ██║ ██║╚════██║ | ||
██║ ███████╗╚██████╗██║ ██║██████╔╝╚██████╔╝██║ ╚██████╔╝███████║ | ||
╚═╝ ╚══════╝ ╚═════╝╚═╝ ╚═╝╚═════╝ ╚═════╝ ╚═╝ ╚═════╝ ╚══════╝ | ||
]] | ||
|
||
logo = string.rep("\n", 8) .. logo .. "\n\n" | ||
|
||
local opts = { | ||
theme = "doom", | ||
hide = { | ||
-- this is taken care of by lualine | ||
-- enabling this messes up the actual laststatus setting after loading a file | ||
statusline = false, | ||
}, | ||
config = { | ||
header = vim.split(logo, "\n"), | ||
-- stylua: ignore | ||
center = { | ||
{ action = "Telescope find_files", desc = " Find file", icon = " ", key = "f" }, | ||
{ action = "ene | startinsert", desc = " New file", icon = " ", key = "n" }, | ||
{ action = "Telescope oldfiles", desc = " Recent files", icon = " ", key = "r" }, | ||
{ action = "Telescope live_grep", desc = " Find text", icon = " ", key = "g" }, | ||
-- { action = [[lua require("lazyvim.util").telescope.config_files()()]], desc = " Config", icon = " ", key = "c" }, | ||
-- { action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" }, | ||
-- { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" }, | ||
{ action = "Lazy", desc = " Lazy", icon = " ", key = "l" }, | ||
{ action = "qa", desc = " Quit", icon = " ", key = "q" }, | ||
}, | ||
footer = function() | ||
local stats = require("lazy").stats() | ||
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100) | ||
return { "⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" } | ||
end, | ||
}, | ||
} | ||
|
||
for _, button in ipairs(opts.config.center) do | ||
button.desc = button.desc .. string.rep(" ", 43 - #button.desc) | ||
button.key_format = " %s" | ||
end | ||
|
||
-- 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 = "DashboardLoaded", | ||
callback = function() | ||
require("lazy").show() | ||
end, | ||
}) | ||
end | ||
|
||
return opts | ||
end, | ||
-- "nvimdev/dashboard-nvim", | ||
-- event = "VimEnter", | ||
-- opts = function() | ||
-- local logo = [[ | ||
-- ████████╗███████╗ ██████╗██╗ ██╗██████╗ ██╗ ██╗███████╗██╗ ██╗███████╗ | ||
-- ╚══██╔══╝██╔════╝██╔════╝██║ ██║██╔══██╗██║ ██║██╔════╝██║ ██║██╔════╝ | ||
-- ██║ █████╗ ██║ ███████║██║ ██║██║ ██║█████╗ ██║ ██║███████╗ | ||
-- ██║ ██╔══╝ ██║ ██╔══██║██║ ██║██║ ██║██╔══╝ ██║ ██║╚════██║ | ||
-- ██║ ███████╗╚██████╗██║ ██║██████╔╝╚██████╔╝██║ ╚██████╔╝███████║ | ||
-- ╚═╝ ╚══════╝ ╚═════╝╚═╝ ╚═╝╚═════╝ ╚═════╝ ╚═╝ ╚═════╝ ╚══════╝ | ||
-- ]] | ||
-- | ||
-- logo = string.rep("\n", 8) .. logo .. "\n\n" | ||
-- | ||
-- local opts = { | ||
-- theme = "doom", | ||
-- hide = { | ||
-- -- this is taken care of by lualine | ||
-- -- enabling this messes up the actual laststatus setting after loading a file | ||
-- statusline = false, | ||
-- }, | ||
-- config = { | ||
-- header = vim.split(logo, "\n"), | ||
-- -- stylua: ignore | ||
-- center = { | ||
-- { action = "Telescope find_files", desc = " Find file", icon = " ", key = "f" }, | ||
-- { action = "ene | startinsert", desc = " New file", icon = " ", key = "n" }, | ||
-- { action = "Telescope oldfiles", desc = " Recent files", icon = " ", key = "r" }, | ||
-- { action = "Telescope live_grep", desc = " Find text", icon = " ", key = "g" }, | ||
-- -- { action = [[lua require("lazyvim.util").telescope.config_files()()]], desc = " Config", icon = " ", key = "c" }, | ||
-- -- { action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" }, | ||
-- -- { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" }, | ||
-- { action = "Lazy", desc = " Lazy", icon = " ", key = "l" }, | ||
-- { action = "qa", desc = " Quit", icon = " ", key = "q" }, | ||
-- }, | ||
-- footer = function() | ||
-- local stats = require("lazy").stats() | ||
-- local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100) | ||
-- return { "⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" } | ||
-- end, | ||
-- }, | ||
-- } | ||
-- | ||
-- for _, button in ipairs(opts.config.center) do | ||
-- button.desc = button.desc .. string.rep(" ", 43 - #button.desc) | ||
-- button.key_format = " %s" | ||
-- end | ||
-- | ||
-- -- 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 = "DashboardLoaded", | ||
-- callback = function() | ||
-- require("lazy").show() | ||
-- end, | ||
-- }) | ||
-- end | ||
-- | ||
-- return opts | ||
-- end, | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
return { | ||
'ThePrimeagen/git-worktree.nvim', | ||
dependencies = { "nvim-lua/plenary.nvim" } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,128 @@ | ||
return { | ||
'echasnovski/mini.nvim', | ||
version = '*', | ||
config = function() | ||
require('mini.surround').setup() | ||
end, | ||
-- Comments | ||
{ | ||
'echasnovski/mini.comment', | ||
version = false, | ||
dependencies = { | ||
"JoosepAlviste/nvim-ts-context-commentstring", | ||
}, | ||
config = function() | ||
-- disable the autocommand from ts-context-commentstring | ||
require('ts_context_commentstring').setup { | ||
enable_autocmd = false, | ||
} | ||
|
||
require("mini.comment").setup { | ||
-- tsx, jsx, html , svelte comment support | ||
options = { | ||
custom_commentstring = function() | ||
return require('ts_context_commentstring.internal').calculate_commentstring({ key = | ||
'commentstring' }) | ||
or vim.bo.commentstring | ||
end, | ||
}, | ||
} | ||
end | ||
}, | ||
-- File explorer (this works properly with oil unlike nvim-tree) | ||
{ | ||
'echasnovski/mini.files', | ||
config = function() | ||
local MiniFiles = require("mini.files") | ||
MiniFiles.setup({ | ||
mappings = { | ||
go_in = "<CR>", -- Map both Enter and L to enter directories or open files | ||
go_in_plus = "l", | ||
go_out = "-", | ||
go_out_plus = "h", | ||
}, | ||
|
||
}) | ||
vim.keymap.set("n", "<leader>ee", "<cmd>lua MiniFiles.open()<CR>", { desc = "Toggle mini file explorer" }) -- toggle file explorer | ||
vim.keymap.set("n", "<leader>w", function() | ||
MiniFiles.open(vim.api.nvim_buf_get_name(0), false) | ||
MiniFiles.reveal_cwd() | ||
end, { desc = "Toggle into currently opened file" }) | ||
end, | ||
}, | ||
-- Surround | ||
{ | ||
"echasnovski/mini.surround", | ||
event = { "BufReadPre", "BufNewFile" }, | ||
opts = { | ||
-- Add custom surroundings to be used on top of builtin ones. For more | ||
-- information with examples, see `:h MiniSurround.config`. | ||
custom_surroundings = nil, | ||
|
||
-- Duration (in ms) of highlight when calling `MiniSurround.highlight()` | ||
highlight_duration = 300, | ||
|
||
-- Module mappings. Use `''` (empty string) to disable one. | ||
-- INFO: | ||
-- saiw surround with no whitespace | ||
-- saw surround with whitespace | ||
mappings = { | ||
add = 'sa', -- Add surrounding in Normal and Visual modes | ||
delete = 'sd', -- Delete surrounding | ||
find = 'sf', -- Find surrounding (to the right) | ||
find_left = 'sF', -- Find surrounding (to the left) | ||
highlight = 'sh', -- Highlight surrounding | ||
replace = 'sr', -- Replace surrounding | ||
update_n_lines = 'sn', -- Update `n_lines` | ||
|
||
suffix_last = 'l', -- Suffix to search with "prev" method | ||
suffix_next = 'n', -- Suffix to search with "next" method | ||
}, | ||
|
||
-- Number of lines within which surrounding is searched | ||
n_lines = 20, | ||
|
||
-- Whether to respect selection type: | ||
-- - Place surroundings on separate lines in linewise mode. | ||
-- - Place surroundings on each line in blockwise mode. | ||
respect_selection_type = false, | ||
|
||
-- How to search for surrounding (first inside current line, then inside | ||
-- neighborhood). One of 'cover', 'cover_or_next', 'cover_or_prev', | ||
-- 'cover_or_nearest', 'next', 'prev', 'nearest'. For more details, | ||
-- see `:h MiniSurround.config`. | ||
search_method = 'cover', | ||
|
||
-- Whether to disable showing non-error feedback | ||
silent = false, | ||
}, | ||
}, | ||
-- Get rid of whitespace | ||
{ | ||
"echasnovski/mini.trailspace", | ||
event = { "BufReadPost", "BufNewFile" }, | ||
config = function() | ||
local miniTrailspace = require("mini.trailspace") | ||
|
||
miniTrailspace.setup({ | ||
only_in_normal_buffers = true, | ||
}) | ||
vim.keymap.set("n", "<leader>cw", function() miniTrailspace.trim() end, { desc = "Erase Whitespace" }) | ||
|
||
-- Ensure highlight never reappears by removing it on CursorMoved | ||
vim.api.nvim_create_autocmd("CursorMoved", { | ||
pattern = "*", | ||
callback = function() | ||
require("mini.trailspace").unhighlight() | ||
end, | ||
}) | ||
end, | ||
}, | ||
-- Split & join | ||
{ | ||
"echasnovski/mini.splitjoin", | ||
config = function() | ||
local miniSplitJoin = require("mini.splitjoin") | ||
miniSplitJoin.setup({ | ||
mappings = { toggle = "" }, -- Disable default mapping | ||
}) | ||
vim.keymap.set({"n", "x"}, "sj", function() miniSplitJoin.join() end, {desc = "Join arguments"}) | ||
vim.keymap.set({ "n", "x" }, "sk", function() miniSplitJoin.split() end, { desc = "Split arguments" }) | ||
end, | ||
}, | ||
} |
Oops, something went wrong.