mirror of
https://github.com/Cian-H/dotfiles.git
synced 2026-01-22 18:39:05 +00:00
Fresh start to remove subtree artifacts
This commit is contained in:
@@ -17,29 +17,14 @@ return { -- Mini is so varied it's hard to categorise. So i dumped my mini insta
|
||||
-- - sr)' - [S]urround [R]eplace [)] [']
|
||||
require("mini.surround").setup()
|
||||
|
||||
-- Simple and easy statusline.
|
||||
-- You could remove this setup call if you don't like it,
|
||||
-- and try some other statusline plugin
|
||||
-- local statusline = require("mini.statusline")
|
||||
-- set use_icons to true if you have a Nerd Font
|
||||
-- statusline.setup({ use_icons = vim.g.have_nerd_font })
|
||||
|
||||
-- You can configure sections in the statusline by overriding their
|
||||
-- default behavior. For example, here we set the section for
|
||||
-- cursor location to LINE:COLUMN
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
-- statusline.section_location = function()
|
||||
-- return "%2l:%-2v"
|
||||
-- end
|
||||
|
||||
-- Setup of mini.notify
|
||||
-- local notify = require("mini.notify")
|
||||
-- notify.setup()
|
||||
-- vim.notify = notify.make_notify({
|
||||
-- ERROR = { duration = 5000 },
|
||||
-- WARN = { duration = 4000 },
|
||||
-- INFO = { duration = 3000 },
|
||||
-- })
|
||||
local notify = require("mini.notify")
|
||||
notify.setup()
|
||||
vim.notify = notify.make_notify({
|
||||
ERROR = { duration = 5000 },
|
||||
WARN = { duration = 4000 },
|
||||
INFO = { duration = 3000 },
|
||||
})
|
||||
|
||||
-- Some other mini.nvim plugins that look useful to me
|
||||
require("mini.clue").setup()
|
||||
@@ -51,28 +36,68 @@ return { -- Mini is so varied it's hard to categorise. So i dumped my mini insta
|
||||
require("mini.trailspace").setup()
|
||||
|
||||
-- My custom mini.starter config
|
||||
|
||||
-- This function runs a vim command then exits the buffer that called it
|
||||
function _Launch_Vim_Cmd(cmd)
|
||||
local startbuf = vim.api.nvim_get_current_buf()
|
||||
vim.cmd(cmd)
|
||||
vim.api.nvim_buf_delete(startbuf, {})
|
||||
end
|
||||
|
||||
local custom_items = {
|
||||
local starter_items = {
|
||||
{
|
||||
name = "Status",
|
||||
action = "Git status",
|
||||
section = "Git",
|
||||
action = "Telescope file_browser",
|
||||
name = "Tree",
|
||||
section = "Telescope",
|
||||
},
|
||||
{
|
||||
action = "Telescope live_grep",
|
||||
name = "Live grep",
|
||||
section = "Telescope",
|
||||
},
|
||||
{
|
||||
action = "Telescope find_files",
|
||||
name = "File grep",
|
||||
section = "Telescope",
|
||||
},
|
||||
{
|
||||
action = "Telescope command_history",
|
||||
name = "Command history",
|
||||
section = "Telescope",
|
||||
},
|
||||
{
|
||||
action = "Telescope help_tags",
|
||||
name = "Help tags",
|
||||
section = "Telescope",
|
||||
},
|
||||
{
|
||||
name = "Log",
|
||||
action = [[lua _Launch_Vim_Cmd("Git log --graph --pretty=oneline --abbrev-commit")]],
|
||||
action = [[lua Snacks.lazygit.log()]],
|
||||
section = "Git",
|
||||
},
|
||||
{
|
||||
name = "Lazygit",
|
||||
action = "LazyGit",
|
||||
action = [[lua Snacks.lazygit()]],
|
||||
section = "Git",
|
||||
},
|
||||
{
|
||||
name = "Browser",
|
||||
action = function()
|
||||
local handle = io.popen("git remote show")
|
||||
if handle == nil then
|
||||
vim.notify("Failed to find remote", vim.log.levels.ERROR)
|
||||
return
|
||||
end
|
||||
local result = handle:read("*a")
|
||||
handle:close()
|
||||
local remote = vim.split(result, "\n")[1]
|
||||
handle = io.popen("git remote get-url " .. remote)
|
||||
if handle == nil then
|
||||
vim.notify("Failed to get url for " .. remote, vim.log.levels.ERROR)
|
||||
return
|
||||
end
|
||||
local url = handle:read("*a")
|
||||
handle:close()
|
||||
handle = io.popen("xdg-open " .. url)
|
||||
if handle == nil then
|
||||
vim.notify("Failed to open " .. url, vim.log.levels.ERROR)
|
||||
return
|
||||
end
|
||||
result = handle:read("*a")
|
||||
handle:close()
|
||||
end,
|
||||
section = "Git",
|
||||
},
|
||||
{
|
||||
@@ -96,11 +121,8 @@ return { -- Mini is so varied it's hard to categorise. So i dumped my mini insta
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⣷⡀⠀⠀⠀⠀⢹⣿⣆⠀⠀⠀⠀⠀\
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⡇⠀⠀⠀⠀⠸⣿⣿⡄⠀⠀⠀⠀\
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠁⠀⠀⠀⠀⠀⡿⣿⣿⠀⠀⠀⠀\
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠀⠀⠀⠀⠀",
|
||||
items = {
|
||||
require("mini.starter").sections.telescope(),
|
||||
custom_items,
|
||||
},
|
||||
⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠈⠙⠀⠀⠀⠀⠀",
|
||||
items = starter_items,
|
||||
footer = "",
|
||||
})
|
||||
end,
|
||||
|
||||
14
dot_config/nvim/lua/plugins/snacks.lua
Normal file
14
dot_config/nvim/lua/plugins/snacks.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
return {
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
---@type snacks.Config
|
||||
opts = {
|
||||
bigfile = { enabled = true },
|
||||
lazygit = { enabled = true },
|
||||
quickfile = { enabled = true },
|
||||
},
|
||||
keys = require("config.keys").lazygit,
|
||||
},
|
||||
}
|
||||
@@ -98,12 +98,12 @@ return { -- UI components and other visual elements are declared here
|
||||
{
|
||||
"harpoon2",
|
||||
icon = "",
|
||||
indicators = { "H", "J", "K", "L" },
|
||||
indicators = { "A", "S", "D", "F" },
|
||||
active_indicators = {
|
||||
"%#LualineHarpoonActive#H%*",
|
||||
"%#LualineHarpoonActive#J%*",
|
||||
"%#LualineHarpoonActive#K%*",
|
||||
"%#LualineHarpoonActive#L%*",
|
||||
"%#LualineHarpoonActive#A%*",
|
||||
"%#LualineHarpoonActive#S%*",
|
||||
"%#LualineHarpoonActive#D%*",
|
||||
"%#LualineHarpoonActive#F%*",
|
||||
},
|
||||
_separator = "∙",
|
||||
no_harpoon = "Harpoon not loaded",
|
||||
|
||||
@@ -42,21 +42,6 @@ return { -- General programming utilities go here
|
||||
},
|
||||
"tpope/vim-fugitive", -- Also want to add fugitive, since it's apparently a great git plugin
|
||||
"jlfwong/vim-mercenary", -- Mercenary is the mercurial equivalent of fugitive
|
||||
{
|
||||
"kdheepak/lazygit.nvim",
|
||||
cmd = {
|
||||
"LazyGit",
|
||||
"LazyGitConfig",
|
||||
"LazyGitCurrentFile",
|
||||
"LazyGitFilter",
|
||||
"LazyGitFilterCurrentFile",
|
||||
},
|
||||
-- optional for floating window border decoration
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
keys = require("config.keys").lazygit,
|
||||
},
|
||||
{ -- Oil is a very nice buffer-based filetree editor
|
||||
"stevearc/oil.nvim",
|
||||
event = "VeryLazy",
|
||||
@@ -167,19 +152,19 @@ return { -- General programming utilities go here
|
||||
-- No, but seriously. Please read `:help ins-completion`, it is really good!
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
-- Select the [n]ext item
|
||||
["<C-n>"] = cmp.mapping.select_next_item(),
|
||||
["<M-n>"] = cmp.mapping.select_next_item(),
|
||||
-- Select the [p]revious item
|
||||
["<C-p>"] = cmp.mapping.select_prev_item(),
|
||||
["<M-p>"] = cmp.mapping.select_prev_item(),
|
||||
|
||||
-- Accept ([y]es) the completion.
|
||||
-- This will auto-import if your LSP supports it.
|
||||
-- This will expand snippets if the LSP sent a snippet.
|
||||
["<C-y>"] = cmp.mapping.confirm({ select = true }),
|
||||
["<M-y>"] = cmp.mapping.confirm({ select = true }),
|
||||
|
||||
-- Manually trigger a completion from nvim-cmp.
|
||||
-- Generally you don't need this, because nvim-cmp will display
|
||||
-- completions whenever it has completion options available.
|
||||
["<C-Space>"] = cmp.mapping.complete({}),
|
||||
["<M-Space>"] = cmp.mapping.complete({}),
|
||||
|
||||
-- Think of <c-l> as moving to the right of your snippet expansion.
|
||||
-- So if you have a snippet that's like:
|
||||
@@ -189,12 +174,12 @@ return { -- General programming utilities go here
|
||||
--
|
||||
-- <c-,> will move you to the right of each of the expansion locations.
|
||||
-- <c-.> is similar, except moving you backwards.
|
||||
["<C-,>"] = cmp.mapping(function()
|
||||
["<M-,>"] = cmp.mapping(function()
|
||||
if luasnip.expand_or_locally_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<C-.>"] = cmp.mapping(function()
|
||||
["<M-.>"] = cmp.mapping(function()
|
||||
if luasnip.locally_jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user