mirror of
https://github.com/Ascyii/nvim.git
synced 2026-01-01 04:04:24 -05:00
auto up 23:53:40 up 0:02, 2 users, load average: 0.88, 0.49, 0.20
auto up 00:24:13 up 0:32, 2 users, load average: 0.84, 0.77, 0.74 auto up 17:13:21 up 4:51, 2 users, load average: 1.17, 1.00, 0.87 auto up 18:55:47 up 0:01, 2 users, load average: 0.67, 0.36, 0.14 auto up 18:57:31 up 0:00, 2 users, load average: 0.71, 0.18, 0.06 auto up 19:03:28 up 0:09, 2 users, load average: 0.22, 0.38, 0.26 auto up 01:08:17 up 6:30, 2 users, load average: 0.62, 0.57, 0.51 auto up 02:38:43 up 0:05, 3 users, load average: 0.52, 0.53, 0.25 auto up 10:53:19 up 0:00, 2 users, load average: 1.01, 0.25, 0.08
This commit is contained in:
@@ -1,33 +1,32 @@
|
||||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" },
|
||||
"aerial.nvim": { "branch": "master", "commit": "c7cbbad40c2065fccfd1f1863bb2c08180c0533d" },
|
||||
"LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" },
|
||||
"aerial.nvim": { "branch": "master", "commit": "5e687b5a14004fa2dd9eccbee042b96869fe1557" },
|
||||
"barbar.nvim": { "branch": "master", "commit": "53b5a2f34b68875898f0531032fbf090e3952ad7" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "bd5a7d6db125d4654b50eeae9f5217f24bb22fd3" },
|
||||
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||
"fzf-lua": { "branch": "main", "commit": "2388dcd61731ae158bf7dad2ae0419291837e557" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "f780609807eca1f783a36a8a31c30a48fbe150c5" },
|
||||
"fzf-lua": { "branch": "main", "commit": "a8458b79a957a6e3e217d84106a0fd4b9470ff4c" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "20ad4419564d6e22b189f6738116b38871082332" },
|
||||
"gruvbox.nvim": { "branch": "main", "commit": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437" },
|
||||
"harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "258d2a5ef4a3e3d6d9ba9da72c9725c53e9afcbd" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "e6a8824858757ca9cd4f5ae1a72d845fa5c46a39" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "371cd7434cbf95606f1969c2c744da31b77fcfa6" },
|
||||
"lazygit.nvim": { "branch": "main", "commit": "2305deed25bc61b866d5d39189e9105a45cf1cfb" },
|
||||
"lspsaga.nvim": { "branch": "main", "commit": "8efe00d6aed9db6449969f889170f1a7e43101a1" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "a1067cf84b4ff81b66d2bf4d01f4cbdb5de40bd0" },
|
||||
"mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "b3cce1419ca67871ae782b3e529652f8a016f0de" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "e179ad2f83b5955ab0af653069a493a1828c2697" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "3946f0122255bc377d14a59b27b609fb3ab25768" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "d7b5feb6e769e995f7fcf44d92f49f811c51d10c" },
|
||||
"mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "106c4bcc053a5da783bf4a9d907b6f22485c2ea0" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "2010fc6ec03e2da552b4886fceb2f7bc0fc2e9c0" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "64e2192f5250796aa4a7f33c6ad888515af50640" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "6e51ca170563330e063720449c21f43e27ca0bc1" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"telekasten.nvim": { "branch": "main", "commit": "b3ac2b07f2df504bb80112fec349714086a80037" },
|
||||
"telescope-undo.nvim": { "branch": "main", "commit": "928d0c2dc9606e01e2cc547196f48d2eaecf58e5" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "71ef4dc501c3eb3ed0e9cab2e0fb8e4e016def53" },
|
||||
"toggleterm.nvim": { "branch": "main", "commit": "9a88eae817ef395952e08650b3283726786fb5fb" },
|
||||
"typstar": { "branch": "main", "commit": "b0613321025cdbd89dbb9ccbc73e62a6b72a80fe" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "904308e6885bbb7b60714c80ab3daf0c071c1492" }
|
||||
"vim-gnupg": { "branch": "main", "commit": "f9b608f29003dfde6450931dc0f495a912973a88" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
||||
}
|
||||
|
||||
@@ -4,5 +4,6 @@ config.season = "S3" -- Current semester
|
||||
config.projects = vim.fn.expand("~/projects")
|
||||
config.uni_dir = vim.fn.expand("~/projects/university/" .. config.season)
|
||||
config.user = vim.fn.system('whoami'):gsub('\n', '')
|
||||
config.book_file = vim.fn.expand("~/projects/university/book.typ")
|
||||
|
||||
return config
|
||||
|
||||
@@ -28,7 +28,7 @@ vim.keymap.set('n', '<leader>va', 'ggVG')
|
||||
vim.keymap.set('n', '<leader>tr', ':tabnew<CR>:term<CR>i')
|
||||
|
||||
-- Indent all will be replaced by the formatting of lsp where the lsp is installed
|
||||
vim.keymap.set('n', '<leader>ia', 'gg=G<C-o>zz')
|
||||
vim.keymap.set('n', '<leader>ia', 'gg=G<C-o>zz') -- This can break
|
||||
vim.keymap.set('n', '<leader>ya', 'ggVG"+y<C-o>')
|
||||
vim.keymap.set('n', '<leader>ss', ':wa<CR>')
|
||||
vim.keymap.set("n", "<leader>nn", ":e ~/synced/brainstore/zettelkasten/quick<CR>", { silent = true })
|
||||
@@ -51,10 +51,11 @@ vim.keymap.set("n", "<leader>fs", toggle_fold, opts) -- close all folds
|
||||
vim.keymap.set('n', '<leader>occ', ':e ~/.config/nvim/init.lua<CR>`.zz')
|
||||
vim.keymap.set('n', '<leader>oct', ':e ~/synced/vault/contacts/contacts.txt<CR>`.zz')
|
||||
vim.keymap.set('n', '<leader>ock', ':e ~/.config/nvim/lua/config/keymaps.lua<CR>`.zz')
|
||||
|
||||
vim.keymap.set('n', '<leader>ocd', ':e ~/.config/nvim/lua/config/autocmds.lua<CR>`.zz')
|
||||
vim.keymap.set('n', '<leader>oco', ':e ~/.config/nvim/lua/config/options.lua<CR>`.zz')
|
||||
vim.keymap.set('n', '<leader>ocl', ':e ~/.config/nvim/lua/config/lazy.lua<CR>`.zz')
|
||||
vim.keymap.set('n', '<leader>oczl', ':e ~/.config/nvim/lua/plugins/lsp.lua<CR>`.zz')
|
||||
vim.keymap.set('n', '<leader>oczl', ':e ~/.config/nvim/lua/config/lsp.lua<CR>`.zz')
|
||||
vim.keymap.set('n', '<leader>ocp', ':e ~/.config/nvim/lua/plugins/misc.lua<CR>`.zz')
|
||||
vim.keymap.set('n', '<leader>ocf', ':e ~/.config/nvim/lua/utils/functions.lua<CR>`.zz')
|
||||
vim.keymap.set('n', '<leader>oca', ':e ~/.config/nvim/lua/utils/after.lua<CR>`.zz')
|
||||
@@ -62,6 +63,7 @@ vim.keymap.set('n', '<leader>oq', ':e ~/synced/brainstore/input.txt<CR>`.zz')
|
||||
vim.keymap.set('n', '<leader>ot', ':e ~/synced/brainstore/todos/todo.txt<CR>`.zz')
|
||||
vim.keymap.set('n', '<leader>od', ':e ~/synced/brainstore/todos/done.txt<CR>`.zz')
|
||||
vim.keymap.set('n', '<leader>ou', ':e ~/projects/university/' .. conf.season .. '/input.txt<CR>`.zz')
|
||||
vim.keymap.set('n', '<leader>fd', ':e ~/projects/university/' .. conf.season .. '/input.txt<CR>`.zz')
|
||||
vim.keymap.set('n', '<leader>oz', ':e ~/.zshrc<CR>`.zz')
|
||||
vim.keymap.set('n', '<leader>oaa', ':e ~/.common_shell<CR>`.zz')
|
||||
vim.keymap.set('n', '<leader>ow', ':e ~/synced/brainstore/waste.txt<CR>')
|
||||
@@ -112,12 +114,6 @@ vim.keymap.set('v', '<leader>p', function()
|
||||
vim.cmd('normal! "+p')
|
||||
end, { desc = 'Yank to clipboard and keep the selection' })
|
||||
|
||||
vim.keymap.set('v', 'p', function()
|
||||
local unnamed_content = vim.fn.getreg('""')
|
||||
vim.api.nvim_command('normal! p')
|
||||
vim.fn.setreg('""', unnamed_content)
|
||||
end, { desc = 'Paste from unnamed register (don\'t overwrite it) in visual mode' })
|
||||
|
||||
vim.keymap.set('v', '<leader>y', function()
|
||||
vim.cmd('normal! "+y')
|
||||
vim.cmd('normal! gv')
|
||||
|
||||
@@ -26,3 +26,12 @@ vim.opt.foldmethod = "expr"
|
||||
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
vim.opt.foldlevelstart = 99 -- open all folds by default
|
||||
vim.opt.fillchars = "fold:╌"
|
||||
|
||||
vim.g.GPGDefaultRecipients = {"C6772451703DE183A4983CBA063DC054484835A6"}
|
||||
|
||||
vim.o.expandtab = true -- Use spaces instead of tabs
|
||||
vim.o.shiftwidth = 4 -- Number of spaces per indentation
|
||||
vim.o.tabstop = 4 -- Number of spaces a tab counts for
|
||||
vim.o.smarttab = true -- Insert 'shiftwidth' spaces when pressing Tab
|
||||
vim.o.autoindent = true -- Maintain indent of current line
|
||||
vim.o.smartindent = true -- Smart auto-indenting
|
||||
|
||||
@@ -116,6 +116,36 @@ function M.get_newest_vl_file(files)
|
||||
return newest_file
|
||||
end
|
||||
|
||||
-- Function to insert chapter reference at top summary section
|
||||
local function add_chapter_to_summary(course, new_vl_name)
|
||||
local book_file = vim.fn.expand(conf.book_file)
|
||||
local rel_path = string.format("%s/VL/%s", course.path:match("university/(.+)$"), new_vl_name)
|
||||
local default_title = new_vl_name
|
||||
local chapter_line = string.format(' - #chapter("%s")[%s]\n', rel_path, default_title:match("^(.-)%."))
|
||||
|
||||
local lines = {}
|
||||
for l in io.lines(book_file) do
|
||||
table.insert(lines, l)
|
||||
end
|
||||
|
||||
local out = io.open(book_file, "w")
|
||||
local inserted = false
|
||||
local right_block = false
|
||||
for _, l in ipairs(lines) do
|
||||
-- insert after the course's existing index line
|
||||
if not inserted and l:match('"' .. course.path:match("university/(.+)$") .. '/index.typ"') then
|
||||
right_block = true
|
||||
end
|
||||
if not inserted and right_block and l:match("^%s*$") then
|
||||
out:write(chapter_line .. "\n" .. l)
|
||||
inserted = true
|
||||
else
|
||||
out:write(l .. "\n")
|
||||
end
|
||||
end
|
||||
out:close()
|
||||
end
|
||||
|
||||
-- Function to create a new VL file based on the template and incrementing the number
|
||||
function M.create_new_vl(course)
|
||||
local vl_dir = course.path .. "/VL"
|
||||
@@ -145,6 +175,8 @@ function M.create_new_vl(course)
|
||||
-- Copy the template if it exists
|
||||
vim.fn.system({ "cp", template_path, new_vl_path })
|
||||
|
||||
add_chapter_to_summary(course, new_vl_name)
|
||||
|
||||
-- Open the new VL file
|
||||
vim.cmd("edit " .. new_vl_path)
|
||||
else
|
||||
|
||||
@@ -20,6 +20,10 @@ return {
|
||||
-- 'Exafunction/windsurf.vim',
|
||||
-- event = 'BufEnter'
|
||||
--},
|
||||
{
|
||||
"Ascyii/vim-gnupg",
|
||||
dev = true
|
||||
},
|
||||
{
|
||||
"akinsho/toggleterm.nvim",
|
||||
config = function()
|
||||
@@ -45,7 +49,7 @@ return {
|
||||
'Ascyii/telekasten.nvim',
|
||||
dev = true,
|
||||
config = function()
|
||||
local base_zet = "~/synced/brainstore/zettelkasten"
|
||||
local base_zet = "~/Nextcloud/Notes"
|
||||
|
||||
-- Again can only use opts when not using config
|
||||
require("telekasten").setup({
|
||||
|
||||
@@ -27,6 +27,10 @@ return {
|
||||
"<leader>ti",
|
||||
":TypstarInsertRnote<CR>",
|
||||
},
|
||||
{
|
||||
"<leader>td",
|
||||
":TypstarDeleteRnote<CR>",
|
||||
},
|
||||
{
|
||||
"<leader>to",
|
||||
":TypstarOpenDrawing<CR>",
|
||||
|
||||
Reference in New Issue
Block a user