This commit is contained in:
parent
de653486ac
commit
cef1853601
@ -23,6 +23,10 @@ vim.{{ t }}["{{ k }}"]{% if v is defined %}={% if v is integer or v is boolean %
|
|||||||
{{- cfg("options", neovim.config.options) }}
|
{{- cfg("options", neovim.config.options) }}
|
||||||
|
|
||||||
-- NeoVIM functions
|
-- NeoVIM functions
|
||||||
|
function JsonFormat()
|
||||||
|
vim.cmd("% !jq")
|
||||||
|
end
|
||||||
|
|
||||||
function RemoveComments()
|
function RemoveComments()
|
||||||
vim.cmd.normal("g/^#/d")
|
vim.cmd.normal("g/^#/d")
|
||||||
vim.cmd.normal("g/^$/d")
|
vim.cmd.normal("g/^$/d")
|
||||||
@ -32,6 +36,7 @@ function Reformat()
|
|||||||
vim.cmd.normal("gg=G")
|
vim.cmd.normal("gg=G")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
vim.api.nvim_command("command! JsonFormat call luaeval('JsonFormat()')")
|
||||||
vim.api.nvim_command("command! Reformat call luaeval('Reformat()')")
|
vim.api.nvim_command("command! Reformat call luaeval('Reformat()')")
|
||||||
vim.api.nvim_command("command! RemoveComments call luaeval('RemoveComments()')")
|
vim.api.nvim_command("command! RemoveComments call luaeval('RemoveComments()')")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user