Fix build.bat execution in nvim, echo executed msys command

This commit is contained in:
doylet 2024-04-09 21:27:37 +10:00
parent 5c8954036d
commit 94fdcda5ef
2 changed files with 12 additions and 11 deletions

View File

@ -1,4 +1,4 @@
" Plugins ==========================================================================================
" Plugins //////////////////////////////////////////////////////////////////////////////////////////
call plug#begin(stdpath('config') . '/plugged')
" nerdtree provides a file tree explorer
" vim-dispatch allows running async jobs in vim (i.e. builds in the background)
@ -42,7 +42,7 @@ call plug#begin(stdpath('config') . '/plugged')
" lsp-zero end
call plug#end()
" Lua Setup ========================================================================================
" Lua Setup ////////////////////////////////////////////////////////////////////////////////////////
lua <<EOF
local leap = require('leap')
vim.keymap.set({'n', 'x', 'o'}, '<tab>', '<Plug>(leap-forward-to)')
@ -63,7 +63,7 @@ lua <<EOF
vim.o.shellslash = true
vim.o.makeprg = "./build.sh"
else
vim.o.makeprg = "./build.bat"
vim.o.makeprg = "build.bat"
end
else
-- vim.api.nvim_set_keymap('t', '<Esc>', '<C-\\><C-n>', {noremap = true})
@ -122,7 +122,7 @@ lua <<EOF
formatting = cmp_format,
})
-- LLM ===========================================================================================
-- LLM ///////////////////////////////////////////////////////////////////////////////////////////
-- local llm = require('llm')
-- llm.setup({
-- api_token = nil, -- cf Install paragraph
@ -157,7 +157,7 @@ lua <<EOF
-- enable_suggestions_on_files = "*", -- pattern matching syntax to enable suggestions on specific files, either a string or a list of strings
-- })
-- Harpoon =======================================================================================
-- Harpoon ///////////////////////////////////////////////////////////////////////////////////////
local harpoon = require('harpoon')
harpoon:setup()
vim.keymap.set("n", "<M-0>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
@ -169,7 +169,7 @@ lua <<EOF
vim.keymap.set("n", "<M-h>", function() harpoon:list():prev() end)
vim.keymap.set("n", "<M-l>", function() harpoon:list():next() end)
-- Treesitter ====================================================================================
-- Treesitter ////////////////////////////////////////////////////////////////////////////////////
-- TODO: 2022-06-19 Treesitter is too slow on large C++ files
-- require('nvim-treesitter.configs').setup {
-- ensure_installed = { "c", "cpp" }, -- A list of parser names, or "all"
@ -193,7 +193,7 @@ lua <<EOF
-- },
-- }
-- Vim Options ===================================================================================
-- Vim Options ///////////////////////////////////////////////////////////////////////////////////
vim.opt.autowrite=true -- Automatically save before cmds like :next and :prev
vim.opt.colorcolumn={80, 100} -- Set a 80 and 100 char column ruler
vim.opt.completeopt={'menu', 'menuone', 'noselect'}
@ -229,7 +229,7 @@ lua <<EOF
]])
EOF
" Theme ============================================================================================
" Theme ////////////////////////////////////////////////////////////////////////////////////////////
let g:gruvbox_material_background='hard'
let g:gruvbox_material_foreground='mix'
let g:gruvbox_material_disable_italic_comment=1
@ -253,7 +253,7 @@ let g:cpp_member_highlight = 0
" (affects both C and C++ files)
let g:cpp_simple_highlight = 1
" Options ==========================================================================================
" Options //////////////////////////////////////////////////////////////////////////////////////////
" Show EOL type and last modified timestamp, right after the filename
set statusline=%<%F%h%m%r\ [%{&ff}]\ (%{strftime(\"%H:%M\ %d/%m/%Y\",getftime(expand(\"%:p\")))})%=%l,%c%V\ %P
@ -272,7 +272,7 @@ if has('mouse')
set mouse=a
endif
" Functions ========================================================================================
" Functions ////////////////////////////////////////////////////////////////////////////////////////
" Increase font size using (Ctrl+Up Arrow) or (Ctrl+Down Arrow) if we are using
" gvim Otherwise font size is determined in terminal
nnoremap <C-Up> :silent! let &guifont = substitute(
@ -328,7 +328,7 @@ nnoremap <silent> <S-F5> <cmd>RemedyBGStopDebugging<cr><cr>
nnoremap <silent> <F9> <cmd>RemedyBGAddBreakpointAtFile<cr><cr>
nnoremap <silent> <C-F10> <cmd>RemedyBGRunToCursor<cr><cr>
" General Key Bindings =============================================================================
" General Key Bindings /////////////////////////////////////////////////////////////////////////////
" FZF Bindings
nnoremap <leader>h <cmd>FzfLua oldfiles<cr>
nnoremap <leader>f <cmd>FzfLua files<cr>

View File

@ -24,4 +24,5 @@ goto :eof
set msys_env=%~1
for /f "tokens=1,* delims= " %%a in ("%*") do set remaining_args=%%b
echo [SCRIPT] Executing '%devenver_root%\MSYS2\20240113\msys2_shell.cmd -%msys_env% -no-start -defterm -here -c "%remaining_args%"'
%devenver_root%\MSYS2\20240113\msys2_shell.cmd -%msys_env% -no-start -defterm -here -c "%remaining_args%"