mirror of
https://github.com/RGBCube/ncc
synced 2025-07-30 03:27:45 +00:00
Fix lldb for helix
This commit is contained in:
parent
8ac83a419b
commit
45d0cd8312
8 changed files with 23 additions and 21 deletions
|
@ -81,7 +81,7 @@ in {
|
|||
gitUrl = "https://git.rgbcu.be/";
|
||||
gitDomain = head <| match "https://(.*)/" gitUrl;
|
||||
in {
|
||||
programs.nushell.configFile.text = mkAfter ''
|
||||
programs.nushell.configFile.text = mkAfter /* nu */ ''
|
||||
# Sets the remote origin to the specified user and repository on my git instance
|
||||
def gsr [user_and_repo: string] {
|
||||
let user_and_repo = if ($user_and_repo | str index-of "/") != -1 {
|
||||
|
|
|
@ -22,7 +22,7 @@ in {
|
|||
})];
|
||||
|
||||
home-manager.sharedModules = [{
|
||||
programs.nushell.configFile.text = mkIf (config.isDesktop && config.isLinux) <| mkAfter ''
|
||||
programs.nushell.configFile.text = mkIf (config.isDesktop && config.isLinux) <| mkAfter /* nu */ ''
|
||||
def --wrapped hx [...arguments] {
|
||||
if $env.TERM == "xterm-kitty" {
|
||||
kitty @ set-spacing padding=0
|
||||
|
@ -118,20 +118,22 @@ in {
|
|||
}];
|
||||
|
||||
args.program = "{0}";
|
||||
args.initCommands = [ "command script import ${pkgs.writeText "lldb_dap_rustc_primer.py" ''
|
||||
import subprocess
|
||||
import pathlib
|
||||
import lldb
|
||||
args.initCommands = let
|
||||
primer = pkgs.writeTextDir "lldb_dap_rustc_primer.py" /* py */ ''
|
||||
import subprocess
|
||||
import pathlib
|
||||
import lldb
|
||||
|
||||
# Not hardcoding a nix store path here on purpose.
|
||||
rustlib_etc = pathlib.Path(subprocess.getoutput("rustc --print sysroot")) / "lib" / "rustlib" / "etc"
|
||||
if not rustlib_etc.exists():
|
||||
raise RuntimeError("Unable to determine rustc sysroot")
|
||||
# Not hardcoding a nix store path here on purpose.
|
||||
rustlib_etc = pathlib.Path(subprocess.getoutput("rustc --print sysroot")) / "lib" / "rustlib" / "etc"
|
||||
if not rustlib_etc.exists():
|
||||
raise RuntimeError("Unable to determine rustc sysroot")
|
||||
|
||||
# Load lldb_lookup.py and execute lldb_commands with the correct path
|
||||
lldb.debugger.HandleCommand(f"""command script import "{rustlib_etc / 'lldb_lookup.py'}" """)
|
||||
lldb.debugger.HandleCommand(f"""command source -s 0 "{rustlib_etc / 'lldb_commands'}" """)
|
||||
''}" ];
|
||||
# Load lldb_lookup.py and execute lldb_commands with the correct path
|
||||
lldb.debugger.HandleCommand(f"""command script import "{rustlib_etc / 'lldb_lookup.py'}" """)
|
||||
lldb.debugger.HandleCommand(f"""command source -s 0 "{rustlib_etc / 'lldb_commands'}" """)
|
||||
'';
|
||||
in [ "command script import ${primer}/lldb_dab_rustc_primer.py" ];
|
||||
}];
|
||||
}
|
||||
];
|
||||
|
|
|
@ -38,7 +38,7 @@ in {
|
|||
];
|
||||
|
||||
home-manager.sharedModules = [{
|
||||
programs.nushell.configFile.text = mkAfter ''
|
||||
programs.nushell.configFile.text = mkAfter /* nu */ ''
|
||||
def --wrapped nr [program: string = "", ...arguments] {
|
||||
if ($program | str contains "#") or ($program | str contains ":") {
|
||||
nix run $program -- ...$arguments
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ lib, ... }: let
|
||||
inherit (lib) enabled;
|
||||
in {
|
||||
environment.shellAliases.todo = ''rg "todo|fixme" --colors match:fg:yellow --colors match:style:bold'';
|
||||
environment.shellAliases.todo = /* sh */ ''rg "todo|fixme" --colors match:fg:yellow --colors match:style:bold'';
|
||||
|
||||
home-manager.sharedModules = [{
|
||||
programs.ripgrep = enabled {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue