Update nvimrc
This commit is contained in:
parent
c77c6bb61a
commit
d871d6fe75
8
nvimrc
8
nvimrc
|
@ -185,7 +185,7 @@ _G._build_test_cmd = function()
|
||||||
local bufnr = vim.call("bufnr", "%")
|
local bufnr = vim.call("bufnr", "%")
|
||||||
local filetype = vim.call("getbufvar", bufnr, "&filetype")
|
local filetype = vim.call("getbufvar", bufnr, "&filetype")
|
||||||
if filetype == "" then
|
if filetype == "" then
|
||||||
print("cannot build test command for filetype:", filetype)
|
vim.api.nvim_err_writeln("cannot build test command for filetype:" .. filetype)
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -198,11 +198,11 @@ _G._build_test_cmd = function()
|
||||||
path = path:gsub("/app/", "/spec/"):gsub([[.rb$]], "_spec.rb")
|
path = path:gsub("/app/", "/spec/"):gsub([[.rb$]], "_spec.rb")
|
||||||
end
|
end
|
||||||
|
|
||||||
return "bundle exec rspec --format=progress " .. path
|
return "zeus rspec --format=progress --no-profile " .. path
|
||||||
elseif filetype == "go" then
|
elseif filetype == "go" then
|
||||||
return "go test " .. path:gsub("^(.*)/(.*go)$", "%1/...")
|
return "go test " .. path:gsub("^(.*)/(.*go)$", "%1/...")
|
||||||
else
|
else
|
||||||
print("filetype not supported:", filetype)
|
vim.api.nvim_err_writeln("filetype not supported: " .. filetype)
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -303,8 +303,8 @@ function! OpenGitURLToLineOrRange() range
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
nnoremap <leader>as :Git<cr>
|
||||||
nnoremap <leader>ab :Git blame<cr>
|
nnoremap <leader>ab :Git blame<cr>
|
||||||
nnoremap <leader>as :Gstatus<cr>
|
|
||||||
nnoremap <leader>ac :Commits<cr>
|
nnoremap <leader>ac :Commits<cr>
|
||||||
nnoremap <leader>ah :GitGutterLineHighlightsToggle<cr>
|
nnoremap <leader>ah :GitGutterLineHighlightsToggle<cr>
|
||||||
nnoremap <leader>aY :call CopyGitURLToLineOrRange()<cr>
|
nnoremap <leader>aY :call CopyGitURLToLineOrRange()<cr>
|
||||||
|
|
Loading…
Reference in New Issue