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 the parsers don't exist download them
if found[0] < 2 and if found[0] < 2 and
(not found["norg.so"] or not found["norg_meta.so"]) then (not found["norg.so"] or not found["norg_meta.so"]) then
vim.cmd("Neorg sync-parsers") vim.cmd.Neorg("sync-parsers")
end end
-- set colorcolumn in norg buffers -- 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 if vim.fn.empty(vim.fn.glob(path)) > 0 then
vim.fn.system({ "git", "clone", "--depth=1", "https://git.squi.bid/dep", path }) vim.fn.system({ "git", "clone", "--depth=1", "https://git.squi.bid/dep", path })
end end
vim.cmd("packadd dep") vim.cmd.packadd("dep")
-- load miscellaneous utilities -- load miscellaneous utilities
local misc = require('core.misc') local misc = require('core.misc')

View File

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

View File

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

View File

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

View File

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