From 5fdef5173dd1251f457266b0b98ccaecb8394a12 Mon Sep 17 00:00:00 2001 From: DustVoice Date: Fri, 17 Feb 2023 08:29:39 +0100 Subject: [PATCH] Update nushell config, update doom package list --- .config/nushell/env.nu | 34 +++++++++---------- .config/nushell/history.txt | 66 +++++++++++++++++++++++++++++++++++++ .doom.d/config.el | 61 ++++++++++++++++++++++++++-------- .doom.d/init.el | 4 +-- .doom.d/packages.el | 40 ++++++++++++---------- .emacs.d | 2 +- 6 files changed, 155 insertions(+), 52 deletions(-) diff --git a/.config/nushell/env.nu b/.config/nushell/env.nu index a8827868..129d23de 100644 --- a/.config/nushell/env.nu +++ b/.config/nushell/env.nu @@ -2,28 +2,28 @@ let-env STARSHIP_SHELL = "nu" -def create_left_prompt [] { - starship prompt --cmd-duration $env.CMD_DURATION_MS $'--status=($env.LAST_EXIT_CODE)' -} - -def create_right_prompt [] { - let time_segment = ([ - (date now | date format '%m/%d/%Y %r') - ] | str join) - - $time_segment -} +# def create_left_prompt [] { +# starship prompt --cmd-duration $env.CMD_DURATION_MS $'--status=($env.LAST_EXIT_CODE)' $'--keymap=($env.STARSHIP_KEYMAP)' +# } +# +# def create_right_prompt [] { +# let time_segment = ([ +# (date now | date format '%m/%d/%Y %r') +# ] | str join) +# +# $time_segment +# } # Use nushell functions to define your right and left prompt -let-env PROMPT_COMMAND = {} -let-env PROMPT_COMMAND_RIGHT = {} +# let-env PROMPT_COMMAND = { create_left_prompt } +# let-env PROMPT_COMMAND_RIGHT = { create_right_prompt } # The prompt indicators are environmental variables that represent # the state of the prompt -let-env PROMPT_INDICATOR = { "" } -let-env PROMPT_INDICATOR_VI_INSERT = { "> " } -let-env PROMPT_INDICATOR_VI_NORMAL = { ": " } -let-env PROMPT_MULTILINE_INDICATOR = { ">>> " } +# let-env PROMPT_INDICATOR = { "" } +# let-env PROMPT_INDICATOR_VI_INSERT = { "" } +# let-env PROMPT_INDICATOR_VI_NORMAL = { "" } +# let-env PROMPT_MULTILINE_INDICATOR = { "" } # Specifies how environment variables are: # - converted from a string to a value on Nushell startup (from_string) diff --git a/.config/nushell/history.txt b/.config/nushell/history.txt index 5f0f0d36..d720f38d 100644 --- a/.config/nushell/history.txt +++ b/.config/nushell/history.txt @@ -93,3 +93,69 @@ ea exa -la exa -la | table ls -la +gitui +help let-env +help commands +help let-env +print $env.XDG_CONFIG_HOME +print $env.XDG_CONFIG_HOME/test +print $env.XDG_CONFIG_HOME .test +print [$env.XDG_CONFIG_HOME .test] +print $"hello" +print $"($env.XDG_CONFIG_HOME)/starship.nu.toml" +echo hi +echo $env.STARSHIP_CONFIG +bat /home/dustvoice/.config/starship.nu.toml +echo hi +echo hello +echo i +echo hi +$nu.loginshell-path +modeprint +module +list modules +keybindings list --event +keybindings list --events +version +starship prompt -k "insert" +starship prompt -k "normal" +starship prompt -k "default" +starship prompt -k "visual" +starship prompt -h +cd .. +git clone https://github.com/starship/starship +s h +starship prompt -k "normal" +starship init nu +echo $env.PROMPT_COMMAND +print $env.PROMPT_COMMAND +print $env.PROMPT_INDICATOR_VI_NORMAL +starship prompt -k "normal" +echo $env.STARSHIP_KEYMAP +while true { echo hi } +while true { echo hi; sleep 1 } +while true { echo hi; sleep 10.0 } +while true { echo hi; sleep duration } +while true { echo hi; sleep 1sec } +while true { print $env.STARSHIP_KEYMAP; sleep 1sec } +i +print create_left_prompt +(create_left_prompt<\n>) +(create_left_prompt) +create_left_prompt | debug +explore +$nu | explore +echo $env.STARSHIP_KEYMAP +print $env.PROMPT_COMMAND +print $env.PROMPT_COMMAND | debug +debug $env.PROMPT_COMMAND +$env.PROMPT_COMMAND | debug +$env.PROMPT_COMMAND | debug --raw +which starship +$env.PROMPT_COMMAND +$env.PROMPT_COMMAND | [1] +^::STARSHIP:: +i +ion +echo "hi<\n>dfjklg<\n>" +starship prompt --continuation diff --git a/.doom.d/config.el b/.doom.d/config.el index e29cd1c0..9613172d 100644 --- a/.doom.d/config.el +++ b/.doom.d/config.el @@ -105,19 +105,52 @@ ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))) -(use-package! paw64-mode - :init - :config - - (define-derived-mode paw64-mode - prog-mode - "Paw64" - "Major mode for 6502/6510 assembly with 64tass and/or paw64" - (set-syntax-table (make-syntax-table paw64-mode-syntax-table)) - (set (make-local-variable 'font-lock-defaults) '(paw64-font-lock-keywords)) - (set (make-local-variable 'indent-line-function) 'paw64-indent) - - (add-hook 'post-command-hook #'paw64-post-command-hook nil t) - (electric-indent-local-mode -1))) +;; (use-package! paw64-mode +;; :init +;; :config +;; +;; (define-derived-mode paw64-mode +;; prog-mode +;; "Paw64" +;; "Major mode for 6502/6510 assembly with 64tass and/or paw64" +;; (set-syntax-table (make-syntax-table paw64-mode-syntax-table)) +;; (set (make-local-variable 'font-lock-defaults) '(paw64-font-lock-keywords)) +;; (set (make-local-variable 'indent-line-function) 'paw64-indent) +;; +;; (add-hook 'post-command-hook #'paw64-post-command-hook nil t) +;; (electric-indent-local-mode -1))) (use-package! arm-mode :init :config) + +(use-package! ron-mode :init :config) + +(map! :map dap-mode-map + :leader + :prefix ("d" . "dap") + ;; basics + :desc "dap next" "n" #'dap-next + :desc "dap step in" "i" #'dap-step-in + :desc "dap step out" "o" #'dap-step-out + :desc "dap continue" "c" #'dap-continue + :desc "dap hydra" "h" #'dap-hydra + :desc "dap debug restart" "r" #'dap-debug-restart + :desc "dap debug" "s" #'dap-debug + + ;; debug + :prefix ("dd" . "Debug") + :desc "dap debug recent" "r" #'dap-debug-recent + :desc "dap debug last" "l" #'dap-debug-last + + ;; eval + :prefix ("de" . "Eval") + :desc "eval" "e" #'dap-eval + :desc "eval region" "r" #'dap-eval-region + :desc "eval thing at point" "s" #'dap-eval-thing-at-point + :desc "add expression" "a" #'dap-ui-expressions-add + :desc "remove expression" "d" #'dap-ui-expressions-remove + + :prefix ("db" . "Breakpoint") + :desc "dap breakpoint toggle" "b" #'dap-breakpoint-toggle + :desc "dap breakpoint condition" "c" #'dap-breakpoint-condition + :desc "dap breakpoint hit count" "h" #'dap-breakpoint-hit-condition + :desc "dap breakpoint log message" "l" #'dap-breakpoint-log-message) diff --git a/.doom.d/init.el b/.doom.d/init.el index a312fa87..0966c50c 100644 --- a/.doom.d/init.el +++ b/.doom.d/init.el @@ -25,7 +25,7 @@ ;;helm ; the *other* search engine for love and life ;;ido ; the other *other* search engine... ;;ivy ; a search engine for love and life - vertico ; the search engine of the future + vertico ; the search engine of the future :ui ;;deft ; notational velocity for Emacs @@ -87,7 +87,7 @@ :tools ;;ansible ;;biblio ; Writes a PhD for you (citation needed) - debugger ; FIXME stepping through code, to help you add bugs + (debugger +lsp) ; FIXME stepping through code, to help you add bugs ;;direnv ;;docker ;;editorconfig ; let someone else argue about tabs vs spaces diff --git a/.doom.d/packages.el b/.doom.d/packages.el index 621dedfa..989ba30f 100644 --- a/.doom.d/packages.el +++ b/.doom.d/packages.el @@ -7,54 +7,58 @@ ;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror: -;(package! some-package) + ;(package! some-package) ;; To install a package directly from a remote git repo, you must specify a ;; `:recipe'. You'll find documentation on what `:recipe' accepts here: ;; https://github.com/radian-software/straight.el#the-recipe-format -;(package! another-package -; :recipe (:host github :repo "username/repo")) + ;(package! another-package + ; :recipe (:host github :repo "username/repo")) ;; If the package you are trying to install does not contain a PACKAGENAME.el ;; file, or is located in a subdirectory of the repo, you'll need to specify ;; `:files' in the `:recipe': -;(package! this-package -; :recipe (:host github :repo "username/repo" -; :files ("some-file.el" "src/lisp/*.el"))) + ;(package! this-package + ; :recipe (:host github :repo "username/repo" + ; :files ("some-file.el" "src/lisp/*.el"))) ;; If you'd like to disable a package included with Doom, you can do so here ;; with the `:disable' property: -;(package! builtin-package :disable t) + ;(package! builtin-package :disable t) ;; You can override the recipe of a built in package without having to specify ;; all the properties for `:recipe'. These will inherit the rest of its recipe ;; from Doom or MELPA/ELPA/Emacsmirror: -;(package! builtin-package :recipe (:nonrecursive t)) -;(package! builtin-package-2 :recipe (:repo "myfork/package")) + ;(package! builtin-package :recipe (:nonrecursive t)) + ;(package! builtin-package-2 :recipe (:repo "myfork/package")) ;; Specify a `:branch' to install a package from a particular branch or tag. ;; This is required for some packages whose default branch isn't 'master' (which ;; our package manager can't deal with; see radian-software/straight.el#279) -;(package! builtin-package :recipe (:branch "develop")) + ;(package! builtin-package :recipe (:branch "develop")) ;; Use `:pin' to specify a particular commit to install. -;(package! builtin-package :pin "1a2b3c4d5e") + ;(package! builtin-package :pin "1a2b3c4d5e") ;; Doom's packages are pinned to a specific commit and updated from release to ;; release. The `unpin!' macro allows you to unpin single packages... -;(unpin! pinned-package) + ;(unpin! pinned-package) ;; ...or multiple packages -;(unpin! pinned-package another-pinned-package) + ;(unpin! pinned-package another-pinned-package) ;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) -;(unpin! t) + ;(unpin! t) ;; Hotfix for issue with straight.el -(package! straight :pin "3eca39d") +;; (package! straight :pin "3eca39d") +;; (package! consult :pin "b22a7de62ee4adf766be2f867dee8b6980902bba") (package! pinentry) +(package! ron-mode) (package! fish-mode) (package! elvish-mode) +(package! nushell-mode + :recipe (:host github :repo "azzamsa/emacs-nushell")) (package! flycheck-grammarly :recipe (:host github :repo "emacs-grammarly/flycheck-grammarly")) @@ -65,11 +69,11 @@ (package! git-modes :recipe (:host github :repo "magit/git-modes")) -(package! paw64-mode - :recipe (:host github :repo "svjson/paw64-mode")) +;; (package! paw64-mode +;; :recipe (:host github :repo "svjson/paw64-mode")) (package! arm-mode :recipe (:host github :repo "charje/arm-mode")) -(package! nasm-mode) +;; (package! nasm-mode) (package! org-modern) diff --git a/.emacs.d b/.emacs.d index d5ccac5d..e9662492 160000 --- a/.emacs.d +++ b/.emacs.d @@ -1 +1 @@ -Subproject commit d5ccac5d71c819035fa251f01d023b3f94b4fba4 +Subproject commit e96624926d724aff98e862221422cd7124a99c19