nvim

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit b665a09f772d4bd4f92c392f46d261c4de658b47
parent 61cc9befe40d29b28b617dce3ad4645b7961cae0
Author: AndrewLockVI <andrewlaack1@gmail.com>
Date:   Thu, 30 Jan 2025 06:33:47 -0600

Updated neovim to easily view markdown as pdf, rendering, etc.

Diffstat:
Mlua/core/keymaps.lua | 47+++++++++++++----------------------------------
Mlua/core/plugins.lua | 2+-
2 files changed, 14 insertions(+), 35 deletions(-)

diff --git a/lua/core/keymaps.lua b/lua/core/keymaps.lua @@ -1,8 +1,5 @@ vim.opt.spelllang = { "en_us" } - - - -- General config vim.opt.conceallevel = 0 vim.opt.number = true @@ -38,8 +35,6 @@ vim.cmd("autocmd TermOpen * startinsert") -- Exit out of terminal mode vim.api.nvim_set_keymap("t", "<C-r>", "<C-\\><C-n>", { noremap = true, silent = true }) - - -- Open netrw vim.api.nvim_set_keymap("n", "<leader>n", ":Ex<CR>", { noremap = true, silent = true }) @@ -145,33 +140,17 @@ vim.api.nvim_set_keymap('n', '<C-w>h', ':vsplit<CR>', { noremap = true, silent = vim.api.nvim_set_keymap('n', '<C-w>v', ':split<CR>', { noremap = true, silent = true }) --- leader+pn pastes notes template. - - -local notesFile = vim.fn.expand("~/.config/nvim/notes.md") - -local function load_file_to_clipboard() - local file = io.open(notesFile, "r") - if file then - -- Read the file content - local content = file:read("*a") - file:close() - - -- Set the content to the clipboard - vim.fn.setreg("+", content) - - -- Split the content into lines - local lines = vim.split(content, "\n", true) - - -- Paste the content into the current buffer - vim.api.nvim_put(lines, 'c', true, true) - else - print("Error: Unable to open file: " .. notesFile) - end -end - - --- Map the function to <leader>pn -vim.keymap.set("n", "<leader>pn", load_file_to_clipboard, { noremap = true, silent = true }) - vim.o.shortmess = vim.o.shortmess .. "I" + +vim.api.nvim_create_user_command("Pandoc", function(args) + vim.cmd( + "!pandoc -i " + .. vim.fn.fnameescape(vim.fn.expand("%")) + .. " -o " + .. vim.fn.fnameescape(vim.fn.expand("%:r")) + .. "." + .. args.args + ) +end, { + nargs = 1, +}) diff --git a/lua/core/plugins.lua b/lua/core/plugins.lua @@ -38,7 +38,7 @@ require("luasnip").config.set_config({ -- Setting LuaSnip config npairs.setup({}) - + -- -- lsp use({ "VonHeikemen/lsp-zero.nvim",