Compare commits
9 Commits
master
...
test-emacs
| Author | SHA1 | Date | |
|---|---|---|---|
| a1da3d1985 | |||
| 95d92726c7 | |||
| 72424b42bf | |||
| b073436765 | |||
| 1de5957007 | |||
| fc1b18e08e | |||
| b92c5d9be1 | |||
| 8376804a88 | |||
| 1163ea98be |
@@ -4,57 +4,38 @@
|
|||||||
;; sync' after modifying this file!
|
;; sync' after modifying this file!
|
||||||
|
|
||||||
;; Some functionality uses this to identify you, e.g. GPG configuration, email
|
;; Some functionality uses this to identify you, e.g. GPG configuration, email
|
||||||
;; clients, file templates and snippets. It is optional.
|
;; clients, file templates and snippets.
|
||||||
(setq user-full-name "Max Regan"
|
(setq user-full-name "Max Regan"
|
||||||
user-mail-address "mgregan2@gmail.com")
|
user-mail-address "mgregan2@gmail.com")
|
||||||
|
|
||||||
;; Doom exposes five (optional) variables for controlling fonts in Doom:
|
;; Doom exposes five (optional) variables for controlling fonts in Doom. Here
|
||||||
|
;; are the three important ones:
|
||||||
;;
|
;;
|
||||||
;; - `doom-font' -- the primary font to use
|
;; + `doom-font'
|
||||||
;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable)
|
;; + `doom-variable-pitch-font'
|
||||||
;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for
|
;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for
|
||||||
;; presentations or streaming.
|
;; presentations or streaming.
|
||||||
;; - `doom-unicode-font' -- for unicode glyphs
|
|
||||||
;; - `doom-serif-font' -- for the `fixed-pitch-serif' face
|
|
||||||
;;
|
;;
|
||||||
;; See 'C-h v doom-font' for documentation and more examples of what they
|
;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd
|
||||||
;; accept. For example:
|
;; font string. You generally only need these two:
|
||||||
;;
|
;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light)
|
||||||
;;(setq doom-font (font-spec :family "Fira Code" :size 12 :weight 'semi-light)
|
;; doom-variable-pitch-font (font-spec :family "sans" :size 13))
|
||||||
;; doom-variable-pitch-font (font-spec :family "Fira Sans" :size 13))
|
|
||||||
;;
|
|
||||||
;; If you or Emacs can't find your font, use 'M-x describe-font' to look them
|
|
||||||
;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
|
|
||||||
;; refresh your font settings. If Emacs still can't find your font, it likely
|
|
||||||
;; wasn't installed correctly. Font issues are rarely Doom issues!
|
|
||||||
|
|
||||||
;; There are two ways to load a theme. Both assume the theme is installed and
|
;; There are two ways to load a theme. Both assume the theme is installed and
|
||||||
;; available. You can either set `doom-theme' or manually load a theme with the
|
;; available. You can either set `doom-theme' or manually load a theme with the
|
||||||
;; `load-theme' function. This is the default:
|
;; `load-theme' function. This is the default:
|
||||||
(setq doom-theme 'doom-1337)
|
(setq doom-theme 'doom-one)
|
||||||
|
|
||||||
;; This determines the style of line numbers in effect. If set to `nil', line
|
|
||||||
;; numbers are disabled. For relative line numbers, set this to `relative'.
|
|
||||||
(setq display-line-numbers-type t)
|
|
||||||
|
|
||||||
;; If you use `org' and don't want your org files in the default location below,
|
;; If you use `org' and don't want your org files in the default location below,
|
||||||
;; change `org-directory'. It must be set before org loads!
|
;; change `org-directory'. It must be set before org loads!
|
||||||
(setq org-directory "~/org/")
|
(setq org-directory "~/org/")
|
||||||
|
|
||||||
;; Whenever you reconfigure a package, make sure to wrap your config in an
|
;; This determines the style of line numbers in effect. If set to `nil', line
|
||||||
;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
|
;; numbers are disabled. For relative line numbers, set this to `relative'.
|
||||||
;;
|
(setq display-line-numbers-type t)
|
||||||
;; (after! PACKAGE
|
|
||||||
;; (setq x y))
|
|
||||||
;;
|
;; Here are some additional functions/macros that could help you configure Doom:
|
||||||
;; The exceptions to this rule:
|
|
||||||
;;
|
|
||||||
;; - Setting file/directory variables (like `org-directory')
|
|
||||||
;; - Setting variables which explicitly tell you to set them before their
|
|
||||||
;; package is loaded (see 'C-h v VARIABLE' to look up their documentation).
|
|
||||||
;; - Setting doom variables (which start with 'doom-' or '+').
|
|
||||||
;;
|
|
||||||
';; Here are some additional functions/macros that will help you configure Doom.
|
|
||||||
;;
|
;;
|
||||||
;; - `load!' for loading external *.el files relative to this one
|
;; - `load!' for loading external *.el files relative to this one
|
||||||
;; - `use-package!' for configuring packages
|
;; - `use-package!' for configuring packages
|
||||||
@@ -67,8 +48,6 @@
|
|||||||
;; To get information about any of these functions/macros, move the cursor over
|
;; To get information about any of these functions/macros, move the cursor over
|
||||||
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
|
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
|
||||||
;; This will open documentation for it, including demos of how they are used.
|
;; This will open documentation for it, including demos of how they are used.
|
||||||
;; Alternatively, use `C-h o' to look up a symbol (functions, variables, faces,
|
|
||||||
;; etc).
|
|
||||||
;;
|
;;
|
||||||
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
|
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
|
||||||
;; they are implemented.
|
;; they are implemented.
|
||||||
@@ -88,7 +67,7 @@
|
|||||||
:load-path "lisp/mgr-gitlab"
|
:load-path "lisp/mgr-gitlab"
|
||||||
:ensure t
|
:ensure t
|
||||||
:config
|
:config
|
||||||
(setq gitlab-host "https://gitlab.maxregan.me"
|
(setq gitlab-host "gitlab.maxregan.me"
|
||||||
gitlab-token-id (if (file-exists-p mgr-gitlab-token-file)
|
gitlab-token-id (if (file-exists-p mgr-gitlab-token-file)
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(insert-file-contents mgr-gitlab-token-file)
|
(insert-file-contents mgr-gitlab-token-file)
|
||||||
@@ -99,51 +78,3 @@
|
|||||||
(recents . 5)
|
(recents . 5)
|
||||||
(agenda . 5)
|
(agenda . 5)
|
||||||
(projects . 5))))
|
(projects . 5))))
|
||||||
|
|
||||||
(use-package! persp-mode
|
|
||||||
:config
|
|
||||||
(setq persp-emacsclient-init-frame-behaviour-override "main"))
|
|
||||||
|
|
||||||
;; Hey doom, +ivy/compile is worse, give me projectile-compile-project back
|
|
||||||
(define-key (current-global-map) [remap projectile-compile-project] 'projectile-compile-project)
|
|
||||||
|
|
||||||
(use-package! denote
|
|
||||||
:config (setq denote-known-keywords '("meta" "emacs")
|
|
||||||
denote-directory "~/notes/denote"))
|
|
||||||
|
|
||||||
(use-package! uniquify
|
|
||||||
:config
|
|
||||||
(setq uniquify-buffer-name-style 'post-forward))
|
|
||||||
|
|
||||||
(use-package! clipetty
|
|
||||||
:config (global-clipetty-mode 1))
|
|
||||||
|
|
||||||
(use-package! vterm
|
|
||||||
:config
|
|
||||||
(push '("magit" magit) vterm-eval-cmds)
|
|
||||||
(push '("compile" compile) vterm-eval-cmds))
|
|
||||||
|
|
||||||
(use-package! with-editor
|
|
||||||
:config
|
|
||||||
(add-hook 'shell-mode-hook 'with-editor-export-editor)
|
|
||||||
(add-hook 'eshell-mode-hook 'with-editor-export-editor)
|
|
||||||
(add-hook 'term-exec-hook 'with-editor-export-editor)
|
|
||||||
(add-hook 'vterm-exec-hook 'with-editor-export-editor))
|
|
||||||
|
|
||||||
;; Utils for pinning buffers in windows. This is useful for compilation and shells.
|
|
||||||
|
|
||||||
(defun dedicate-window ()
|
|
||||||
(interactive)
|
|
||||||
(set-window-dedicated-p (get-buffer-window) t))
|
|
||||||
|
|
||||||
(defun undedicate-window ()
|
|
||||||
(interactive)
|
|
||||||
(set-window-dedicated-p (get-buffer-window) nil))
|
|
||||||
|
|
||||||
(defun disable-format-on-save ()
|
|
||||||
(interactive)
|
|
||||||
(format-all-mode -1))
|
|
||||||
|
|
||||||
;; Load optional site-specific config (e.g. work profiles)
|
|
||||||
(if (file-exists-p "~/.doom-site/config.el")
|
|
||||||
(load-file "~/.doom-site/config.el"))
|
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
;; in. Remember to run 'doom sync' after modifying it!
|
;; in. Remember to run 'doom sync' after modifying it!
|
||||||
|
|
||||||
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
|
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
|
||||||
;; documentation. There you'll find a link to Doom's Module Index where all
|
;; documentation. There you'll find a "Module Index" link where you'll find
|
||||||
;; of our modules are listed, including what flags they support.
|
;; a comprehensive list of Doom's modules and what flags they support.
|
||||||
|
|
||||||
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
|
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
|
||||||
;; 'C-c c k' for non-vim users) to view its documentation. This works on
|
;; 'C-c c k' for non-vim users) to view its documentation. This works on
|
||||||
@@ -15,27 +15,23 @@
|
|||||||
;; directory (for easy access to its source code).
|
;; directory (for easy access to its source code).
|
||||||
|
|
||||||
(doom! :input
|
(doom! :input
|
||||||
;;bidi ; (tfel ot) thgir etirw uoy gnipleh
|
|
||||||
;;chinese
|
;;chinese
|
||||||
;;japanese
|
;;japanese
|
||||||
;;layout ; auie,ctsrnm is the superior home row
|
;;layout ; auie,ctsrnm is the superior home row
|
||||||
|
|
||||||
:completion
|
:completion
|
||||||
company ; the ultimate code completion backend
|
company ; the ultimate code completion backend
|
||||||
;;helm ; the *other* search engine for love and life
|
;;helm ; the *other* search engine for love and life
|
||||||
;;ido ; the other *other* search engine...
|
;;ido ; the other *other* search engine...
|
||||||
;;ivy ; a search engine for love and life
|
;;ivy ; a search engine for love and life
|
||||||
vertico ; the search engine of the future
|
vertico ; the search engine of the future
|
||||||
|
|
||||||
:ui
|
:ui
|
||||||
;;deft ; notational velocity for Emacs
|
;;deft ; notational velocity for Emacs
|
||||||
doom ; what makes DOOM look the way it does
|
doom ; what makes DOOM look the way it does
|
||||||
;;doom-dashboard ; a nifty splash screen for Emacs
|
doom-dashboard ; a nifty splash screen for Emacs
|
||||||
;;doom-quit ; DOOM quit-message prompts when you quit Emacs
|
;; doom-quit ; DOOM quit-message prompts when you quit Emacs
|
||||||
(emoji
|
(emoji +unicode) ; 🙂
|
||||||
+unicode
|
|
||||||
+github
|
|
||||||
+ascii) ; 🙂
|
|
||||||
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
||||||
;;hydra
|
;;hydra
|
||||||
;;indent-guides ; highlighted indent columns
|
;;indent-guides ; highlighted indent columns
|
||||||
@@ -48,7 +44,7 @@
|
|||||||
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
||||||
;;tabs ; a tab bar for Emacs
|
;;tabs ; a tab bar for Emacs
|
||||||
;;treemacs ; a project drawer, like neotree but cooler
|
;;treemacs ; a project drawer, like neotree but cooler
|
||||||
unicode ; extended unicode support for various languages
|
;;unicode ; extended unicode support for various languages
|
||||||
vc-gutter ; vcs diff in the fringe
|
vc-gutter ; vcs diff in the fringe
|
||||||
vi-tilde-fringe ; fringe tildes to mark beyond EOB
|
vi-tilde-fringe ; fringe tildes to mark beyond EOB
|
||||||
window-select ; visually switch windows
|
window-select ; visually switch windows
|
||||||
@@ -70,7 +66,7 @@
|
|||||||
word-wrap ; soft wrapping with language-aware indent
|
word-wrap ; soft wrapping with language-aware indent
|
||||||
|
|
||||||
:emacs
|
:emacs
|
||||||
(dire + icons) ; making dired pretty [functional]
|
(dired +icons) ; making dired pretty [functional]
|
||||||
electric ; smarter, keyword-based electric-indent
|
electric ; smarter, keyword-based electric-indent
|
||||||
;;ibuffer ; interactive buffer management
|
;;ibuffer ; interactive buffer management
|
||||||
undo ; persistent, smarter undo for your inevitable mistakes
|
undo ; persistent, smarter undo for your inevitable mistakes
|
||||||
@@ -89,7 +85,6 @@
|
|||||||
|
|
||||||
:tools
|
:tools
|
||||||
;;ansible
|
;;ansible
|
||||||
;;biblio ; Writes a PhD for you (citation needed)
|
|
||||||
debugger ; FIXME stepping through code, to help you add bugs
|
debugger ; FIXME stepping through code, to help you add bugs
|
||||||
;;direnv
|
;;direnv
|
||||||
docker
|
docker
|
||||||
@@ -98,9 +93,9 @@
|
|||||||
(eval +overlay) ; run code, run (also, repls)
|
(eval +overlay) ; run code, run (also, repls)
|
||||||
;;gist ; interacting with github gists
|
;;gist ; interacting with github gists
|
||||||
lookup ; navigate your code and its documentation
|
lookup ; navigate your code and its documentation
|
||||||
lsp ; M-x vscode
|
lsp ; M-x vscode
|
||||||
magit ; a git porcelain for Emacs
|
magit ; a git porcelain for Emacs
|
||||||
make ; run make tasks from Emacs
|
make ; run make tasks from Emacs
|
||||||
;;pass ; password manager for nerds
|
;;pass ; password manager for nerds
|
||||||
;;pdf ; pdf enhancements
|
;;pdf ; pdf enhancements
|
||||||
;;prodigy ; FIXME managing external services & code builders
|
;;prodigy ; FIXME managing external services & code builders
|
||||||
@@ -108,28 +103,27 @@
|
|||||||
;;taskrunner ; taskrunner for all your projects
|
;;taskrunner ; taskrunner for all your projects
|
||||||
;;terraform ; infrastructure as code
|
;;terraform ; infrastructure as code
|
||||||
;;tmux ; an API for interacting with tmux
|
;;tmux ; an API for interacting with tmux
|
||||||
;;tree-sitter ; syntax and parsing, sitting in a tree...
|
|
||||||
;;upload ; map local to remote projects via ssh/ftp
|
;;upload ; map local to remote projects via ssh/ftp
|
||||||
|
|
||||||
:os
|
:os
|
||||||
(:if IS-MAC macos) ; improve compatibility with macOS
|
(:if IS-MAC macos) ; improve compatibility with macOS
|
||||||
(tty +osc) ; improve the terminal Emacs experience
|
tty ; improve the terminal Emacs experience
|
||||||
|
|
||||||
:lang
|
:lang
|
||||||
;;agda ; types of types of types of types...
|
;;agda ; types of types of types of types...
|
||||||
;;beancount ; mind the GAAP
|
;;beancount ; mind the GAAP
|
||||||
(cc +lsp) ; C > C++ == 1
|
cc ; C > C++ == 1
|
||||||
;;clojure ; java with a lisp
|
;;clojure ; java with a lisp
|
||||||
;;common-lisp ; if you've seen one lisp, you've seen them all
|
;;common-lisp ; if you've seen one lisp, you've seen them all
|
||||||
;;coq ; proofs-as-programs
|
;;coq ; proofs-as-programs
|
||||||
;;crystal ; ruby at the speed of c
|
;;crystal ; ruby at the speed of c
|
||||||
;;csharp ; unity, .NET, and mono shenanigans
|
;;csharp ; unity, .NET, and mono shenanigans
|
||||||
;;data ; config/data formats
|
;;data ; config/data formats
|
||||||
(dart +flutter) ; paint ui and not much else
|
;;(dart +flutter) ; paint ui and not much else
|
||||||
;;dhall
|
;;dhall
|
||||||
;;elixir ; erlang done right
|
;;elixir ; erlang done right
|
||||||
;;elm ; care for a cup of TEA?
|
;;elm ; care for a cup of TEA?
|
||||||
emacs-lisp ; drown in parentheses
|
emacs-lisp ; drown in parentheses
|
||||||
;;erlang ; an elegant language for a more civilized age
|
;;erlang ; an elegant language for a more civilized age
|
||||||
;;ess ; emacs speaks statistics
|
;;ess ; emacs speaks statistics
|
||||||
;;factor
|
;;factor
|
||||||
@@ -139,12 +133,11 @@
|
|||||||
;;fstar ; (dependent) types and (monadic) effects and Z3
|
;;fstar ; (dependent) types and (monadic) effects and Z3
|
||||||
;;gdscript ; the language you waited for
|
;;gdscript ; the language you waited for
|
||||||
;;(go +lsp) ; the hipster dialect
|
;;(go +lsp) ; the hipster dialect
|
||||||
;;(graphql +lsp) ; Give queries a REST
|
|
||||||
;;(haskell +lsp) ; a language that's lazier than I am
|
;;(haskell +lsp) ; a language that's lazier than I am
|
||||||
;;hy ; readability of scheme w/ speed of python
|
;;hy ; readability of scheme w/ speed of python
|
||||||
;;idris ; a language you can depend on
|
;;idris ; a language you can depend on
|
||||||
json ; At least it ain't XML
|
json ; At least it ain't XML
|
||||||
;;(java +lsp) ; the poster child for carpal tunnel syndrome
|
(java +lsp) ; the poster child for carpal tunnel syndrome
|
||||||
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
|
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
|
||||||
;;julia ; a better, faster MATLAB
|
;;julia ; a better, faster MATLAB
|
||||||
;;kotlin ; a better, slicker Java(Script)
|
;;kotlin ; a better, slicker Java(Script)
|
||||||
@@ -152,25 +145,25 @@
|
|||||||
;;lean ; for folks with too much to prove
|
;;lean ; for folks with too much to prove
|
||||||
;;ledger ; be audit you can be
|
;;ledger ; be audit you can be
|
||||||
;;lua ; one-based indices? one-based indices
|
;;lua ; one-based indices? one-based indices
|
||||||
markdown ; writing docs for people to ignore
|
markdown ; writing docs for people to ignore
|
||||||
;;nim ; python + lisp at the speed of c
|
;;nim ; python + lisp at the speed of c
|
||||||
;;nix ; I hereby declare "nix geht mehr!"
|
;;nix ; I hereby declare "nix geht mehr!"
|
||||||
;;ocaml ; an objective camel
|
;;ocaml ; an objective camel
|
||||||
org ; organize your plain life in plain text
|
org ; organize your plain life in plain text
|
||||||
;;php ; perl's insecure younger brother
|
;;php ; perl's insecure younger brother
|
||||||
;;plantuml ; diagrams for confusing people more
|
;;plantuml ; diagrams for confusing people more
|
||||||
;;purescript ; javascript, but functional
|
;;purescript ; javascript, but functional
|
||||||
python ; beautiful is better than ugly
|
python ; beautiful is better than ugly
|
||||||
;;qt ; the 'cutest' gui framework ever
|
;;qt ; the 'cutest' gui framework ever
|
||||||
;;racket ; a DSL for DSLs
|
;;racket ; a DSL for DSLs
|
||||||
;;raku ; the artist formerly known as perl6
|
;;raku ; the artist formerly known as perl6
|
||||||
;;rest ; Emacs as a REST client
|
;;rest ; Emacs as a REST client
|
||||||
;;rst ; ReST in peace
|
;;rst ; ReST in peace
|
||||||
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
ruby ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
||||||
(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
||||||
;;scala ; java, but good
|
;;scala ; java, but good
|
||||||
;;(scheme +guile) ; a fully conniving family of lisps
|
;;(scheme +guile) ; a fully conniving family of lisps
|
||||||
sh ; she sells {ba,z,fi}sh shells on the C xor
|
sh ; she sells {ba,z,fi}sh shells on the C xor
|
||||||
;;sml
|
;;sml
|
||||||
;;solidity ; do you need a blockchain? No.
|
;;solidity ; do you need a blockchain? No.
|
||||||
;;swift ; who asked for emoji variables?
|
;;swift ; who asked for emoji variables?
|
||||||
@@ -195,7 +188,3 @@
|
|||||||
:config
|
:config
|
||||||
;;literate
|
;;literate
|
||||||
(default +bindings +smartparens))
|
(default +bindings +smartparens))
|
||||||
|
|
||||||
;; Load optional site-specific config (e.g. work profiles)
|
|
||||||
(if (file-exists-p "~/.doom-site/init.el")
|
|
||||||
(load-file "~/.doom-site/init.el"))
|
|
||||||
|
|||||||
@@ -45,12 +45,12 @@
|
|||||||
|
|
||||||
(defun mgr-gitlab-clone (name)
|
(defun mgr-gitlab-clone (name)
|
||||||
"Clone the project NAME."
|
"Clone the project NAME."
|
||||||
|
;; TODO: Automatically set remote.pushDefault so it does not prompt
|
||||||
;; TODO: Clone with API token, if there is one
|
;; TODO: Clone with API token, if there is one
|
||||||
(interactive
|
(interactive
|
||||||
(list (completing-read "Project: " (mgr-gitlab-list-remote-project-names))))
|
(list (completing-read "Project: " (mgr-gitlab-list-remote-project-names))))
|
||||||
(let* ((url (mgr-gitlab--get-url-by-name name))
|
(let* ((url (mgr-gitlab--get-url-by-name name))
|
||||||
(dest mgr-gitlab-project-path))
|
(dest mgr-gitlab-project-path))
|
||||||
(setf magit-clone-set-remote.pushDefault t)
|
|
||||||
(magit-clone-regular url dest nil)))
|
(magit-clone-regular url dest nil)))
|
||||||
|
|
||||||
(defun mgr-gitlab-clone-all ()
|
(defun mgr-gitlab-clone-all ()
|
||||||
@@ -92,8 +92,4 @@ gitlab so kindly removes."
|
|||||||
|
|
||||||
(add-to-list 'dashboard-item-generators '(mgr-gitlab-gitlab-projects . mgr-gitlab-dashboard-insert-gitlab-projects))
|
(add-to-list 'dashboard-item-generators '(mgr-gitlab-gitlab-projects . mgr-gitlab-dashboard-insert-gitlab-projects))
|
||||||
|
|
||||||
(ert-deftest mgr-gitlab-clone-test ()
|
|
||||||
"Tests that mgr-gitlab can clone a repo"
|
|
||||||
(mgr-gitlab-clone "IotButton"))
|
|
||||||
|
|
||||||
(provide 'mgr-gitlab)
|
(provide 'mgr-gitlab)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
;; To install a package directly from a remote git repo, you must specify a
|
;; To install a package directly from a remote git repo, you must specify a
|
||||||
;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
|
;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
|
||||||
;; https://github.com/radian-software/straight.el#the-recipe-format
|
;; https://github.com/raxod502/straight.el#the-recipe-format
|
||||||
;(package! another-package
|
;(package! another-package
|
||||||
; :recipe (:host github :repo "username/repo"))
|
; :recipe (:host github :repo "username/repo"))
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
;; Specify a `:branch' to install a package from a particular branch or tag.
|
;; 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
|
;; 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)
|
;; our package manager can't deal with; see raxod502/straight.el#279)
|
||||||
;(package! builtin-package :recipe (:branch "develop"))
|
;(package! builtin-package :recipe (:branch "develop"))
|
||||||
|
|
||||||
;; Use `:pin' to specify a particular commit to install.
|
;; Use `:pin' to specify a particular commit to install.
|
||||||
@@ -49,14 +49,14 @@
|
|||||||
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
|
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
|
||||||
;(unpin! t)
|
;(unpin! t)
|
||||||
|
|
||||||
|
(package! org-journal)
|
||||||
|
|
||||||
|
(package! all-the-icons-ivy-rich)
|
||||||
|
|
||||||
|
(package! git-auto-commit-mode)
|
||||||
|
|
||||||
;; required for mgr-gitlab
|
;; required for mgr-gitlab
|
||||||
(package! gitlab)
|
(package! gitlab)
|
||||||
|
|
||||||
(package! all-the-icons-ivy-rich)
|
;; Testing
|
||||||
(package! paredit)
|
(package! dashboard)
|
||||||
(package! denote)
|
|
||||||
|
|
||||||
;; Load optional site-specific config (e.g. work profiles)
|
|
||||||
(if (file-exists-p "~/.doom-site/init.el")
|
|
||||||
(load-file "~/.doom-site/init.el"))
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,54 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
import argparse
|
|
||||||
import sys
|
|
||||||
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
source = " ".join(sys.argv[1:])
|
|
||||||
INPUT_SRC_NAME = "<py-input>"
|
|
||||||
|
|
||||||
global_vars = {}
|
|
||||||
local_vars = {}
|
|
||||||
|
|
||||||
py_env_conf = Path.home() / ".py-env.py"
|
|
||||||
if py_env_conf.exists():
|
|
||||||
with open(Path.home() / ".py-env.py") as f:
|
|
||||||
code = compile(f.read(), "py-env.py", "exec")
|
|
||||||
exec(code)
|
|
||||||
|
|
||||||
try:
|
|
||||||
code = compile(source, INPUT_SRC_NAME, "eval")
|
|
||||||
val = eval(code)
|
|
||||||
|
|
||||||
# If it's a string, just print it
|
|
||||||
if type(val) == str:
|
|
||||||
print(val)
|
|
||||||
exit(0)
|
|
||||||
|
|
||||||
# If it's not iterable, just print it
|
|
||||||
try:
|
|
||||||
it = iter(val)
|
|
||||||
except TypeError as e:
|
|
||||||
if val is not None:
|
|
||||||
print(val)
|
|
||||||
exit(0)
|
|
||||||
|
|
||||||
# It's iterable, print each element as a line
|
|
||||||
try:
|
|
||||||
for item in val:
|
|
||||||
print(item)
|
|
||||||
exit(0)
|
|
||||||
except Exception as e:
|
|
||||||
e.args = ("Failed to print all elements",) + e.args
|
|
||||||
raise
|
|
||||||
|
|
||||||
except (SyntaxError, NameError) as e:
|
|
||||||
pass
|
|
||||||
|
|
||||||
try:
|
|
||||||
code = compile(source, INPUT_SRC_NAME, "exec")
|
|
||||||
exec(code)
|
|
||||||
except (SyntaxError, NameError) as e:
|
|
||||||
e.args = ("Invalid Python code",) + e.args
|
|
||||||
raise e
|
|
||||||
@@ -21,7 +21,6 @@ if [[ $NEEDS_GIT_DIR != 0 ]]; then
|
|||||||
git-home remote add origin https://gitlab.maxregan.me/max/configs.git
|
git-home remote add origin https://gitlab.maxregan.me/max/configs.git
|
||||||
git-home branch master --set-upstream-to origin/master
|
git-home branch master --set-upstream-to origin/master
|
||||||
git-home config status.showUntrackedFiles no
|
git-home config status.showUntrackedFiles no
|
||||||
git-home submodule update --init --recursive
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Checking out configs."
|
echo "Checking out configs."
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
gitlab_start_log_section() {
|
|
||||||
NAME="$1"
|
|
||||||
HEADER="$2"
|
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:${NAME}\r\e[0K${HEADER}"
|
|
||||||
}
|
|
||||||
|
|
||||||
gitlab_end_log_section() {
|
|
||||||
NAME="$1"
|
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:${NAME}\r\e0K"
|
|
||||||
}
|
|
||||||
@@ -1,17 +1,3 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -e -o pipefail
|
emacs --batch --debug-init --load ./.emacs.d/init.el
|
||||||
|
|
||||||
SRC_ROOT="$(dirname "${BASH_SOURCE}")"
|
|
||||||
|
|
||||||
source "$SRC_ROOT/gitlab-utils.sh"
|
|
||||||
|
|
||||||
# Load emacs
|
|
||||||
gitlab_start_log_section "test_init" "Running Emacs"
|
|
||||||
emacs --batch --debug-init -l ./.emacs.d/init.el
|
|
||||||
gitlab_end_log_section "test_init"
|
|
||||||
|
|
||||||
# Run tests
|
|
||||||
gitlab_start_log_section "run_unit_tests" "Running Unit Tests"
|
|
||||||
emacs --batch --debug-init -l ert -l ./.emacs.d/init.el -f ert-run-tests-batch-and-exit
|
|
||||||
gitlab_end_log_section "run_unit_tests"
|
|
||||||
|
|||||||
76
.py-env.py
76
.py-env.py
@@ -1,76 +0,0 @@
|
|||||||
|
|
||||||
import itertools
|
|
||||||
import json
|
|
||||||
import operator
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
import yaml
|
|
||||||
|
|
||||||
from functools import partial, reduce
|
|
||||||
from math import *
|
|
||||||
from pathlib import Path
|
|
||||||
from itertools import chain
|
|
||||||
|
|
||||||
try:
|
|
||||||
from tabulate import tabulate
|
|
||||||
except ImportError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
try:
|
|
||||||
import rich
|
|
||||||
from rich import inspect, print as pp
|
|
||||||
except ImportError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
# Always write heavyweight/blocking code in this file lazily to keep startup
|
|
||||||
# time short. In the same vein, be careful not to consume stdin unless an object
|
|
||||||
# in this file is called or iterated upon, e.g. stdin_str()
|
|
||||||
|
|
||||||
# Returns a lazily-evaluable map which executes multiple map functions
|
|
||||||
def maps(items, *map_funs):
|
|
||||||
it = items
|
|
||||||
for func in map_funs:
|
|
||||||
it = map(func, it)
|
|
||||||
return it
|
|
||||||
|
|
||||||
|
|
||||||
# Returns a lazily-evaluable filter which executes multiple predicate functions
|
|
||||||
def filters(items, *pred_funs):
|
|
||||||
it = items
|
|
||||||
for pred in pred_funs:
|
|
||||||
it = filter(pred, it)
|
|
||||||
return it
|
|
||||||
|
|
||||||
|
|
||||||
# Concatenate two items, there's likely a safer way to do this to avoid summing ints
|
|
||||||
concat = lambda a, b: "".join([a, b])
|
|
||||||
# Joins an interable of strings
|
|
||||||
join = "".join
|
|
||||||
|
|
||||||
|
|
||||||
# Return an iterable for file. This doesn't close the handle, but for this
|
|
||||||
# little scripting interface this is fine.
|
|
||||||
def read(filename):
|
|
||||||
return open(filename, "r")
|
|
||||||
|
|
||||||
|
|
||||||
def read_str(filename):
|
|
||||||
return concats(read(filename))
|
|
||||||
|
|
||||||
|
|
||||||
stdin_str = sys.stdin.read
|
|
||||||
# An iterable which yields the characters of stdin
|
|
||||||
stdin = (c for l in sys.stdin for c in l)
|
|
||||||
# An iterable which yields the lines of stdin
|
|
||||||
lines = map(str.strip, sys.stdin)
|
|
||||||
# An iterable which yields integers supplied via stdin lines
|
|
||||||
ints = map(int, lines)
|
|
||||||
# An iterable which yields the bytes of stdin
|
|
||||||
byts = map(lambda x: bytes(x, "utf-8"), stdin) # better name? 'bytes' is taken
|
|
||||||
|
|
||||||
jr = json.loads
|
|
||||||
jw = json.dumps
|
|
||||||
yr = lambda x: yaml.load(x, Loader=yaml.SafeLoader)
|
|
||||||
yw = yaml.dump
|
|
||||||
pwd = Path.cwd()
|
|
||||||
Reference in New Issue
Block a user