init: new dotfile configuration

Remove all org files using a new script to more config over, The old org
file configuaration were great but required org. This new version only
requires the scripts that is included in the repo.

The configuration are all done but have not ported the theming system
yet.

Signed-off-by: Steve Beaulac <steve@sagacity.ca>
Change-Id: I14cd7fe058a71c8ba9d6d35397dc8d7e6a6a6964
This commit is contained in:
2026-03-02 13:26:21 -05:00
committed by gitadmin
commit 02a5e0df28
410 changed files with 18546 additions and 0 deletions
+301
View File
@@ -0,0 +1,301 @@
return {
{
"mfussenegger/nvim-ansible",
lazy = true,
keys = function()
vim.keymap.set('v', '<leader>te', function() require('ansible').run() end, { buffer = true, silent = true })
vim.keymap.set('n', '<leader>te', ":w<CR> :lua require('ansible').run()<CR>", { buffer = true, silent = true })
end,
},
{
"hat0uma/csvview.nvim",
---@module "csvview"
---@type CsvView.Options
opts = {
parser = { comments = { "#", "//" } },
keymaps = {
-- Text objects for selecting fields
textobject_field_inner = { "if", mode = { "o", "x" } },
textobject_field_outer = { "af", mode = { "o", "x" } },
-- Excel-like navigation:
-- Use <Tab> and <S-Tab> to move horizontally between fields.
-- Use <Enter> and <S-Enter> to move vertically between rows and place the cursor at the end of the field.
-- Note: In terminals, you may need to enable CSI-u mode to use <S-Tab> and <S-Enter>.
jump_next_field_end = { "<Tab>", mode = { "n", "v" } },
jump_prev_field_end = { "<S-Tab>", mode = { "n", "v" } },
jump_next_row = { "<Enter>", mode = { "n", "v" } },
jump_prev_row = { "<S-Enter>", mode = { "n", "v" } },
},
},
cmd = { "CsvViewEnable", "CsvViewDisable", "CsvViewToggle" },
},
{
"obsidian-nvim/obsidian.nvim",
lazy = false,
ft = "markdown",
keys = {
{ "<leader>kx", "<cmd>Obsidian extract_note<cr>", desc = "Extract Note", mode = "v" },
{ "<leader>knn", "<cmd>Obsidian new<cr>", desc = "New Obsidian note", mode = "n" },
{ "<leader>knt", "<cmd>Obsidian new_from_template<cr>", desc = "New from template", mode = "n" },
{ "<leader>ksq", "<cmd>Obsidian quick_switch<cr>", desc = "Quick Switch", mode = "n" },
{ "<leader>kss", "<cmd>Obsidian search<cr>", desc = "Search Obsidian notes", mode = "n" },
{ "<leader>kdt", "<cmd>Obsidian today<cr>", desc = "Daily Today", mode = "n" },
{ "<leader>kdy", "<cmd>Obsidian yesterday<cr>", desc = "Daily Yesterday", mode = "n" },
{ "<leader>kdw", "<cmd>Obsidian tomorrow<cr>", desc = "Daily Tomorrow", mode = "n" },
{ "<leader>kdd", "<cmd>Obsidian dailies<cr>", desc = "Dailies", mode = "n" },
{ "<leader>kw", "<cmd>Obsidian workspace<cr>", desc = "Change Workspace", mode = "n" },
},
config = function()
require("obsidian").setup({
legacy_commands = false,
picker = {
name = "snacks.pick",
},
ui = {
enable = true,
},
workspaces = {
{
name = "NCA notes",
path = vim.fn.expand "~" .. "/Documents/nca-notes/",
},
},
notes_subdir = "Inbox",
daily_notes = {
folder = "Dailies",
date_format = "%Y-%m-%d-%a",
alias_fomat = "%B %-d, %Y",
default_tags = { "daily-notes" },
},
new_notes_location = "notes_subdir",
templates = {
subdir = "Templates",
date_format = "%Y-%m-%d-%a",
time_format = "%H:%M",
tags = "",
},
completion = {
nvim_cmp = false,
blink = true,
min_chars = 2,
},
preferred_link_style = "wiki",
note_id_func = function(title)
local suffix = ""
if title ~= nil then
suffix = title:gsub(" ", "-"):gsub("[^A-Za-z0-9-]", ""):lower()
else
for _ = 1, 4 do
suffix = suffix .. string.char(math.random(65, 90))
suffix = tostring(os.time()) .. "-" .. suffix
end
end
return suffix
end,
callbacks = {
enter_note = function(note)
vim.keymap.set('n', '<leader>k.', '<CMD>Obsidian toggle_checkbox<CR>', { desc = 'toggle checkbox', buffer = note.bufnr, silent = true })
vim.keymap.set('n', '<leader>kp', '<CMD>Obsidian paste_img<CR>', { desc = 'paste img', buffer = note.bufnr, silent = true })
vim.keymap.set('n', '<leader>kt', '<CMD>Obsidian tags<CR>', { desc = 'tags', buffer = note.bufnr, silent = true })
vim.keymap.set('n', '<leader>k`', '<CMD>Obsidian backlinks<CR>', { desc = 'backlinks', buffer = note.bufnr, silent = true })
vim.keymap.set('n', '<leader>kx', '<CMD>Obsidian follow_link<CR>', { desc = 'follow link', buffer = note.bufnr, silent = true })
vim.keymap.set('n', '<leader>ksl', '<CMD>Obsidian links<CR>', { desc = 'links', buffer = note.bufnr, silent = true })
vim.keymap.set('n', '<leader>kr', '<CMD>Obsidian rename<CR>', { desc = 'rename', buffer = note.bufnr, silent = true })
vim.keymap.set('n', '<leader>ksc', '<CMD>Obsidian toc<CR>', { desc = 'toc', buffer = note.bufnr, silent = true })
vim.keymap.set('v', '<leader>kx', '<CMD>Obsidian link<CR>', { desc = 'links', buffer = note.bufnr, silent = true })
vim.keymap.set('v', '<leader>kl', '<CMD>Obsidian link_new<CR>', { desc = 'links', buffer = note.bufnr, silent = true })
end,
},
})
end,
},
{
"salkin-mada/openscad.nvim",
lazy = true,
config = function()
vim.g.openscad_load_snippets = true
require("openscad").setup({})
end,
dependencies = { "L3MON4D3/LuaSnip", "junegunn/fzf.vim" },
},
{
-- 'nvim-orgmode/orgmode',
'SjB/orgmode',
branch = 'sjb-wip',
event = 'VeryLazy',
ft = { 'org' },
config = function()
-- Setup orgmode
local org = require('orgmode')
-- org.setup_ts_grammar()
org.setup({
ui = {
input = {
use_vim_ui = true
}
},
org_agenda_files = {'~/Documents/notes/*project*org', '~/Documents/notes/Inbox*org', '~/Documents/journals/*.org'},
org_default_notes_file = "~/Documents/notes/Inbox.org",
org_todo_keywords = { 'TODO(t)', 'NEXT(n)', '|', 'DONE(d)', 'DELEGATED(a)' },
mappings = {
capture = {
org_capture_refile = 'R',
}
},
hyperlinks = {
sources = {
-- require("denote.extensions.orgmode"):new({
-- files = _G.denote.config.directory,
-- }),
},
},
org_capture_templates = {
t = {
description = "Todo item",
template = "* TODO %?\n SCHEDULED: %t\n DEADLINE: %T\n", -- Template content
headline = "Tasks",
},
j = {
description = "Journal entry",
target = "~/Documents/notes/journals/%<%Y-%m-%d>.org",
template = "* %<%Y-%m-%d %H:%M> %?\n",
},
},
})
end,
},
{
"akinsho/org-bullets.nvim",
config = function()
require("org-bullets").setup {
concealcursor = false, -- If false then when the cursor is on a line underlying characters are visible
symbols = {
-- list symbol
list = "•",
-- headlines can be a list
headlines = { "◉", "○", "✸", "✿" },
-- or a function that receives the defaults and returns a list
headlines = function(default_list)
table.insert(default_list, "♥")
return default_list
end,
-- or false to disable the symbol. Works for all symbols
headlines = false,
-- or a table of tables that provide a name
-- and (optional) highlight group for each headline level
headlines = {
{ "◉", "MyBulletL1" },
{ "○", "MyBulletL2" },
{ "✸", "MyBulletL3" },
{ "✿", "MyBulletL4" },
},
checkboxes = {
half = { "", "@org.checkbox.halfchecked" },
done = { "✓", "@org.keyword.done" },
todo = { "˟", "@org.keyword.todo" },
},
}
}
end
},
{
"chipsenkbeil/org-roam.nvim",
lazy = true,
ft = { 'org' },
opts = {
bindings = {
prefix = "<LocalLeader>oO",
},
directory = "~/Documents/notes",
extensions = {
dailies = {
directory = "journals"
},
},
},
},
{
"iamcco/markdown-preview.nvim",
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
ft = { "markdown" },
init = function()
vim.g.mkdp_filetypes = { "markdown" }
end,
keys = function()
vim.keymap.set("n", "<leader>xmp", "<cmd>MarkdownPreview<CR>", { desc ="Markdown Preview" })
vim.keymap.set("n", "<leader>xms", "<cmd>MarkdownPreviewStop<CR>", { desc ="Markdown Preview Stop" })
end,
build = function() vim.fn["mkdp#util#install"]() end,
--build = "cd app && npm install",
},
{
"lervag/vimtex",
ft = "tex", -- Load only for .tex files
config = function()
vim.g.tex_flavor = "latex"
vim.g.vimtex_view_method = "zathura" -- Change to your preferred PDF viewer
vim.g.vimtex_quickfix_mode = 0 -- Disable quickfix window
-- vim.opt.conceallevel = 2 -- Enable concealment for nicer inline math display
vim.g.tex_conceal = "abdmg" -- Conceal accents, bold, delimiters, math, Greek
end,
},
{
'MeanderingProgrammer/render-markdown.nvim',
after = { 'nvim-treesitter' },
requires = { 'nvim-tree/nvim-web-devicons', opt = true },
ft = { 'markdown', 'codecompanion', 'copilot-chat' },
---@module 'render-markdown'
---@type render.md.UserConfig
config = function()
require('render-markdown').setup({
completions = { lsp = { enabled = true } },
-- render_modes = { 'n', 'v' },
render_modes = true,
enabled = true,
anti_conceal = {
enabled = false,
},
quote = { repeat_linebreak = true },
checkbox = {
-- unchecked = { icon = '✘ ' },
checked = { icon = '✔ ', scope_highlight = '@markup.strikethrough' },
custom = {
todo = { raw = '[-]', rendered = '󰥔 ', highlight = 'RenderMarkdownTodo', scope_highlight = nil },
important = { raw = '[~]', rendered = '󰓎 ', highlight = 'DiagnosticWarn', },
},
},
latex = {
enabled = false,
converter = "latex2text",
},
win_options = {
conceallevel = {
default = 0,
rendered = 2, -- Conceal level 2: hide LaTeX code fully
},
concealcursor = {
default = "",
rendered = "n", -- Conceal only in normal mode
},
}
})
end,
},
}
File diff suppressed because it is too large Load Diff
+441
View File
@@ -0,0 +1,441 @@
return {
{ "nvim-lua/plenary.nvim", lazy = true },
{ "nvim-tree/nvim-web-devicons", lazy = true, opts = {} },
{
'nvim-mini/mini.extra',
lazy = true,
},
{
'nvim-mini/mini.ai',
lazy = false,
version = '*',
dependencies = {
'nvim-treesitter/nvim-treesitter-textobjects',
},
config = function()
local MiniExtra = require('mini.extra')
local ai = require('mini.ai')
local spec_treesitter = ai.gen_spec.treesitter
ai.setup({
custom_textobjects = {
B = MiniExtra.gen_ai_spec.buffer(),
I = MiniExtra.gen_ai_spec.indent(),
L = MiniExtra.gen_ai_spec.line(),
N = MiniExtra.gen_ai_spec.number(),
F = spec_treesitter({ a = '@function.outer', i = '@function.inner' }),
C = spec_treesitter({ a = '@comment.outer', i = '@comment.inner' }),
P = spec_treesitter({ a = '@parameter.outer', i = '@parameter.inner' }),
O = spec_treesitter({ a = '@block.outter', i = '@block.inner' }),
k = spec_treesitter({ a = '@class.outer', i = '@class.inner' }),
o = spec_treesitter({
a = { '@conditional.outer', '@loop.outer' },
i = { '@conditional.inner', '@loop.inner' },
})
}
})
end
},
{
'nvim-mini/mini.move',
lazy = false,
version = '*',
opts = {}
},
{
'nvim-mini/mini.align',
lazy = false,
version = '*',
opts = {}
},
{
'nvim-mini/mini.bracketed',
lazy = false,
version = '*',
opts = {}
},
{
'nvim-mini/mini.operators',
lazy = false,
version = '*',
opts = {
evaluate = { prefix = 'g|', func = nil, },
exchange = { prefix = 'g.', reindent_linewise = true, },
multiply = { prefix = 'gm', func = nil, },
replace = { prefix = 'gk', reindent_linewise = true, },
sort = { prefix = 'gs', func = nil, }
}
},
{
'nvim-mini/mini.surround',
lazy = false,
version = '*',
opts = {
-- Add custom surroundings to be used on top of builtin ones. For more
-- information with examples, see `:h MiniSurround.config`.
-- custom_surroundings = {
-- s = { input = { '%[%[().-()%]%]' }, output = { left = '[[', right = ']]' } },
-- },
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
},
}
},
{
'nvim-mini/mini.splitjoin',
lazy = false,
version = false,
config = function()
require('mini.splitjoin').setup()
end,
},
{
"nvim-mini/mini.hipatterns",
lazy = false,
event = "BufReadPre",
config = function()
local MiniExtra = require("mini.extra")
local hi_words = MiniExtra.gen_highlighter.words
require('mini.hipatterns').setup({
highlighters = {
-- Highlight standalone 'FIXME', 'HACK', 'TODO', 'NOTE'
fixme = hi_words({ 'FIXME', 'Fixme', 'fixme' }, "MiniHipatternsFixme"),
hack = hi_words({ 'HACK', 'Hack', 'hack' }, "MiniHipatternsHack"),
todo = hi_words({ 'TODO', 'Todo', 'todo' }, "MiniHipatternsTodo"),
note = hi_words({ 'NOTE', 'Note', 'note' }, "MiniHipatternsNote"),
done = hi_words({ 'DONE', 'Done', 'done' }, "MiniHipatternsFixme"),
-- Highlight hex color strings (`#rrggbb`) using that color
-- hex_color = hipatterns.gen_highlighter.hex_color(),
},
})
end,
},
{
'nvim-mini/mini.files',
event = 'VeryLazy',
version = '*',
keys = {
{ "-", function() require("mini.files").open(vim.api.nvim_buf_get_name(0)) end, desc = "Open parent directory", mode = "n" },
{ "<leader>-", function() require("mini.files").open() end, desc = "File Explore", mode = "n" },
},
opts = {
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",
close = "<Esc>",
},
}
},
{
'nvim-mini/mini.sessions',
version = '*',
lazy = false,
config = function()
require('mini.sessions').setup()
end,
},
{
"folke/snacks.nvim",
priority = 1000,
lazy = false,
---@type snacks.Config
opts = {
animate = {
enabled = false,
duration = { step = 1, total = 1 },
easing = "linear",
},
bigfile = { enabled = true },
dashboard = { enabled = false },
explorer = { enabled = false },
image = {
enabled = true,
inline = false,
scale = 3, -- nil | 1 (default) | 2 | 3 | ...
doc = {
inline = true,
enabled = true,
max_width = nil,
max_height = nil,
conceal = true,
},
math = {
enabled = true,
}
},
terminal = {
bo = {
filetype = "snacks_terminal",
},
win = { style = "terminal" },
wo = {},
keys = {
q = "hide",
gf = function(self)
local f = vim.fn.findfile(vim.fn.expand("<cfile>"), "**")
if f == "" then
Snacks.notify.warn("No file under cursor")
else
self:hide()
vim.schedule(function()
vim.cmd("e " .. f)
end)
end
end,
term_normal = {
"<esc><esc>",
function(self)
self.esc_timer = self.esc_timer or (vim.uv or vim.loop).new_timer()
if self.esc_timer:is_active() then
self.esc_timer:stop()
vim.cmd("stopinsert")
else
self.esc_timer:start(250, 0, function() end)
return "<esc>"
end
end,
mode = "t",
expr = true,
desc = "Double escape to normal mode",
},
},
},
indent = { enabled = false },
notifier = {
enabled = true,
timeout = 1000,
},
picker = {
enabled = true,
layout = { preset = "ivy", layout = { position = "bottom" } },
frecency = true,
history_bonus = true,
projects = {
dev = { "~/Projects", },
},
win = {
input = {
keys = {
['<c-e>'] = { 'layout_right', mode = { 'i', 'n' } },
},
},
},
sources = {
files = {
-- add a custom action
actions = {
create_if_missing = function(picker, item)
-- When typing in the input, item may be nil.
-- We'll use the input text as the intended file path.
local input = picker.input and picker.input:get() or ""
if input == "" then return end
-- Make it relative to picker cwd if it’s not absolute
local cwd = picker.opts.cwd or vim.loop.cwd()
local path = input
if not path:match("^/") and not path:match("^%a:[/\\]") then
path = cwd .. "/" .. path
end
-- Normalize path (optional)
path = vim.fn.fnamemodify(path, ":p")
-- If file exists, just open it
if vim.loop.fs_stat(path) then
picker:close()
vim.cmd.edit(path)
return
end
-- Ensure parent dirs exist (optional but nice)
vim.fn.mkdir(vim.fn.fnamemodify(path, ":h"), "p")
-- Open a new buffer at that path (creates buffer even if file missing)
picker:close()
vim.cmd.edit(path)
-- At this point buffer is new + unnamed-on-disk until you :w
end,
},
-- bind the action to a key in the picker UI
win = {
input = {
keys = {
["<M-n>"] = { "create_if_missing", mode = { "i", "n" }, desc = "Create file from input" },
},
},
list = {
keys = {
["<M-n>"] = { "create_if_missing", mode = { "n" }, desc = "Create file from input" },
},
},
},
},
},
},
scope = { enabled = false },
scratch = {
ft = "markdown",
},
statuscolumn = { enabled = true },
styles = {
notification = {
-- wo = { wrap = true } -- Wrap notifications
}
}
},
keys = {
-- Org Search
{ "<leader>o/", function() Snacks.picker.grep({dirs = { os.getenv("HOME") .. "/Documents/notes" }}) end, desc = "Search Org Files" },
-- { "<leader>o/", function() Snacks.picker.files({ cwd = os.getenv("HOME") .. "/Documents/notes" }) end, desc = "Find Document" },
-- Top Pickers & Explorer
{ "<leader><Space>", function() Snacks.picker.smart() end, desc = "Smart Find Files" },
{ "<leader>j", function() Snacks.picker.files({args = { "--no-require-git" }}) end, desc = "Find Files" },
{ "<leader>,", function() Snacks.picker.buffers() end, desc = "Buffers" },
{ "<leader>/", function() Snacks.picker.grep() end, desc = "Grep" },
{ "<leader>:", function() Snacks.picker.command_history() end, desc = "Command History" },
{ "<leader>n", function() Snacks.picker.notifications() end, desc = "Notification History" },
{ "<leader>i", function() Snacks.picker.lsp_symbols() end, desc = "Symbols" },
{ "<leader>I", function() Snacks.picker.lsp_workspace_symbols() end, desc = "LSP Workspace Symbols" },
-- { "<leader>e", function() Snacks.explorer() end, desc = "File Explorer" },
-- find
{ "<leader>fb", function() Snacks.picker.buffers() end, desc = "Buffers" },
{ "<leader>fc", function() Snacks.picker.files({ cwd = vim.fn.stdpath("config") }) end, desc = "Find Config File" },
{ "<leader>ff", function() Snacks.picker.files() end, desc = "Find Files" },
{ "<leader>fg", function() Snacks.picker.git_files() end, desc = "Find Git Files" },
{ "<leader>fp", function() Snacks.picker.projects() end, desc = "Projects" },
{ "<leader>fr", function() Snacks.picker.recent() end, desc = "Recent" },
-- git
{ "<leader>gb", function() Snacks.picker.git_branches() end, desc = "Git Branches" },
{ "<leader>gl", function() Snacks.picker.git_log() end, desc = "Git Log" },
{ "<leader>gL", function() Snacks.picker.git_log_line() end, desc = "Git Log Line" },
{ "<leader>gs", function() Snacks.picker.git_status() end, desc = "Git Status" },
{ "<leader>gS", function() Snacks.picker.git_stash() end, desc = "Git Stash" },
{ "<leader>gd", function() Snacks.picker.git_diff() end, desc = "Git Diff (Hunks)" },
{ "<leader>gf", function() Snacks.picker.git_log_file() end, desc = "Git Log File" },
-- Grep
{ "<leader>sb", function() Snacks.picker.lines() end, desc = "Buffer Lines" },
{ "<leader>sB", function() Snacks.picker.grep_buffers() end, desc = "Grep Open Buffers" },
{ "<leader>sg", function() Snacks.picker.grep() end, desc = "Grep" },
{ "<leader>sw", function() Snacks.picker.grep_word() end, desc = "Visual selection or word", mode = { "n", "x" } },
-- search
{ '<leader>s"', function() Snacks.picker.registers() end, desc = "Registers" },
{ '<leader>s/', function() Snacks.picker.search_history() end, desc = "Search History" },
{ "<leader>sa", function() Snacks.picker.autocmds() end, desc = "Autocmds" },
{ "<leader>sb", function() Snacks.picker.lines() end, desc = "Buffer Lines" },
{ "<leader>sc", function() Snacks.picker.command_history() end, desc = "Command History" },
{ "<leader>sC", function() Snacks.picker.commands() end, desc = "Commands" },
{ "<leader>sd", function() Snacks.picker.diagnostics() end, desc = "Diagnostics" },
{ "<leader>sD", function() Snacks.picker.diagnostics_buffer() end, desc = "Buffer Diagnostics" },
{ "<leader>sh", function() Snacks.picker.help() end, desc = "Help Pages" },
{ "<leader>sH", function() Snacks.picker.highlights() end, desc = "Highlights" },
{ "<leader>si", function() Snacks.picker.icons() end, desc = "Icons" },
{ "<leader>sj", function() Snacks.picker.jumps() end, desc = "Jumps" },
{ "<leader>sk", function() Snacks.picker.keymaps() end, desc = "Keymaps" },
{ "<leader>sl", function() Snacks.picker.loclist() end, desc = "Location List" },
{ "<leader>sm", function() Snacks.picker.marks() end, desc = "Marks" },
{ "<leader>sM", function() Snacks.picker.man() end, desc = "Man Pages" },
{ "<leader>sp", function() Snacks.picker.lazy() end, desc = "Search for Plugin Spec" },
{ "<leader>sq", function() Snacks.picker.qflist() end, desc = "Quickfix List" },
{ "<leader>sR", function() Snacks.picker.resume() end, desc = "Resume" },
{ "<leader>su", function() Snacks.picker.undo() end, desc = "Undo History" },
{ "<leader>sz", function() Snacks.picker.zoxide() end, desc = "Zoxide" },
{ "<leader>uC", function() Snacks.picker.colorschemes() end, desc = "Colorschemes" },
-- LSP
{ "gd", function() Snacks.picker.lsp_definitions() end, desc = "Goto Definition" },
{ "gD", function() Snacks.picker.lsp_declarations() end, desc = "Goto Declaration" },
{ "grr", function() Snacks.picker.lsp_references() end, nowait = true, desc = "References" },
{ "gri", function() Snacks.picker.lsp_implementations() end, desc = "Goto Implementation" },
{ "gy", function() Snacks.picker.lsp_type_definitions() end, desc = "Goto T[y]pe Definition" },
{ "<leader>ss", function() Snacks.picker.lsp_symbols() end, desc = "LSP Symbols" },
{ "<leader>sS", function() Snacks.picker.lsp_workspace_symbols() end, desc = "LSP Workspace Symbols" },
-- Other
{ "<leader>Z", function() Snacks.zen() end, desc = "Toggle Zen Mode" },
{ "<leader>z", function() Snacks.zen.zoom() end, desc = "Toggle Zoom" },
{ "<leader>.", function() Snacks.scratch() end, desc = "Toggle Scratch Buffer" },
{ "<leader>S", function() Snacks.scratch.select() end, desc = "Select Scratch Buffer" },
-- { "<leader>n", function() Snacks.notifier.show_history() end, desc = "Notification History" },
{ "<leader>bd", function() Snacks.bufdelete() end, desc = "Delete Buffer" },
{ "<leader>bR", function() Snacks.rename.rename_file() end, desc = "Rename File" },
{ "<leader>gB", function() Snacks.gitbrowse() end, desc = "Git Browse", mode = { "n", "v" } },
{ "<leader>gg", function() Snacks.lazygit() end, desc = "Lazygit" },
{ "<leader>un", function() Snacks.notifier.hide() end, desc = "Dismiss All Notifications" },
{ "<c-_>", function() Snacks.terminal.toggle() end, desc = "Toggle Terminal", mode = { "n", "t" } },
-- { "<Esc>", "<C-\\><C-n>", desc = "Exit Terminal Mode", mode = { "t" } },
{ "]]", function() Snacks.words.jump(vim.v.count1) end, desc = "Next Reference", mode = { "n", "t" } },
{ "[[", function() Snacks.words.jump(-vim.v.count1) end, desc = "Prev Reference", mode = { "n", "t" } },
{
"<leader>xN",
desc = "Neovim News",
function()
Snacks.win({
file = vim.api.nvim_get_runtime_file("doc/news.txt", false)[1],
width = 0.6,
height = 0.6,
wo = {
spell = false,
wrap = false,
signcolumn = "yes",
statuscolumn = " ",
conceallevel = 3,
},
})
end,
}
},
init = function()
vim.api.nvim_create_autocmd("User", {
pattern = "VeryLazy",
callback = function()
-- Setup some globals for debugging (lazy-loaded)
_G.dd = function(...)
Snacks.debug.inspect(...)
end
_G.bt = function()
Snacks.debug.backtrace()
end
vim.print = _G.dd -- Override print to use snacks for `:=` command
-- Create some toggle mappings
Snacks.toggle.option("spell", { name = "Spelling" }):map("<leader>us")
Snacks.toggle.option("wrap", { name = "Wrap" }):map("<leader>uw")
Snacks.toggle.option("relativenumber", { name = "Relative Number" }):map("<leader>uL")
Snacks.toggle.diagnostics():map("<leader>ud")
Snacks.toggle.line_number():map("<leader>ul")
Snacks.toggle.option("conceallevel", { off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2 }):map("<leader>uc")
Snacks.toggle.treesitter():map("<leader>uT")
Snacks.toggle.option("background", { off = "light", on = "dark", name = "Dark Background" }):map("<leader>ub")
Snacks.toggle.inlay_hints():map("<leader>uh")
Snacks.toggle.indent():map("<leader>ug")
Snacks.toggle.dim():map("<leader>uD")
end,
})
end,
},
}
+355
View File
@@ -0,0 +1,355 @@
return {
{
'Civitasv/cmake-tools.nvim',
lazy = true,
config = function ()
local osys = require("cmake-tools.osys")
require("cmake-tools").setup {
cmake_command = "cmake", -- this is used to specify cmake command path
ctest_command = "ctest", -- this is used to specify ctest command path
cmake_use_preset = true,
cmake_regenerate_on_save = true, -- auto generate when save CMakeLists.txt
cmake_generate_options = { "-DCMAKE_EXPORT_COMPILE_COMMANDS=1" }, -- this will be passed when invoke `CMakeGenerate`
cmake_build_options = {}, -- this will be passed when invoke `CMakeBuild`
-- support macro expansion:
-- ${kit}
-- ${kitGenerator}
-- ${variant:xx}
cmake_build_directory = function()
if osys.iswin32 then
return "out\\${variant:buildType}"
end
return "out/${variant:buildType}"
end, -- this is used to specify generate directory for cmake, allows macro expansion, can be a string or a function returning the string, relative to cwd.
cmake_soft_link_compile_commands = true, -- this will automatically make a soft link from compile commands file to project root dir
cmake_compile_commands_from_lsp = false, -- this will automatically set compile commands file location using lsp, to use it, please set `cmake_soft_link_compile_commands` to false
cmake_kits_path = nil, -- this is used to specify global cmake kits path, see CMakeKits for detailed usage
cmake_variants_message = {
short = { show = true }, -- whether to show short message
long = { show = true, max_length = 40 }, -- whether to show long message
},
cmake_dap_configuration = { -- debug settings for cmake
name = "cpp",
type = "codelldb",
request = "launch",
stopOnEntry = false,
runInTerminal = true,
console = "integratedTerminal",
},
cmake_executor = { -- executor to use
name = "quickfix", -- name of the executor
opts = {}, -- the options the executor will get, possible values depend on the executor type. See `default_opts` for possible values.
default_opts = { -- a list of default and possible values for executors
quickfix = {
show = "always", -- "always", "only_on_error"
position = "belowright", -- "vertical", "horizontal", "leftabove", "aboveleft", "rightbelow", "belowright", "topleft", "botright", use `:h vertical` for example to see help on them
size = 10,
encoding = "utf-8", -- if encoding is not "utf-8", it will be converted to "utf-8" using `vim.fn.iconv`
auto_close_when_success = true, -- typically, you can use it with the "always" option; it will auto-close the quickfix buffer if the execution is successful.
},
toggleterm = {
direction = "float", -- 'vertical' | 'horizontal' | 'tab' | 'float'
close_on_exit = false, -- whether close the terminal when exit
auto_scroll = true, -- whether auto scroll to the bottom
singleton = true, -- single instance, autocloses the opened one, if present
},
overseer = {
new_task_opts = {
strategy = {
"toggleterm",
direction = "horizontal",
autos_croll = true,
quit_on_exit = "success"
}
}, -- options to pass into the `overseer.new_task` command
on_new_task = function(task)
require("overseer").open(
{ enter = false, direction = "right" }
)
end, -- a function that gets overseer.Task when it is created, before calling `task:start`
},
terminal = {
name = "Main Terminal",
prefix_name = "[CMakeTools]: ", -- This must be included and must be unique, otherwise the terminals will not work. Do not use a simple spacebar " ", or any generic name
split_direction = "horizontal", -- "horizontal", "vertical"
split_size = 11,
-- Window handling
single_terminal_per_instance = true, -- Single viewport, multiple windows
single_terminal_per_tab = true, -- Single viewport per tab
keep_terminal_static_location = true, -- Static location of the viewport if avialable
auto_resize = true, -- Resize the terminal if it already exists
-- Running Tasks
start_insert = false, -- If you want to enter terminal with :startinsert upon using :CMakeRun
focus = false, -- Focus on terminal when cmake task is launched.
do_not_add_newline = false, -- Do not hit enter on the command inserted when using :CMakeRun, allowing a chance to review or modify the command before hitting enter.
}, -- terminal executor uses the values in cmake_terminal
},
},
cmake_runner = { -- runner to use
name = "terminal", -- name of the runner
opts = {}, -- the options the runner will get, possible values depend on the runner type. See `default_opts` for possible values.
default_opts = { -- a list of default and possible values for runners
quickfix = {
show = "always", -- "always", "only_on_error"
position = "belowright", -- "bottom", "top"
size = 10,
encoding = "utf-8",
auto_close_when_success = true, -- typically, you can use it with the "always" option; it will auto-close the quickfix buffer if the execution is successful.
},
toggleterm = {
direction = "float", -- 'vertical' | 'horizontal' | 'tab' | 'float'
close_on_exit = false, -- whether close the terminal when exit
auto_scroll = true, -- whether auto scroll to the bottom
singleton = true, -- single instance, autocloses the opened one, if present
},
overseer = {
new_task_opts = {
strategy = {
"toggleterm",
direction = "horizontal",
autos_croll = true,
quit_on_exit = "success"
}
}, -- options to pass into the `overseer.new_task` command
on_new_task = function(task)
end, -- a function that gets overseer.Task when it is created, before calling `task:start`
},
terminal = {
name = "Main Terminal",
prefix_name = "[CMakeTools]: ", -- This must be included and must be unique, otherwise the terminals will not work. Do not use a simple spacebar " ", or any generic name
split_direction = "horizontal", -- "horizontal", "vertical"
split_size = 11,
-- Window handling
single_terminal_per_instance = true, -- Single viewport, multiple windows
single_terminal_per_tab = true, -- Single viewport per tab
keep_terminal_static_location = true, -- Static location of the viewport if avialable
auto_resize = true, -- Resize the terminal if it already exists
-- Running Tasks
start_insert = false, -- If you want to enter terminal with :startinsert upon using :CMakeRun
focus = false, -- Focus on terminal when cmake task is launched.
do_not_add_newline = false, -- Do not hit enter on the command inserted when using :CMakeRun, allowing a chance to review or modify the command before hitting enter.
},
},
},
cmake_notifications = {
runner = { enabled = true },
executor = { enabled = true },
spinner = { "⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏" }, -- icons used for progress display
refresh_rate_ms = 100, -- how often to iterate icons
},
cmake_virtual_text_support = true, -- Show the target related to current file using virtual text (at right corner)
}
end,
},
{
'mistweaverco/kulala.nvim',
ft = {"http", "rest"},
},
{
"HakonHarnes/img-clip.nvim",
event = "VeryLazy",
opts = {
-- add options here
-- or leave it empty to use the default settings
},
keys = {
-- suggested keymap
{ "<leader>kp", "<cmd>PasteImage<cr>", desc = "Paste image from system clipboard" },
},
},
{
"uhs-robert/sshfs.nvim",
opts = {
mounts = {
base_dir = vim.fn.expand("$HOME") .. "/Public", -- where remote mounts are created
},
-- Refer to the configuration section below
-- or leave empty for defaults
},
},
{
"esmuellert/codediff.nvim",
dependencies = { "MunifTanjim/nui.nvim" },
cmd = "CodeDiff",
},
{
"ejrichards/mise.nvim",
keys = {
{ "<leader>xm", "<cmd>Lazy reload mise.nvim<cr>", desc = "Reload mise environment" }
},
opts = {
unset_vars = true,
load_on_setup = true,
force_run = true,
}
},
{
'NeogitOrg/neogit',
dependencies = {
'nvim-lua/plenary.nvim', -- required
'sindrets/diffview.nvim',
},
lazy = true,
keys = {
{ '<leader>gn', "<cmd>Neogit kind=auto<cr>", desc = 'Neogit'},
{ '<leader>gN', "<cmd>Neogit kind=floating<cr>", desc = 'Neogit'}
},
opts = {
-- disable_context_highlighting = true,
disable_commit_confirmation = true,
disable_insert_on_commit = false,
disable_signs = true,
integrations = { diffview = true, fz_lua = false },
auto_refresh = false,
console_timeout = 5000,
auto_show_console = false,
sections = {
stashes = {
folded = false,
},
recent = { folded = false },
},
}
},
{
'stevearc/overseer.nvim',
keys = {
{ "<leader>xo", "<cmd>OverseerOpen<CR>", desc = "Open Overseer" },
{ "<leader>to", "<cmd>OverseerToggle<CR>", desc = "Overseer Toggle" },
{ "<F5>", "<cmd>OverseerRun<CR>", desc = "Run Overseer" },
{ "<F6>", "<cmd>OverseerToggle<CR>", desc = "Overseer Toggle" },
},
config = function()
require("overseer").setup({
templates = { "builtin", "user" },
component_aliases = {
default = {
{ 'display_duration', detail_level = 2 },
'on_output_summarize',
'on_exit_set_status',
'on_result_diagnostics_quickfix',
'on_complete_notify',
{ "on_complete_dispose", require_view = { "SUCCESS", "FAILURE" } },
},
default_vscode = {
'default',
'on_result_diagnostics',
'on_result_diagnostics_quickfix',
'on_complete_notify',
},
}
})
-- local pm = require("overseer.template.vscode.problem_matcher")
-- pm.register_problem_matcher("$rustc", {
-- fileLocation = { "autoDetect", "${cwd}" },
-- pattern = {
-- --regexp = "^(.*?)-->\\s+(.*?):(\\d+):(\\d+)$",
-- -- vim_regexp = "\\v^(.*?)-->\\s+(.*?):(\\d+):(\\d+)$",
-- regexp = "^\\s+-->\\s*([^:]*):(\\d+):(\\d+)$",
-- vim_regexp = "\\v^\\s+-->\\s*([^:]*):(\\d+):(\\d+)$",
-- file = 1,
-- line = 2,
-- column = 3,
-- }
-- })
end,
},
{
'stevearc/quicker.nvim',
event = "FileType qf",
---@module "quicker"
---@type quicker.SetupOptions
opts = {},
},
{
"saxon1964/neovim-tips",
version = "*", -- Only update on tagged releases
lazy = false, -- Load on startup (recommended for daily tip feature)
dependencies = {
"MunifTanjim/nui.nvim",
-- OPTIONAL: Choose your preferred markdown renderer (or omit for raw markdown)
"MeanderingProgrammer/render-markdown.nvim", -- Clean rendering
-- OR: "OXY2DEV/markview.nvim", -- Rich rendering with advanced features
},
opts = {
-- OPTIONAL: Location of user defined tips (default value shown below)
user_file = vim.fn.stdpath("config") .. "/neovim_tips/user_tips.md",
-- OPTIONAL: Prefix for user tips to avoid conflicts (default: "[User] ")
user_tip_prefix = "[User] ",
-- OPTIONAL: Show warnings when user tips conflict with builtin (default: true)
warn_on_conflicts = true,
-- OPTIONAL: Daily tip mode (default: 1)
-- 0 = off, 1 = once per day, 2 = every startup
daily_tip = 1,
-- OPTIONAL: Bookmark symbol (default: "🌟 ")
bookmark_symbol = "🌟 ",
},
},
{
"nvim-pack/nvim-spectre",
lazy = true,
cmd = { "Spectre" },
keys = {
{ "<leader>sr", function() require("spectre").open() end, desc = "Replace in files (Spectre)" },
},
opts = {
open_cmd = "noswapfile vnew",
highlight = {
search = "SpectreSearch",
replace = "SpectreReplace",
},
mapping = {
["send_to_qf"] = {
map = "<C-q>",
cmd = "<cmd>lua require('spectre.actions').send_to_qf()<CR>",
desc = "send all items to quickfix",
},
},
}
},
{
"thunder-coding/zincoxide",
opts = {
-- name of zoxide binary in your "$PATH" or path to the binary
-- the command is executed using vim.fn.system()
-- eg. "zoxide" or "/usr/bin/zoxide"
zincoxide_cmd = "zoxide",
-- Kinda experimental as of now
complete = true,
-- Available options { "tabs", "window", "global" }
behaviour = "tabs",
},
cmd = { "Z", "Zg", "Zt", "Zw" },
},
{
"folke/persistence.nvim",
event = "BufReadPre",
opts = { options = { "buffers", "curdir", "tabpages", "winsize", "help", "globals", "skiprtp" } },
-- stylua: ignore
keys = {
{ "<leader>xr", function() require("persistence").load() end, desc = "Restore Session" },
{ "<leader>xs", function() require("persistence").save() end, desc = "Save Session" },
{ "<leader>xl", function() require("persistence").load({ last = true }) end, desc = "Restore Last Session" },
{ "<leader>xd", function() require("persistence").stop() end, desc = "Don't Save Current Session" },
},
},
}
+336
View File
@@ -0,0 +1,336 @@
return {
{
"otavioschwanck/arrow.nvim",
dependencies = {
{
"nvim-tree/nvim-web-devicons"
},
-- or if using `mini.icons`
-- { "echasnovski/mini.icons" },
},
opts = {
show_icons = true,
leader_key = ';', -- Recommended to be a single key
buffer_leader_key = '<leader>;', -- Per Buffer Mappings
}
},
{
"utilyre/barbecue.nvim",
dependencies = {
{ 'SmiteshP/nvim-navic', lazy = true },
},
event = "VeryLazy",
opts = {},
},
{
"folke/flash.nvim",
event = "VeryLazy",
---@type Flash.Config
opts = {
modes = {
char = {
jump_labels = true,
search = { wrap = true },
highlight = { backdrop = false },
},
search = {
-- when `true`, flash will be activated during regular search by default.
-- You can always toggle when searching with `require("flash").toggle()`
enabled = true,
highlight = { backdrop = false },
jump = { history = true, register = true, nohlsearch = true, autojump = true },
search = {
wrap = true,
-- `forward` will be automatically set to the search direction
-- `mode` is always set to `search`
-- `incremental` is set to `true` when `incsearch` is enabled
},
},
treesitter = {
search = { wrap = true },
}
},
},
-- stylua: ignore
keys = {
{ "<leader>/", mode = { "n" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
{ "s", mode = { "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
},
},
{
"folke/snacks.nvim",
opts = {
notifier = {
timeout = 4000,
},
picker = {
win = {
input = {
keys = {
["<a-s>"] = { "flash", mode = { "n", "i" } },
["s"] = { "flash" },
},
},
},
actions = {
flash = function(picker)
require("flash").jump({
pattern = "^",
label = { after = { 0, 0 } },
search = {
mode = "search",
exclude = {
function(win)
return vim.bo[vim.api.nvim_win_get_buf(win)].filetype ~= "snacks_picker_list"
end,
},
},
action = function(match)
local idx = picker.list:row2idx(match.pos[1])
picker.list:_move(idx, true, true)
end,
})
end,
},
},
},
},
{
'nvim-lualine/lualine.nvim',
event = "VeryLazy",
config = function()
local function truncate_branch_name(branch)
if not branch or branch == "" then
return ""
end
-- Match the branch name to the specified format
local _, _, ticket_number = string.find(branch, "skdillon/sko%-(%d+)%-")
-- If the branch name matches the format, display sko-{ticket_number}, otherwise display the full branch name
if ticket_number then
return "sko-" .. ticket_number
else
return branch
end
end
require("lualine").setup({
options = {
-- theme = "rose-pine",
globalstatus = true,
-- component_separators = { left = "", right = "" },
-- section_separators = { left = "█", right = "█" },
icons_enabled = true,
component_separators = { left = '', right = ''},
section_separators = { left = '', right = ''},
tabline = {
lualine_a = {},
lualine_b = {'branch'},
lualine_c = {'filename'},
lualine_x = {},
lualine_y = {},
lualine_z = {}
},
},
sections = {
lualine_b = {
{ "branch", icon = "", fmt = truncate_branch_name },
"diff",
"diagnostics",
},
lualine_c = {
{ 'lsp_progress' },
{
'buffers',
show_filename_only = true, -- Shows shortened relative path when set to false.
hide_filename_extension = false, -- Hide filename extension when set to true.
show_modified_status = true, -- Shows indicator when the buffer is modified.
mode = 0,
max_length = vim.o.columns * 2 / 3,
filetype_names = {
TelescopePrompt = '',
},
-- it can also be a function that returns
-- the value of `max_length` dynamically.
use_mode_colors = false,
symbols = {
modified = ' ●', -- Text to show when the buffer is modified
alternate_file = '#', -- Text to show to identify the alternate file
directory = '', -- Text to show when the buffer is a directory
},
},
},
lualine_x = {
"windows",
"fileformat",
"filetype",
},
},
})
end,
},
{
"hedyhli/outline.nvim",
lazy = true,
cmd = { "Outline", "OutlineOpen" },
keys = { -- Example mapping to toggle outline
{ "<leader>so", "<cmd>Outline<CR>", desc = "Toggle outline" },
},
opts = {
symbol_folding = {
-- Unfold entire symbol tree by default with false, otherwise enter a
-- number starting from 1
autofold_depth = false,
-- autofold_depth = 1,
},
},
},
{
'stevearc/quicker.nvim',
ft = "qf",
---@module "quicker"
---@type quicker.SetupOptions
opts = {},
},
{
"christoomey/vim-tmux-navigator",
cmd = {
"TmuxNavigateLeft",
"TmuxNavigateDown",
"TmuxNavigateUp",
"TmuxNavigateRight",
"TmuxNavigatePrevious",
},
keys = {
{ "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
{ "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
{ "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
{ "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
-- { "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
},
},
{
'akinsho/toggleterm.nvim',
lazy = false,
config = function()
require("toggleterm").setup({
-- highlights = require("rose-pine.plugins.toggleterm"),
size = 20,
open_mapping = [[<c-\>]],
hide_numbers = true,
shade_terminals = true,
shading_factor = 2,
start_in_insert = true,
insert_mappings = true,
persiste_size = true,
direction = 'horizontal',
close_on_exit = true,
float_opts = {
border = "curved",
}
})
end,
keys = {
{ "<Esc><Esc>", "<c-\\><c-n>", desc = "Escape input", mode = { "t" } }
},
},
{
'ten3roberts/window-picker.nvim',
opts = {
-- Default keys to annotate, keys will be used in order. The default uses the
-- most accessible keys from the home row and then top row.
keys = 'alskdjfhgwoeiruty',
-- Swap windows by holding shift + letter
swap_shift = true,
-- Windows containing filetype to exclude
exclude = { qf = true, NvimTree = true, aerial = true },
-- Flash the cursor line of the newly focused window for 300ms.
-- Set to 0 or false to disable.
flash_duration = 300,
},
keys = {
{ "<leader>a", "<cmd>WindowPick<cr>", desc = "Windows Pick"},
{ "<C-w>a", "<cmd>WindowPick<cr>", desc = "Windows Pick"},
{ "<C-w>D", "<cmd>WindowZap<cr>", desc = "Windows Delete"},
{ "<C-w>S", "<cmd>WindowSwap<cr>", desc = "Windows Swap"},
},
},
{
"folke/which-key.nvim",
event = "VimEnter",
opts = {
icons = {
-- set icon mappings to true if you have a Nerd Font
mappings = vim.g.have_nerd_font,
-- If you are using a Nerd Font: set icons.keys to an empty table which will use the
-- default whick-key.nvim defined Nerd Font icons, otherwise define a string table
keys = vim.g.have_nerd_font and {} or {
Up = '<Up> ',
Down = '<Down> ',
Left = '<Left> ',
Right = '<Right> ',
C = '<C-…> ',
M = '<M-…> ',
D = '<D-…> ',
S = '<S-…> ',
CR = '<CR> ',
Esc = '<Esc> ',
ScrollWheelDown = '<ScrollWheelDown> ',
ScrollWheelUp = '<ScrollWheelUp> ',
NL = '<NL> ',
BS = '<BS> ',
Space = '<Space> ',
Tab = '<Tab> ',
F1 = '<F1>',
F2 = '<F2>',
F3 = '<F3>',
F4 = '<F4>',
F5 = '<F5>',
F6 = '<F6>',
F7 = '<F7>',
F8 = '<F8>',
F9 = '<F9>',
F10 = '<F10>',
F11 = '<F11>',
F12 = '<F12>',
},
},
spec = {
{ "g", group = "+goto" },
{ "]", group = "+next" },
{ "[", group = "+prev" },
{ "<leader>c", group = "+code", mode = { 'n', 'x' } },
{ "<leader>b", group = "+buffer" },
{ "<leader>f", group = "+find" },
{ "<leader>g", group = "+goto" },
{ "<leader>k", group = "+obsidian" },
{ "<leader>l", group = "+lsp" },
{ "<leader>m", group = "+bookmark" },
{ "<leader>o", group = "+notes" },
{ "<leader>r", group = "+ai" },
{ "<leader>s", group = "+search" },
{ "<leader>t", group = "+trouble" },
{ "<leader>v", group = "+vcs", mode = { 'n', 'v' } },
{ "<leader>w", group = "+workspace" },
{ "<leader>x", group = "+extra" },
{ "<leader>u", group = "+toggle" },
},
},
},
}