From 545505e99500c79b2d47176e28c01cbeb1aecf48 Mon Sep 17 00:00:00 2001 From: zsmith Date: Tue, 26 Aug 2025 09:23:21 -0500 Subject: Add vimwiki to nvim --- nvim/init.lua | 1 + nvim/lua/plugins.lua | 1 + nvim/lua/vimwiki.lua | 8 ++++++++ 3 files changed, 10 insertions(+) create mode 100644 nvim/lua/vimwiki.lua diff --git a/nvim/init.lua b/nvim/init.lua index 4b295d5..06b973a 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -4,3 +4,4 @@ require('lsp') require('plugins') require('colorscheme') require('term') +require('vimwiki') diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua index f90b09c..183a20d 100644 --- a/nvim/lua/plugins.lua +++ b/nvim/lua/plugins.lua @@ -14,6 +14,7 @@ vim.opt.rtp:prepend(lazypath) require("lazy").setup({ -- LSP manager { "mason-org/mason.nvim", opts = {} }, + "vimwiki/vimwiki", { "mason-org/mason-lspconfig.nvim", dependencies = { diff --git a/nvim/lua/vimwiki.lua b/nvim/lua/vimwiki.lua new file mode 100644 index 0000000..c7a815b --- /dev/null +++ b/nvim/lua/vimwiki.lua @@ -0,0 +1,8 @@ +vim.opt.compatible = false + +local opts = { + noremap = false, + silent = true, +} + +vim.keymap.set('n', 'wx', 'VimwikiIndex', opts) -- cgit v1.2.3 From de3dc541e71f1c37e877cec6f6afbe5075436750 Mon Sep 17 00:00:00 2001 From: zsmith Date: Tue, 26 Aug 2025 09:23:54 -0500 Subject: Fix resize maps in nvim --- nvim/lua/keymaps.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nvim/lua/keymaps.lua b/nvim/lua/keymaps.lua index 4f4a489..ff04b7d 100644 --- a/nvim/lua/keymaps.lua +++ b/nvim/lua/keymaps.lua @@ -23,10 +23,10 @@ vim.keymap.set('n', '', ':resize -2', opts) vim.keymap.set('n', '', ':resize +2', opts) vim.keymap.set('n', '', ':vertical resize -2', opts) vim.keymap.set('n', '', ':vertical resize +2', opts) -vim.keymap.set('n', 'wh :vertical resize', '-1') -vim.keymap.set('n', 'wj :resize', '-1') -vim.keymap.set('n', 'wk :resize', '+1') -vim.keymap.set('n', 'wl :vertical resize', '+1') +vim.keymap.set('n', 'wh', ':vertical resize -1') +vim.keymap.set('n', 'wj', ':resize -1') +vim.keymap.set('n', 'wk', ':resize +1') +vim.keymap.set('n', 'wl', ':vertical resize +1') -- NerdTREE vim.keymap.set('n', 'tt', ':NERDTreeToggle') -- cgit v1.2.3 From de445f9cf40a4e9c2e4ae87cc2ee7499208cd4ae Mon Sep 17 00:00:00 2001 From: zsmith Date: Wed, 27 Aug 2025 10:24:11 -0500 Subject: Move vimwiki path to ~/.local/share This is more XDG compliant. --- nvim/lua/plugins.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua index 183a20d..3684b89 100644 --- a/nvim/lua/plugins.lua +++ b/nvim/lua/plugins.lua @@ -14,7 +14,15 @@ vim.opt.rtp:prepend(lazypath) require("lazy").setup({ -- LSP manager { "mason-org/mason.nvim", opts = {} }, - "vimwiki/vimwiki", + {"vimwiki/vimwiki", + init = function() + vim.g.vimwiki_list = { + { + path = '~/.local/share/vimwiki' + }, + } + end, + }, { "mason-org/mason-lspconfig.nvim", dependencies = { -- cgit v1.2.3 From 6d41b928fad9c472281d6ea0d058e3eca58a1e15 Mon Sep 17 00:00:00 2001 From: zsmith Date: Wed, 27 Aug 2025 10:24:40 -0500 Subject: Add comments to vimwiki --- nvim/lua/vimwiki.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nvim/lua/vimwiki.lua b/nvim/lua/vimwiki.lua index c7a815b..43b8aa6 100644 --- a/nvim/lua/vimwiki.lua +++ b/nvim/lua/vimwiki.lua @@ -1,5 +1,7 @@ +-- Required for Vimwiki to work vim.opt.compatible = false +-- Vimwiki Keybindings local opts = { noremap = false, silent = true, -- cgit v1.2.3