make vim.cmd calls more fancy

This commit is contained in:
2024-11-19 13:13:33 -06:00
parent fda8909c9c
commit 95fcc5e416
6 changed files with 7 additions and 7 deletions

View File

@ -17,7 +17,7 @@ end, "so")
-- if the parsers don't exist download them
if found[0] < 2 and
(not found["norg.so"] or not found["norg_meta.so"]) then
vim.cmd("Neorg sync-parsers")
vim.cmd.Neorg("sync-parsers")
end
-- set colorcolumn in norg buffers

View File

@ -6,7 +6,7 @@ local path = vim.fn.stdpath("data").."/site/pack/deps/opt/dep"
if vim.fn.empty(vim.fn.glob(path)) > 0 then
vim.fn.system({ "git", "clone", "--depth=1", "https://git.squi.bid/dep", path })
end
vim.cmd("packadd dep")
vim.cmd.packadd("dep")
-- load miscellaneous utilities
local misc = require('core.misc')

View File

@ -26,8 +26,8 @@ auto('BufRead', {
group = bufcheck,
desc = 'Return to the last place the buffer was closed in.',
callback = function()
vim.cmd([[call setpos(".", getpos("'\""))]])
vim.api.nvim_input('zz')
vim.cmd.call([[setpos(".", getpos("'\""))]])
end
})

View File

@ -1,6 +1,6 @@
return { 'b0o/incline.nvim',
function()
vim.cmd('set laststatus=3')
vim.cmd.set('laststatus=3')
require('incline').setup {
hide = {

View File

@ -7,7 +7,7 @@ return { 'nvim-telescope/telescope.nvim',
'nvim-lua/plenary.nvim',
{ 'nvim-telescope/telescope-fzf-native.nvim',
config = function()
vim.cmd('make')
vim.cmd.make()
end
}
},

View File

@ -29,10 +29,10 @@ end
--- set colorscheme
---@param name string name of colorscheme
function M.colorscheme(name)
vim.cmd('colorscheme '..name)
vim.cmd.colorscheme(name)
for _, v in pairs(vim.fn.getcompletion('', 'color')) do
if v == name..'.ext' then
vim.cmd('colorscheme '..name..'.ext')
vim.cmd.colorscheme(name..'.ext')
end
end
end