Compare commits

..

2 commits

Author SHA1 Message Date
ee4640b186
nvim: Fix dial.nvim
Added more rules to dial increment default group so it works on some
more cases. Fixed key bindings.
2023-02-10 14:06:45 +01:00
0484556f04
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.
2023-02-10 12:08:16 +01:00
3 changed files with 36 additions and 7 deletions

View file

@ -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")

View file

@ -214,12 +214,12 @@ map("n", "<localleader>w", function() require("mini.trailspace").trim() end,
{ noremap = true })
-- PLUGIN: dial-increment
map("n", "<C-a>", require("dial.map").inc_normal(), { noremap = true })
map("n", "<C-x>", require("dial.map").dec_normal(), { noremap = true })
map("v", "<C-a>", require("dial.map").inc_visual(), { noremap = true })
map("v", "<C-x>", require("dial.map").dec_visual(), { noremap = true })
map("v", "g<C-a>", require("dial.map").inc_gvisual(), { noremap = true })
map("v", "g<C-x>", require("dial.map").dec_gvisual(), { noremap = true })
map("n", "<C-a>", '<Plug>(dial-increment)')
map("n", "<C-x>", '<Plug>(dial-decrement)')
map("v", "<C-a>", '<Plug>(dial-increment)')
map("v", "<C-x>", '<Plug>(dial-increment)')
map("v", "g<C-a>", 'g<Plug>(dial-increment)')
map("v", "g<C-x>", 'g<Plug>(dial-increment)')
-- PLUGIN: zettelkasten.nvim
map('n', '<cr>', [[:silent lua require 'zettelkasten'.link_follow()<cr>]])

View file

@ -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