chore: create cmd the lua way
This commit is contained in:
parent
48b5156c7f
commit
6ec4e28ad6
@ -28,6 +28,7 @@ opt.grepprg = 'rg --vimgrep --no-heading --smart-case --hidden'
|
||||
opt.grepformat = '%f:%l:%c:%m'
|
||||
|
||||
vim.api.nvim_create_user_command('Cd', 'lcd %:p:h', { nargs = 0 })
|
||||
vim.api.nvim_create_user_command('Grep', 'silent grep! <args> | TroubleToggle quickfix', { nargs = '+' })
|
||||
|
||||
local ignore_buftype = { 'quickfix', 'nofile', 'help' }
|
||||
local ignore_filetype = { 'gitcommit', 'gitrebase', 'svn', 'hgcommit' }
|
||||
@ -74,5 +75,3 @@ vim.api.nvim_create_autocmd({ 'BufWinEnter', 'FileType' }, {
|
||||
group = vim.api.nvim_create_augroup('nvim-lastplace', {}),
|
||||
callback = run,
|
||||
})
|
||||
|
||||
vim.cmd("command! -nargs=+ Grep execute 'silent grep! <args>' | copen")
|
||||
|
Loading…
Reference in New Issue
Block a user