From 36d6a5cccbaefcf2354f74e6ce493b2cf4d297ae Mon Sep 17 00:00:00 2001 From: doylet Date: Tue, 28 Jan 2025 20:36:42 +1100 Subject: [PATCH] update nvim to use raddebugger and update nodejs --- Internal/os_nvim_init.vim | 53 +++++++++++++++-------------- app_manifest_dev.py | 70 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 96 insertions(+), 27 deletions(-) diff --git a/Internal/os_nvim_init.vim b/Internal/os_nvim_init.vim index 99a79b9..3c059a0 100644 --- a/Internal/os_nvim_init.vim +++ b/Internal/os_nvim_init.vim @@ -291,41 +291,44 @@ augroup persistent_settings au bufenter * :set formatoptions=q1j augroup end -function! RemedyBGOpenFile() - execute("!remedybg open-file " . expand("%:p") . " " . line(".")) - execute("!powershell -Command Add-Type -AssemblyName Microsoft.VisualBasic; [Microsoft.VisualBasic.Interaction]::AppActivate(' - RemedyBG')") +function! RADDbgOpenFile() + execute("!dev raddbg --ipc open " . substitute(expand("%:p"), '\\', '/', 'g')) + execute("!dev raddbg --ipc goto_line " . line(".")) + execute("!powershell -Command Add-Type -AssemblyName Microsoft.VisualBasic; [Microsoft.VisualBasic.Interaction]::AppActivate('The RAD Debugger')") endfunction -command RemedyBGOpenFile call RemedyBGOpenFile() +command RADDbgOpenFile call RADDbgOpenFile() -function! RemedyBGStartDebugging() - execute("!remedybg start-debugging " . expand("%:p") . " " . line(".")) +function! RADDbgStartDebugging() + execute("!dev raddbg --ipc run") endfunction -command RemedyBGStartDebugging call RemedyBGStartDebugging() +command RADDbgStartDebugging call RADDbgStartDebugging() -function! RemedyBGStopDebugging() - execute("!remedybg stop-debugging " . expand("%:p") . " " . line(".")) +function! RADDbgStopDebugging() + execute("!dev raddbg --ipc kill_all") endfunction -command RemedyBGStopDebugging call RemedyBGStopDebugging() +command RADDbgStopDebugging call RADDbgStopDebugging() -function! RemedyBGRunToCursor() - execute("!remedybg open-file " . expand("%:p") . " " . line(".")) - execute("!remedybg run-to-cursor " . expand("%:p") . " " . line(".")) - execute("!powershell -Command Add-Type -AssemblyName Microsoft.VisualBasic; [Microsoft.VisualBasic.Interaction]::AppActivate(' - RemedyBG')") +function! RADDbgRunToCursor() + execute("!dev raddbg --ipc open " . substitute(expand("%:p"), '\\', '/', 'g')) + execute("!dev raddbg --ipc goto_line " . line(".")) + execute("!dev raddbg --ipc run_to_cursor " . substitute(expand("%:p"), '\\', '/', 'g') . ":" . line(".")) + execute("!powershell -Command Add-Type -AssemblyName Microsoft.VisualBasic; [Microsoft.VisualBasic.Interaction]::AppActivate('The RAD Debugger')") endfunction -command RemedyBGRunToCursor call RemedyBGRunToCursor() +command RADDbgRunToCursor call RADDbgRunToCursor() -function! RemedyBGAddBreakpointAtFile() - execute("!remedybg open-file " . expand("%:p") . " " . line(".")) - execute("!remedybg add-breakpoint-at-file " . expand("%:p") . " " . line(".")) - execute("!powershell -Command Add-Type -AssemblyName Microsoft.VisualBasic; [Microsoft.VisualBasic.Interaction]::AppActivate(' - RemedyBG')") +function! RADDbgAddBreakpointAtFile() + execute("!dev raddbg --ipc open " . substitute(expand("%:p"), '\\', '/', 'g')) + execute("!dev raddbg --ipc goto_line " . line(".")) + execute("!dev raddbg --ipc toggle_breakpoint " . substitute(expand("%:p"), '\\', '/', 'g') . ":" . line(".")) + execute("!powershell -Command Add-Type -AssemblyName Microsoft.VisualBasic; [Microsoft.VisualBasic.Interaction]::AppActivate('The RAD Debugger')") endfunction -command RemedyBGAddBreakpointAtFile call RemedyBGAddBreakpointAtFile() +command RADDbgAddBreakpointAtFile call RADDbgAddBreakpointAtFile() -nnoremap RemedyBGOpenFile -nnoremap RemedyBGStartDebugging -nnoremap RemedyBGStopDebugging -nnoremap RemedyBGAddBreakpointAtFile -nnoremap RemedyBGRunToCursor +nnoremap RADDbgOpenFile +nnoremap RADDbgStartDebugging +nnoremap RADDbgStopDebugging +nnoremap RADDbgAddBreakpointAtFile +nnoremap RADDbgRunToCursor " General Key Bindings ///////////////////////////////////////////////////////////////////////////// " FZF Bindings diff --git a/app_manifest_dev.py b/app_manifest_dev.py index 0abd15d..baa90e5 100644 --- a/app_manifest_dev.py +++ b/app_manifest_dev.py @@ -879,7 +879,7 @@ def get_manifest(is_windows): { "path": exe_path, "symlink": symlink, - "add_to_devenv_path": True, + "add_to_devenv_path": False, "checksum": checksum, } ], @@ -888,13 +888,13 @@ def get_manifest(is_windows): ], }) + version = "18.15.0" if is_windows: download_url = f"https://nodejs.org/dist/v{version}/node-v{version}-win-x64.7z" download_checksum = "cad3cc0910dc216e8b6dcfc3c5b3be0a619c2d4a4b29f2e674820b70e4f374dd" checksum = "17fd75d8a41bf9b4c475143e19ff2808afa7a92f7502ede731537d9da674d5e8" add_to_devenv_script = [ - f"set PATH=%~dp0{label}\\{version}\\node_modules\\corepack\\shims;%PATH%", ] else: download_url = f"https://nodejs.org/dist/v{version}/node-v{version}-linux-x64.tar.xz" @@ -954,6 +954,72 @@ def get_manifest(is_windows): ], }) + version = "22.12.0" + if is_windows: + download_url = f"https://nodejs.org/dist/v{version}/node-v{version}-win-x64.7z" + download_checksum = "922285593360adbe1fcd16d4e0049a13552dcad085fa53768c21c8d17089a134" + checksum = "b3b117a08ee61efee09e6fd523ab33c0c018da1b570bde08e4fd914dc1170ed6" + add_to_devenv_script = [ ] + else: + download_url = f"https://nodejs.org/dist/v{version}/node-v{version}-linux-x64.tar.xz" + download_checksum = "asd" + checksum = "asd" + + result.append({ + "label": "NodeJS", + "manifests": [ + { + "download_checksum": download_checksum, + "download_url": download_url, + "version": version, + "unzip_method": 'default', + "executables": [ + { + "path": exe_path, + "symlink": symlink, + "add_to_devenv_path": True, + "checksum": checksum, + } + ], + "add_to_devenv_script": add_to_devenv_script, + } + ], + }) + + version = "23.5.0" + if is_windows: + download_url = f"https://nodejs.org/dist/v{version}/node-v{version}-win-x64.7z" + download_checksum = "4d86167dd98801c723a13e65519822d409b603acbec9b0d1107a4ad8578a7c53" + checksum = "0f91994f833bc232c990fee8694ca00d4d60c67f6cd0f7f0633c9abc34c91888" + add_to_devenv_script = [ + f"set PATH=%~dp0{label}\\{version}\\node_modules\\corepack\\shims;%PATH%", + ] + else: + download_url = f"https://nodejs.org/dist/v{version}/node-v{version}-linux-x64.tar.xz" + download_checksum = "asd" + checksum = "asd" + + result.append({ + "label": "NodeJS", + "manifests": [ + { + "download_checksum": download_checksum, + "download_url": download_url, + "version": version, + "unzip_method": 'default', + "executables": [ + { + "path": exe_path, + "symlink": symlink, + "add_to_devenv_path": True, + "checksum": checksum, + } + ], + "add_to_devenv_script": add_to_devenv_script, + } + ], + }) + # -------------------------------------------------------------------------- label = "Python"