Update nvimrc

This commit is contained in:
Rob Watson 2021-07-27 09:05:29 +02:00
parent c77c6bb61a
commit d871d6fe75
1 changed files with 4 additions and 4 deletions

8
nvimrc
View File

@ -185,7 +185,7 @@ _G._build_test_cmd = function()
local bufnr = vim.call("bufnr", "%")
local filetype = vim.call("getbufvar", bufnr, "&filetype")
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
end
@ -198,11 +198,11 @@ _G._build_test_cmd = function()
path = path:gsub("/app/", "/spec/"):gsub([[.rb$]], "_spec.rb")
end
return "bundle exec rspec --format=progress " .. path
return "zeus rspec --format=progress --no-profile " .. path
elseif filetype == "go" then
return "go test " .. path:gsub("^(.*)/(.*go)$", "%1/...")
else
print("filetype not supported:", filetype)
vim.api.nvim_err_writeln("filetype not supported: " .. filetype)
return nil
end
end
@ -303,8 +303,8 @@ function! OpenGitURLToLineOrRange() range
endif
endfunction
nnoremap <leader>as :Git<cr>
nnoremap <leader>ab :Git blame<cr>
nnoremap <leader>as :Gstatus<cr>
nnoremap <leader>ac :Commits<cr>
nnoremap <leader>ah :GitGutterLineHighlightsToggle<cr>
nnoremap <leader>aY :call CopyGitURLToLineOrRange()<cr>