fix: when using cursor or vscode, use only keymap settings, else use everything
This commit is contained in:
parent
5bebc11dcb
commit
6822a71685
1 changed files with 45 additions and 36 deletions
29
init.lua
29
init.lua
|
@ -1,17 +1,25 @@
|
||||||
require("pika.core")
|
if vim.g.vscode then
|
||||||
require("pika.lazy")
|
require("pika.core")
|
||||||
|
else
|
||||||
|
require("pika.core")
|
||||||
|
require("pika.lazy")
|
||||||
|
|
||||||
-- ─< Call the function to set the desired colorscheme >────────────────────────────────
|
-- ─< Call the function to set the desired colorscheme >────────────────────────────────
|
||||||
-- ╭──────────────────────────────────────────────────────╮
|
-- ╭──────────────────────────────────────────────────────╮
|
||||||
-- │ themes are under ./lua/pika/plugins/colorschemes.lua │
|
-- │ themes are under ./lua/pika/plugins/colorschemes.lua │
|
||||||
-- ╰──────────────────────────────────────────────────────╯
|
-- ╰──────────────────────────────────────────────────────╯
|
||||||
|
|
||||||
vim.cmd.colorscheme("oldschool")
|
vim.cmd.colorscheme("oldschool")
|
||||||
|
|
||||||
-- Keybind for saving clipboard screenshot and inserting a Markdown link
|
-- Keybind for saving clipboard screenshot and inserting a Markdown link
|
||||||
vim.api.nvim_set_keymap("n", "<leader>ps", ":lua SaveScreenshotAndInsertLink()<CR>", { noremap = true, silent = true })
|
vim.api.nvim_set_keymap(
|
||||||
|
"n",
|
||||||
|
"<leader>ps",
|
||||||
|
":lua SaveScreenshotAndInsertLink()<CR>",
|
||||||
|
{ noremap = true, silent = true }
|
||||||
|
)
|
||||||
|
|
||||||
function SaveScreenshotAndInsertLink()
|
function SaveScreenshotAndInsertLink()
|
||||||
-- Prompt for Hugo base directory if needed
|
-- Prompt for Hugo base directory if needed
|
||||||
|
|
||||||
-- Define the Hugo base directory and screenshot subfolder path
|
-- Define the Hugo base directory and screenshot subfolder path
|
||||||
|
@ -41,4 +49,5 @@ function SaveScreenshotAndInsertLink()
|
||||||
vim.api.nvim_put({ img_markdown }, "c", true, true)
|
vim.api.nvim_put({ img_markdown }, "c", true, true)
|
||||||
|
|
||||||
print("Screenshot saved and link added: " .. full_path)
|
print("Screenshot saved and link added: " .. full_path)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue