diff --git a/home/profiles/shell/git.nix b/home/profiles/shell/git.nix index abe141b4..b3908d64 100644 --- a/home/profiles/shell/git.nix +++ b/home/profiles/shell/git.nix @@ -13,6 +13,15 @@ programs = { jujutsu = { enable = true; + settings = { + user = with tree.home.user.data; { + name = userName; + email = userEmail; + }; + }; + }; + jjui = { + enable = true; }; delta = { enable = true; diff --git a/home/profiles/shell/starship.nix b/home/profiles/shell/starship.nix index 7737c33e..2baceae5 100644 --- a/home/profiles/shell/starship.nix +++ b/home/profiles/shell/starship.nix @@ -1,4 +1,9 @@ -_: { +{ pkgs, lib, ... }: let + inherit (lib.meta) getExe; +in { + home.packages = [ + pkgs.starship-jj + ]; programs.starship = { enable = true; enableZshIntegration = true; @@ -6,6 +11,14 @@ _: { time = { disabled = false; }; + custom.jj = { + command = "prompt"; + format = "$output"; + ignore_timeout = true; + shell = ["${getExe pkgs.starship-jj}" "--ignore-working-copy" "starship"]; + use_stdin = false; + when = true; + }; }; }; } diff --git a/nixvim/plugins/lsp.nix b/nixvim/plugins/lsp.nix index 78109e64..0674353b 100644 --- a/nixvim/plugins/lsp.nix +++ b/nixvim/plugins/lsp.nix @@ -70,6 +70,7 @@ in { grammarPackages = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [ bash json + elixir make markdown regex diff --git a/packages/starship-jj.nix b/packages/starship-jj.nix new file mode 100644 index 00000000..0ea2de91 --- /dev/null +++ b/packages/starship-jj.nix @@ -0,0 +1,25 @@ +{ + lib, + fetchCrate, + rustPlatform, +}: +rustPlatform.buildRustPackage rec { + pname = "starship-jj"; + version = "0.7.0"; + + src = fetchCrate { + inherit pname version; + hash = "sha256-oisz3V3UDHvmvbA7+t5j7waN9NykMUWGOpEB5EkmYew="; + }; + + cargoHash = "sha256-NNeovW27YSK/fO2DjAsJqBvebd43usCw7ni47cgTth8="; + + meta = with lib; { + description = "Starship plugin for jj"; + homepage = "https://gitlab.com/lanastara_foss/starship-jj"; + maintainers = with maintainers; [ + nemith + ]; + license = licenses.mit; + }; +}