summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/core
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/core')
-rw-r--r--.config/nvim/lua/core/keymaps.lua6
-rw-r--r--.config/nvim/lua/core/lazy.lua21
-rw-r--r--.config/nvim/lua/core/options.lua2
3 files changed, 20 insertions, 9 deletions
diff --git a/.config/nvim/lua/core/keymaps.lua b/.config/nvim/lua/core/keymaps.lua
index 95e5fcd..318cfc7 100644
--- a/.config/nvim/lua/core/keymaps.lua
+++ b/.config/nvim/lua/core/keymaps.lua
@@ -49,6 +49,11 @@ map("n", "<leader>lp", "gewi[[/papers/<ESC>Ea]]<ESC>", "vimwiki: link wrap word
49-- call CreateReference on word below cursor 49-- call CreateReference on word below cursor
50map("n", "<leader>nr", '<cmd>call CreateReference(expand("<cword>"))<CR>', "vimwiki: new reference word under cursor") 50map("n", "<leader>nr", '<cmd>call CreateReference(expand("<cword>"))<CR>', "vimwiki: new reference word under cursor")
51 51
52-- nr2char(10) is, of course, a newline character
53map("n", "<leader>yp",
54 "<cmd>call setreg('+', expand('%:h') . '/' . expand('%:t') . ':' . line('.') . nr2char(10) . getline('.'))<CR>",
55 "yank the current line contents, filename and line number to clipboard")
56
52-- create a new note 57-- create a new note
53map("n", "<leader>nn", "<cmd>call CreateNote()<CR>", "vimwiki: new note for slipbox") 58map("n", "<leader>nn", "<cmd>call CreateNote()<CR>", "vimwiki: new note for slipbox")
54 59
@@ -70,6 +75,7 @@ map('n', "'", '`')
70map("n", "n", "nzzzv") 75map("n", "n", "nzzzv")
71map("n", "N", "Nzzzv") 76map("n", "N", "Nzzzv")
72 77
78
73-- switch between light and dark modes 79-- switch between light and dark modes
74map("n", "<leader>ut", function() 80map("n", "<leader>ut", function()
75 if vim.o.background == "dark" then 81 if vim.o.background == "dark" then
diff --git a/.config/nvim/lua/core/lazy.lua b/.config/nvim/lua/core/lazy.lua
index 8a91029..815953f 100644
--- a/.config/nvim/lua/core/lazy.lua
+++ b/.config/nvim/lua/core/lazy.lua
@@ -1,14 +1,17 @@
1-- install lazy.nvim if not already installed 1-- install lazy.nvim if not already installed
2local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" 2local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
3if not vim.loop.fs_stat(lazypath) then 3if not (vim.uv or vim.loop).fs_stat(lazypath) then
4 vim.fn.system({ 4 local lazyrepo = "https://github.com/folke/lazy.nvim.git"
5 "git", 5 local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
6 "clone", 6 if vim.v.shell_error ~= 0 then
7 "--filter=blob:none", 7 vim.api.nvim_echo({
8 "https://github.com/folke/lazy.nvim.git", 8 { "Failed to clone lazy.nvim:\n", "ErrorMsg" },
9 "--branch=stable", -- latest stable release 9 { out, "WarningMsg" },
10 lazypath, 10 { "\nPress any key to exit..." },
11 }) 11 }, true, {})
12 vim.fn.getchar()
13 os.exit(1)
14 end
12end 15end
13vim.opt.rtp:prepend(lazypath) 16vim.opt.rtp:prepend(lazypath)
14 17
diff --git a/.config/nvim/lua/core/options.lua b/.config/nvim/lua/core/options.lua
index 1a45b8f..9962f4f 100644
--- a/.config/nvim/lua/core/options.lua
+++ b/.config/nvim/lua/core/options.lua
@@ -63,6 +63,8 @@ local opts = {
63 -- switch case labels 63 -- switch case labels
64 cinoptions = "l1", 64 cinoptions = "l1",
65 65
66 signcolumn = "yes:1",
67
66} 68}
67 69
68for opt, val in pairs(opts) do 70for opt, val in pairs(opts) do