From 0484556f04a40523a04b4658e12362e48f94e051 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 10 Feb 2023 12:08:16 +0100 Subject: [PATCH 1/2] nvim: Fix spell dictionary not able to be found Added the previously important 'site' directory to the runtime path of neovim so it stops complaining about not finding spell dictionaries on starting up with a spell-enabled file. --- nvim/.config/nvim/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 8a7789d..397cd86 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -43,7 +43,7 @@ if not vim.loop.fs_stat(lazypath) then lazypath, }) end -vim.opt.rtp:prepend (lazypath) +vim.opt.rtp:prepend(lazypath) -- set our leader key to space since with hjkl, space is largely useless -- needs to be set before lazy.nvim is loaded @@ -54,3 +54,5 @@ require("lazy").setup("plugins") require('look') require('maps') +-- to include e.g. the spell dictionaries for vim +vim.opt.rtp:append(vim.fn.stdpath("data") .. "/site") From ee4640b18612e9bb7829d036b41ca19904a5b1ff Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 10 Feb 2023 14:03:05 +0100 Subject: [PATCH 2/2] nvim: Fix dial.nvim Added more rules to dial increment default group so it works on some more cases. Fixed key bindings. --- nvim/.config/nvim/lua/maps.lua | 12 ++++++------ nvim/.config/nvim/lua/plugins.lua | 27 +++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/nvim/.config/nvim/lua/maps.lua b/nvim/.config/nvim/lua/maps.lua index bb41f83..add7290 100644 --- a/nvim/.config/nvim/lua/maps.lua +++ b/nvim/.config/nvim/lua/maps.lua @@ -214,12 +214,12 @@ map("n", "w", function() require("mini.trailspace").trim() end, { noremap = true }) -- PLUGIN: dial-increment -map("n", "", require("dial.map").inc_normal(), { noremap = true }) -map("n", "", require("dial.map").dec_normal(), { noremap = true }) -map("v", "", require("dial.map").inc_visual(), { noremap = true }) -map("v", "", require("dial.map").dec_visual(), { noremap = true }) -map("v", "g", require("dial.map").inc_gvisual(), { noremap = true }) -map("v", "g", require("dial.map").dec_gvisual(), { noremap = true }) +map("n", "", '(dial-increment)') +map("n", "", '(dial-decrement)') +map("v", "", '(dial-increment)') +map("v", "", '(dial-increment)') +map("v", "g", 'g(dial-increment)') +map("v", "g", 'g(dial-increment)') -- PLUGIN: zettelkasten.nvim map('n', '', [[:silent lua require 'zettelkasten'.link_follow()]]) diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index 31abaf4..baae4bc 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -25,6 +25,33 @@ return { {'kylechui/nvim-surround', version = '*', config = true, event = "VeryLazy"}, -- surround things with other things using ys/cs/ds { 'monaqa/dial.nvim', -- extend the ^a / ^x possibilities to dates, hex, alphabets, markdown headers + config = function() + local augend = require("dial.augend") + require("dial.config").augends:register_group { + -- default augends used when no group name is specified + default = { + augend.integer.alias.decimal, augend.integer.alias.hex, + augend.date.alias["%Y/%m/%d"], + augend.date.alias["%Y-%m-%d"], augend.date.alias["%m/%d"], + augend.date.alias["%H:%M:%S"], augend.date.alias["%H:%M"], + augend.constant.alias.de_weekday_full, + augend.constant.alias.de_weekday, + augend.constant.alias.bool, augend.semver.alias.semver, + augend.constant.alias.Alpha, augend.constant.alias.alpha, + augend.hexcolor.new { case = "lower" }, augend.constant.new { + elements = { "and", "or" }, + word = true, -- if false, "sand" is incremented into "sor", "doctor" into "doctand", etc. + cyclic = true -- "or" is incremented into "and". + }, + augend.constant + .new { + elements = { "&&", "||" }, + word = false, + cyclic = true + } + } + } + end, event = "VeryLazy" }, { 'tommcdo/vim-exchange', -- adds exchange operator with cx. common use: cxiw . on 2 words to switch