A bunch of changes, mostly to neovim
- global abbreviations - better firenvim setup - magma.nvim (never used it, might unisntall)
This commit is contained in:
parent
d573e17a00
commit
bf7427d8c7
11 changed files with 125 additions and 21 deletions
dotfiles/neovim/lua/my/abbreviations
30
dotfiles/neovim/lua/my/abbreviations/init.lua
Normal file
30
dotfiles/neovim/lua/my/abbreviations/init.lua
Normal file
|
@ -0,0 +1,30 @@
|
|||
local M = {}
|
||||
|
||||
function M.localAbbr(lhs, rhs)
|
||||
-- Create abbreviation
|
||||
vim.cmd(":iabbrev <buffer> " .. lhs .. " " .. rhs)
|
||||
end
|
||||
|
||||
function M.manyLocalAbbr(abbreviations)
|
||||
for _, value in pairs(abbreviations) do
|
||||
M.localAbbr(value[1], value[2])
|
||||
end
|
||||
end
|
||||
|
||||
function M.abbr(lhs, rhs)
|
||||
-- Create abbreviation
|
||||
vim.cmd(":iabbrev " .. lhs .. " " .. rhs)
|
||||
end
|
||||
|
||||
function M.manyGlobalAbbr(abbreviations)
|
||||
for _, value in pairs(abbreviations) do
|
||||
M.abbr(value[1], value[2])
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function M.setup()
|
||||
require("my.abbreviations.global").setup()
|
||||
end
|
||||
|
||||
return M
|
Loading…
Add table
Add a link
Reference in a new issue