Update nushell config, update doom package list

This commit is contained in:
David Holland 2023-02-17 08:29:39 +01:00
parent 7eb31f56ba
commit 5fdef5173d
Signed by: DustVoice
GPG key ID: 47068995A14EDCA9
6 changed files with 155 additions and 52 deletions

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -50,11 +50,15 @@
;(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)

@ -1 +1 @@
Subproject commit d5ccac5d71c819035fa251f01d023b3f94b4fba4
Subproject commit e96624926d724aff98e862221422cd7124a99c19