From 5b2f0966c71d3d723d9c9b26e05918de5fcf92a5 Mon Sep 17 00:00:00 2001 From: Emma Turner Date: Wed, 23 Apr 2025 11:08:00 -0600 Subject: [PATCH] Add scratchpad function Update README with new font and more info about mingw64 compiler installation --- README.md | 6 ++++-- lazyvim.json | 5 +++-- lua/config/keymaps.lua | 11 +++++++++++ 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1d981fd..1078149 100644 --- a/README.md +++ b/README.md @@ -9,13 +9,15 @@ A c compiler is required to install treesitter parsers. Currently using gcc from This can be installed from [https://github.com/niXman/mingw-builds-binaries/releases] +The `mingw64` folder will need to be "installed" (ex. moved to `C:\ProgramData\`) and added to the path for neovim to use it. + ### Nerd Font A "Nerd Font" is used to get the correct symbols used by LazyVim. -The Cascadia Code nerd font is CaskaydiaCove from the [Nerd Font site](https://www.nerdfonts.com/font-downloads). +Currently using "JetBrainsMono" no ligature (NL) nerd font from the [Nerd Font site](https://www.nerdfonts.com/font-downloads). -If using Neovim from the terminal, ensure the terminal font is set to CaskaydiaCove. +If using Neovim from the terminal, ensure the terminal font is set to JetBrainsMono. ### Programs diff --git a/lazyvim.json b/lazyvim.json index 35a8ef5..fd1a0db 100644 --- a/lazyvim.json +++ b/lazyvim.json @@ -5,8 +5,9 @@ "lazyvim.plugins.extras.lang.markdown", "lazyvim.plugins.extras.lang.rust" ], + "install_version": 7, "news": { - "NEWS.md": "11229" + "NEWS.md": "10960" }, - "version": 7 + "version": 8 } \ No newline at end of file diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index 92fdb4f..307c32b 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -4,3 +4,14 @@ vim.api.nvim_create_user_command("W", "w", {}) vim.api.nvim_create_user_command("Wq", "wq", {}) + +local function scratchpad() + local buf = vim.api.nvim_create_buf(false, true) + vim.api.nvim_buf_set_lines(buf, 0, -1, true, { "Scratch", "", "" }) + local win = vim.api.nvim_open_win(buf, true, { split = "left" }) + vim.api.nvim_win_set_cursor(win, { 3, 0 }) + -- " optional: change highlight, otherwise Pmenu is used + -- vim.api.nvim_set_option_value("winhl", "Normal:MyHighlight", { win = win }) +end + +vim.api.nvim_set_keymap("n", "fs", "", { callback = scratchpad, desc = "Open scratchpad" })