modules: move tui, gui, cli to programs
This commit is contained in:
parent
febb421800
commit
47a79eea64
106 changed files with 3 additions and 47 deletions
14
modules/programs/editors/nvf/runtime/after/ftplugin/json.lua
Normal file
14
modules/programs/editors/nvf/runtime/after/ftplugin/json.lua
Normal file
|
@ -0,0 +1,14 @@
|
|||
vim.keymap.set('n', '<leader>jf', '<cmd>%!jq<cr>', { noremap = true, silent = true, desc = 'Format with jq' })
|
||||
vim.keymap.set('n', '<leader>jm', '<cmd>%!jq -c<cr>', { noremap = true, silent = true, desc = 'Minify with jq' })
|
||||
|
||||
-- add comma to the end of the line on new line
|
||||
vim.keymap.set('n', 'o', function()
|
||||
local line = vim.api.nvim_get_current_line()
|
||||
|
||||
local should_add_comma = string.find(line, '[^,{[]$')
|
||||
if should_add_comma then
|
||||
return 'A,<cr>'
|
||||
else
|
||||
return 'o'
|
||||
end
|
||||
end, { buffer = true, expr = true })
|
Loading…
Add table
Add a link
Reference in a new issue