Change :Build{Dir} commands to global from buffer
This commit is contained in:
parent
61d734fbc0
commit
776fb1f204
@ -151,17 +151,15 @@ function build.list_targets()
|
||||
return targets
|
||||
end
|
||||
|
||||
local buffer = vim.api.nvim_get_current_buf()
|
||||
|
||||
-- Create :BuildDir command
|
||||
vim.api.nvim_buf_create_user_command(buffer, 'BuildDir', function(opts)
|
||||
vim.api.nvim_create_user_command('BuildDir', function(opts)
|
||||
build.set_dir(opts.fargs[1])
|
||||
end, {
|
||||
bang = true, nargs = '?', complete = build.list_dirs,
|
||||
})
|
||||
|
||||
-- Create :Build command
|
||||
vim.api.nvim_buf_create_user_command(buffer, 'Build', function(opts)
|
||||
vim.api.nvim_create_user_command('Build', function(opts)
|
||||
build.run(opts.fargs)
|
||||
end, {
|
||||
bang = true, nargs = '*', complete = build.list_targets,
|
||||
|
Loading…
x
Reference in New Issue
Block a user