Compare commits
83 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 66cb17371d | |||
| c3288188bd | |||
| a806ae81bc | |||
| 41bd32951d | |||
| acc0385350 | |||
| 7ecbf30138 | |||
| 61b30f5062 | |||
| 83b70c6c81 | |||
| 0ea18214a5 | |||
| 57db7a1db8 | |||
| c695346b3c | |||
| 914d548d9f | |||
| c9394673db | |||
| 8ee9c32d9c | |||
| 48ed1287d7 | |||
| 9713bb6ae2 | |||
| afdbf7cfa2 | |||
| 9e9d2bbfcc | |||
| 04b08dee44 | |||
| 7d03e428bc | |||
| 3682c1ad10 | |||
| 5f639e747d | |||
| 3159d20e6d | |||
| e6240591c9 | |||
| 5f96f98158 | |||
| a1abf5b4a1 | |||
| ba8ef4f585 | |||
| eb057a2c3a | |||
| 8effe5f401 | |||
| 8fae2a5338 | |||
| 1c379cc4a3 | |||
| 69f3fa445b | |||
| 6c1b0faea4 | |||
| c68e79ca4f | |||
| af8a00ab5b | |||
| 50d27458af | |||
| d0d340e04f | |||
| b7912eef52 | |||
| ed88afe698 | |||
| e52adbbc4b | |||
| db1b86cbd7 | |||
| d80478e4e9 | |||
| 53bb5718f3 | |||
| 74dc6fd742 | |||
| 591f00e2f9 | |||
| 9e653100f2 | |||
| 96e6fc7706 | |||
| 7770c44924 | |||
| 4bec74fd5f | |||
| 09bfc2f8a6 | |||
| 7d84ed1711 | |||
| de1cad39d8 | |||
| e37bd642bb | |||
| 42b603f877 | |||
| fabfc2e840 | |||
| 7980b447fa | |||
| 78de9847a9 | |||
| 927e41991b | |||
| 0dac9ad52e | |||
| 390b6d522b | |||
| 0082cb1b33 | |||
| 0a9a7a7d33 | |||
| 34b03c3286 | |||
| 7aa49f1c0c | |||
| 48f07e740e | |||
| 7b81bc23dc | |||
| e7c2774a9d | |||
| fe9ef8415f | |||
| 6454407b9f | |||
| e60bd1d882 | |||
| 4897472bf5 | |||
| a64288ced3 | |||
| 2604d899d7 | |||
| f70fad8de8 | |||
| cd6b354e56 | |||
| cd06038a78 | |||
| 81ed779718 | |||
| 13bbde8cbf | |||
| 7625be967d | |||
| a82d11d07b | |||
| 84a9960357 | |||
| 64c2ab2255 | |||
| 40f15cf3ea |
@@ -1,258 +0,0 @@
|
||||
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; Place your private configuration here! Remember, you do not need to run 'doom
|
||||
;; sync' after modifying this file!
|
||||
|
||||
|
||||
;; Some functionality uses this to identify you, e.g. GPG configuration, email
|
||||
;; clients, file templates and snippets. It is optional.
|
||||
;; (setq user-full-name "John Doe"
|
||||
;; user-mail-address "john@doe.com")
|
||||
|
||||
;; Doom exposes five (optional) variables for controlling fonts in Doom:
|
||||
;;
|
||||
;; - `doom-font' -- the primary font to use
|
||||
;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable)
|
||||
;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for
|
||||
;; 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
|
||||
;; accept. For example:
|
||||
;;
|
||||
;;(setq doom-font (font-spec :family "Fira Code" :size 12 :weight 'semi-light)
|
||||
;; doom-variable-pitch-font (font-spec :family "Fira Sans" :size 13))
|
||||
(setq doom-font (font-spec :family "JetBrainsMono Nerd Font" :size 13 :weight 'regular)
|
||||
doom-variable-pitch-font (font-spec :family "JetBrainsMono Nerd Font" :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
|
||||
;; available. You can either set `doom-theme' or manually load a theme with the
|
||||
;; `load-theme' function. This is the default:
|
||||
(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,
|
||||
;; change `org-directory'. It must be set before org loads!
|
||||
(setq org-directory "~/org/")
|
||||
|
||||
|
||||
;; Whenever you reconfigure a package, make sure to wrap your config in an
|
||||
;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
|
||||
;;
|
||||
;; (after! PACKAGE
|
||||
;; (setq x y))
|
||||
;;
|
||||
;; 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
|
||||
;; - `use-package!' for configuring packages
|
||||
;; - `after!' for running code after a package has loaded
|
||||
;; - `add-load-path!' for adding directories to the `load-path', relative to
|
||||
;; this file. Emacs searches the `load-path' when you load packages with
|
||||
;; `require' or `use-package'.
|
||||
;; - `map!' for binding new keys
|
||||
;;
|
||||
;; 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').
|
||||
;; 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
|
||||
;; they are implemented.
|
||||
|
||||
(use-package! lispyville
|
||||
:hook ((common-lisp-mode . lispyville-mode)
|
||||
(emacs-lisp-mode . lispyville-mode)
|
||||
(scheme-mode . lispyville-mode)
|
||||
(racket-mode . lispyville-mode)
|
||||
(hy-mode . lispyville-mode)
|
||||
(lfe-mode . lispyville-mode)
|
||||
(clojure-mode . lispyville-mode))
|
||||
:config
|
||||
(lispyville-set-key-theme
|
||||
'(additional
|
||||
additional-insert
|
||||
(additional-movement normal visual motion)
|
||||
(atom-movement normal visual)
|
||||
c-w
|
||||
c-u
|
||||
(commentary normal visual)
|
||||
escape
|
||||
(operators normal)
|
||||
(prettify insert)
|
||||
slurp/barf)))
|
||||
|
||||
(use-package! kubernetes-overview
|
||||
:commands (kubernetes-overview)
|
||||
:config
|
||||
(setq kubernetes-poll-frequency 3600
|
||||
kubernetes-redraw-frequency 3600))
|
||||
|
||||
(use-package! kubernetes-evil
|
||||
:after kubernetes-overview)
|
||||
|
||||
(use-package! ledger-mode
|
||||
:mode "\\.ledger\\'")
|
||||
|
||||
(use-package! evil-ledger
|
||||
:after ledger-mode
|
||||
:config
|
||||
(add-hook 'ledger-mode-hook #'evil-ledger-mode))
|
||||
|
||||
|
||||
; (use-package! org-transclusion
|
||||
; :after org)
|
||||
|
||||
(setq lsp-java-jdt-download-url "https://www.eclipse.org/downloads/download.php?file=/jdtls/milestones/1.42.0/jdt-language-server-1.42.0-202411281516.tar.gz")
|
||||
|
||||
(setq sql-connection-alist
|
||||
'((local
|
||||
(sql-product 'mysql)
|
||||
(sql-server "127.0.0.1")
|
||||
(sql-user "root")
|
||||
(sql-password "test")
|
||||
(sql-database "ebdb")
|
||||
(sql-port 3306))
|
||||
(dev
|
||||
(sql-product 'mysql)
|
||||
(sql-server "kube-db.dev.internal.shibumi.com")
|
||||
(sql-user "joe.frikker")
|
||||
(sql-password "psStCkHDMJ2DyR6x")
|
||||
(sql-database "mothership")
|
||||
(sql-port 3306)
|
||||
(sql-default-directory "/ssh:bastion.dev.internal.shibumi.com:"))))
|
||||
|
||||
(after! projectile
|
||||
(setq projectile-indexing-method 'alien))
|
||||
|
||||
(after! magit
|
||||
(setq magit-list-refs-sortby "-committerdate"))
|
||||
|
||||
(setq lsp-java-configuration-maven-user-settings "/Users/jfrikker/.m2/settings.xml")
|
||||
|
||||
(after! org
|
||||
(setq org-todo-keywords
|
||||
'((sequence
|
||||
"TODO(o)" ; A task that needs doing
|
||||
"IN_PROGRESS(p!)" ; Task is in progress
|
||||
"HOLD(h@)" ; Task is being held up or paused
|
||||
"|"
|
||||
"DONE(d!)"
|
||||
"CANCELLED(c@)"))
|
||||
org-todo-keyword-faces
|
||||
'(("IN_PROGRESS" . +org-todo-active)
|
||||
("HOLD" . +org-todo-onhold)
|
||||
("CANCELLED" . +org-todo-cancel)))
|
||||
|
||||
(setq org-capture-templates
|
||||
'(("t" "Personal todo" entry
|
||||
(file+headline +org-capture-todo-file "Inbox")
|
||||
"* TODO %?\n%i\n%a" :prepend t)
|
||||
("d" "Decision" entry
|
||||
(file+headline "decisions.org" "Unfiled")
|
||||
"* %?\n:properties:\n%^{ORG-LEVEL|Sprint Team}p:end:\n#What\n\n#Why\n\n#When\n\n%u"))))
|
||||
|
||||
(defun org-columns-dblock-write-default (ipos table params)
|
||||
"Write out a columnview table at position IPOS in the current buffer.
|
||||
TABLE is a table with data as produced by `org-columns--capture-view'.
|
||||
PARAMS is the parameter property list obtained from the dynamic block
|
||||
definition."
|
||||
(let ((link (plist-get params :link))
|
||||
(width-specs
|
||||
(mapcar (lambda (spec) (nth 2 spec))
|
||||
org-columns-current-fmt-compiled)))
|
||||
(when table
|
||||
;; Prune level information from the table. Also normalize
|
||||
;; headings: remove stars, add indentation entities, if
|
||||
;; required, and possibly precede some of them with a horizontal
|
||||
;; rule.
|
||||
(let ((item-index
|
||||
(let ((p (assoc "ITEM" org-columns-current-fmt-compiled)))
|
||||
(and p (cl-position p
|
||||
org-columns-current-fmt-compiled
|
||||
:test #'equal))))
|
||||
(hlines (plist-get params :hlines))
|
||||
(indent (plist-get params :indent))
|
||||
new-table)
|
||||
;; Copy header and first rule.
|
||||
(push (pop table) new-table)
|
||||
(push (pop table) new-table)
|
||||
(dolist (row table (setq table (nreverse new-table)))
|
||||
(let ((level (car row)))
|
||||
(when (and (not (eq (car new-table) 'hline))
|
||||
(or (eq hlines t)
|
||||
(and (numberp hlines) (<= level hlines))))
|
||||
(push 'hline new-table))
|
||||
(when item-index
|
||||
(let* ((raw (nth item-index (cdr row)))
|
||||
(cleaned (org-columns--clean-item raw))
|
||||
(item (if (not link) cleaned
|
||||
(let ((search (org-link-heading-search-string raw)))
|
||||
(org-link-make-string
|
||||
search
|
||||
cleaned)))))
|
||||
(setf (nth item-index (cdr row))
|
||||
(if (and indent (> level 1))
|
||||
(concat "\\_" (make-string (* 2 (1- level)) ?\s) item)
|
||||
item))))
|
||||
(push (cdr row) new-table))))
|
||||
(when (plist-get params :vlines)
|
||||
(setq table
|
||||
(let ((size (length org-columns-current-fmt-compiled)))
|
||||
(append (mapcar (lambda (x) (if (eq 'hline x) x (cons "" x)))
|
||||
table)
|
||||
(list (cons "/" (make-list size "<>")))))))
|
||||
(when (seq-find #'identity width-specs)
|
||||
;; There are width specifiers in column format. Pass them
|
||||
;; to the resulting table, adding alignment field as the first
|
||||
;; row.
|
||||
(push (mapcar (lambda (width) (when width (format "<%d>" width))) width-specs) table))
|
||||
;; now insert the table into the buffer
|
||||
(goto-char ipos)
|
||||
(let ((content-lines (org-split-string (plist-get params :content) "\n"))
|
||||
recalc)
|
||||
;; Insert affiliated keywords before the table.
|
||||
(when content-lines
|
||||
(while (string-match-p "\\`[ \t]*#\\+" (car content-lines))
|
||||
(insert (string-trim-left (pop content-lines)) "\n")))
|
||||
(save-excursion
|
||||
;; Insert table at point.
|
||||
(insert
|
||||
(mapconcat (lambda (row)
|
||||
(if (eq row 'hline) "|-|"
|
||||
(format "|%s|" (mapconcat #'identity row "|"))))
|
||||
table
|
||||
"\n"))
|
||||
;; Insert TBLFM lines following table.
|
||||
(let ((case-fold-search t))
|
||||
(dolist (line content-lines)
|
||||
(when (string-match-p "\\`[ \t]*#\\+TBLFM:" line)
|
||||
(insert "\n" (string-trim-left line))
|
||||
(unless recalc (setq recalc t))))))
|
||||
(when recalc (org-table-recalculate 'all t))
|
||||
(org-table-align)
|
||||
(when (seq-find #'identity width-specs)
|
||||
(org-table-shrink))))))
|
||||
(map!
|
||||
:nv "g w" #'avy-goto-word-1
|
||||
:nv "g r" #'+lookup/references
|
||||
:nv "SPC D" #'+default/diagnostics
|
||||
:nv "] e" #'flycheck-next-error
|
||||
:nv "[ e" #'flycheck-previous-error)
|
||||
@@ -1,26 +0,0 @@
|
||||
(custom-set-variables
|
||||
;; custom-set-variables was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(ignored-local-variable-values
|
||||
'((Syntax . ANSI-Common-Lisp)
|
||||
(package . cl-mock)
|
||||
(syntax . common-lisp)
|
||||
(Base . 10)
|
||||
(Package . FIVEAM)
|
||||
(Syntax . Ansi-Common-Lisp)))
|
||||
'(safe-local-variable-values
|
||||
'((org-tags-exclude-from-inheritance "why" "tbd")
|
||||
(org-tags-exclude-from-inheritance quote
|
||||
("why" "tbd"))
|
||||
(org-tags-exclude-from-inheritance quote
|
||||
("why"
|
||||
(\, "tbd")))
|
||||
(sly-load-failed-fasl . ask))))
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
)
|
||||
@@ -1,195 +0,0 @@
|
||||
;;; init.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; This file controls what Doom modules are enabled and what order they load
|
||||
;; 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
|
||||
;; documentation. There you'll find a link to Doom's Module Index where all
|
||||
;; of our modules are listed, including what flags they support.
|
||||
|
||||
;; 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
|
||||
;; flags as well (those symbols that start with a plus).
|
||||
;;
|
||||
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
|
||||
;; directory (for easy access to its source code).
|
||||
|
||||
(doom! :input
|
||||
;;bidi ; (tfel ot) thgir etirw uoy gnipleh
|
||||
;;chinese
|
||||
;;japanese
|
||||
;;layout ; auie,ctsrnm is the superior home row
|
||||
|
||||
:completion
|
||||
;; company ; the ultimate code completion backend
|
||||
(corfu +orderless)
|
||||
;;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
|
||||
|
||||
:ui
|
||||
;;deft ; notational velocity for Emacs
|
||||
doom ; what makes DOOM look the way it does
|
||||
doom-dashboard ; a nifty splash screen for Emacs
|
||||
;;doom-quit ; DOOM quit-message prompts when you quit Emacs
|
||||
;;(emoji +unicode) ; 🙂
|
||||
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
||||
;;indent-guides ; highlighted indent columns
|
||||
;;ligatures ; ligatures and symbols to make your code pretty again
|
||||
;;minimap ; show a map of the code on the side
|
||||
modeline ; snazzy, Atom-inspired modeline, plus API
|
||||
;;nav-flash ; blink cursor line after big motions
|
||||
neotree ; a project drawer, like NERDTree for vim
|
||||
ophints ; highlight the region an operation acts on
|
||||
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
||||
;;tabs ; a tab bar for Emacs
|
||||
;;(treemacs +lsp) ; a project drawer, like neotree but cooler
|
||||
;;unicode ; extended unicode support for various languages
|
||||
(vc-gutter +pretty) ; vcs diff in the fringe
|
||||
vi-tilde-fringe ; fringe tildes to mark beyond EOB
|
||||
;;window-select ; visually switch windows
|
||||
workspaces ; tab emulation, persistence & separate workspaces
|
||||
;;zen ; distraction-free coding or writing
|
||||
|
||||
:editor
|
||||
(evil +everywhere); come to the dark side, we have cookies
|
||||
file-templates ; auto-snippets for empty files
|
||||
fold ; (nigh) universal code folding
|
||||
;;(format +onsave) ; automated prettiness
|
||||
;;god ; run Emacs commands without modifier keys
|
||||
lispy ; vim for lisp, for people who don't like vim
|
||||
;;multiple-cursors ; editing in many places at once
|
||||
;;objed ; text object editing for the innocent
|
||||
;;parinfer ; turn lisp into python, sort of
|
||||
;;rotate-text ; cycle region at point between text candidates
|
||||
snippets ; my elves. They type so I don't have to
|
||||
;;word-wrap ; soft wrapping with language-aware indent
|
||||
|
||||
:emacs
|
||||
dired ; making dired pretty [functional]
|
||||
electric ; smarter, keyword-based electric-indent
|
||||
;;ibuffer ; interactive buffer management
|
||||
undo ; persistent, smarter undo for your inevitable mistakes
|
||||
vc ; version-control and Emacs, sitting in a tree
|
||||
|
||||
:term
|
||||
eshell ; the elisp shell that works everywhere
|
||||
;;shell ; simple shell REPL for Emacs
|
||||
;;term ; basic terminal emulator for Emacs
|
||||
;;vterm ; the best terminal emulation in Emacs
|
||||
|
||||
:checkers
|
||||
syntax ; tasing you for every semicolon you forget
|
||||
;;(spell +flyspell) ; tasing you for misspelling mispelling
|
||||
;;grammar ; tasing grammar mistake every you make
|
||||
|
||||
:tools
|
||||
;;ansible
|
||||
;;biblio ; Writes a PhD for you (citation needed)
|
||||
;;collab ; buffers with friends
|
||||
(debugger +lsp) ; FIXME stepping through code, to help you add bugs
|
||||
direnv
|
||||
docker
|
||||
;;editorconfig ; let someone else argue about tabs vs spaces
|
||||
;;ein ; tame Jupyter notebooks with emacs
|
||||
(eval +overlay) ; run code, run (also, repls)
|
||||
lookup ; navigate your code and its documentation
|
||||
lsp ; M-x vscode
|
||||
(magit +forge) ; a git porcelain for Emacs
|
||||
;;make ; run make tasks from Emacs
|
||||
;;pass ; password manager for nerds
|
||||
;;pdf ; pdf enhancements
|
||||
;;prodigy ; FIXME managing external services & code builders
|
||||
;;rgb ; creating color strings
|
||||
;;taskrunner ; taskrunner for all your projects
|
||||
;;terraform ; infrastructure as code
|
||||
;;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
|
||||
|
||||
:os
|
||||
(:if (featurep :system 'macos) macos) ; improve compatibility with macOS
|
||||
tty ; improve the terminal Emacs experience
|
||||
|
||||
:lang
|
||||
;;agda ; types of types of types of types...
|
||||
;;beancount ; mind the GAAP
|
||||
;;(cc +lsp) ; C > C++ == 1
|
||||
;;clojure ; java with a lisp
|
||||
common-lisp ; if you've seen one lisp, you've seen them all
|
||||
;;coq ; proofs-as-programs
|
||||
;;crystal ; ruby at the speed of c
|
||||
;;csharp ; unity, .NET, and mono shenanigans
|
||||
;;data ; config/data formats
|
||||
;;(dart +flutter) ; paint ui and not much else
|
||||
;;dhall
|
||||
;;elixir ; erlang done right
|
||||
;;elm ; care for a cup of TEA?
|
||||
emacs-lisp ; drown in parentheses
|
||||
;;erlang ; an elegant language for a more civilized age
|
||||
;;ess ; emacs speaks statistics
|
||||
;;factor
|
||||
;;faust ; dsp, but you get to keep your soul
|
||||
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
|
||||
;;fsharp ; ML stands for Microsoft's Language
|
||||
;;fstar ; (dependent) types and (monadic) effects and Z3
|
||||
;;gdscript ; the language you waited for
|
||||
;;(go +lsp) ; the hipster dialect
|
||||
;;(graphql +lsp) ; Give queries a REST
|
||||
;;(haskell +lsp) ; a language that's lazier than I am
|
||||
;;hy ; readability of scheme w/ speed of python
|
||||
;;idris ; a language you can depend on
|
||||
(json +tree-sitter) ; At least it ain't XML
|
||||
(java +lsp +tree-sitter) ; the poster child for carpal tunnel syndrome
|
||||
(javascript +lsp +treesitter) ; all(hope(abandon(ye(who(enter(here))))))
|
||||
;;julia ; a better, faster MATLAB
|
||||
;;kotlin ; a better, slicker Java(Script)
|
||||
;;latex ; writing papers in Emacs has never been so fun
|
||||
;;lean ; for folks with too much to prove
|
||||
;;ledger ; be audit you can be
|
||||
;;lua ; one-based indices? one-based indices
|
||||
;;markdown ; writing docs for people to ignore
|
||||
;;nim ; python + lisp at the speed of c
|
||||
;;nix ; I hereby declare "nix geht mehr!"
|
||||
;;ocaml ; an objective camel
|
||||
(org) ; organize your plain life in plain text
|
||||
;;php ; perl's insecure younger brother
|
||||
;;plantuml ; diagrams for confusing people more
|
||||
;;purescript ; javascript, but functional
|
||||
;;(python +lsp +pyright +pyenv) ; beautiful is better than ugly
|
||||
;;qt ; the 'cutest' gui framework ever
|
||||
;;racket ; a DSL for DSLs
|
||||
;;raku ; the artist formerly known as perl6
|
||||
rest ; Emacs as a REST client
|
||||
;;rst ; ReST in peace
|
||||
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
||||
(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
||||
;;scala ; java, but good
|
||||
;;(scheme +guile) ; a fully conniving family of lisps
|
||||
sh ; she sells {ba,z,fi}sh shells on the C xor
|
||||
;;sml
|
||||
;;solidity ; do you need a blockchain? No.
|
||||
;;swift ; who asked for emoji variables?
|
||||
;;terra ; Earth and Moon in alignment for performance.
|
||||
web ; the tubes
|
||||
yaml ; JSON, but readable
|
||||
;;zig ; C, but simpler
|
||||
|
||||
:email
|
||||
;;(mu4e +org +gmail)
|
||||
;;notmuch
|
||||
;;(wanderlust +gmail)
|
||||
|
||||
:app
|
||||
;;calendar
|
||||
;;emms
|
||||
;;everywhere ; *leave* Emacs!? You must be joking
|
||||
;;irc ; how neckbeards socialize
|
||||
;;(rss +org) ; emacs as an RSS reader
|
||||
;;twitter ; twitter client https://twitter.com/vnought
|
||||
|
||||
:config
|
||||
;;literate
|
||||
(default +bindings +smartparens))
|
||||
@@ -1,57 +0,0 @@
|
||||
;; -*- no-byte-compile: t; -*-
|
||||
;;; $DOOMDIR/packages.el
|
||||
|
||||
;; To install a package with Doom you must declare them here and run 'doom sync'
|
||||
;; on the command line, then restart Emacs for the changes to take effect -- or
|
||||
;; use 'M-x doom/reload'.
|
||||
|
||||
|
||||
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
|
||||
;(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"))
|
||||
|
||||
;; 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")))
|
||||
|
||||
;; 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! sly-quicklisp :disable t)
|
||||
;(package! org-transclusion)
|
||||
|
||||
(package! kubernetes)
|
||||
(package! kubernetes-evil)
|
||||
(package! ledger-mode)
|
||||
(package! evil-ledger)
|
||||
|
||||
;; 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"))
|
||||
|
||||
;; 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"))
|
||||
|
||||
;; Use `:pin' to specify a particular commit to install.
|
||||
;(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)
|
||||
;; ...or multiple packages
|
||||
;(unpin! pinned-package another-pinned-package)
|
||||
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
|
||||
;(unpin! t)
|
||||
@@ -1,20 +0,0 @@
|
||||
pkgs:
|
||||
{
|
||||
enable = true;
|
||||
extraPackages = with pkgs.bat-extras; [ batdiff batman batgrep batwatch ];
|
||||
config = {
|
||||
style = "numbers";
|
||||
theme = "catppuccin-frappe";
|
||||
};
|
||||
themes = {
|
||||
catppuccin-frappe = {
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "sublime-text"; # Bat uses sublime syntax for its themes
|
||||
rev = "3d8625d937d89869476e94bc100192aa220ce44a";
|
||||
sha256 = "3ABUsfJpb6RO6AiuuSL5gwDofJIwC5tlEMzBrlY9/s0=";
|
||||
};
|
||||
file = "Frappe.tmTheme";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
{
|
||||
enable = true;
|
||||
extraPackages = epkgs: [
|
||||
epkgs.catppuccin-theme
|
||||
epkgs.evil
|
||||
epkgs.evil-collection
|
||||
epkgs.general
|
||||
epkgs.projectile
|
||||
epkgs.sly
|
||||
epkgs.sly-macrostep
|
||||
epkgs.vertico
|
||||
epkgs.which-key
|
||||
];
|
||||
extraConfig = ''
|
||||
(use-package catppuccin-theme
|
||||
:config
|
||||
(setq catppuccin-flavor 'frappe)
|
||||
(load-theme 'catppuccin :no-confirm))
|
||||
|
||||
(use-package evil
|
||||
:init
|
||||
(setq evil-want-integration t)
|
||||
(setq evil-want-keybinding nil)
|
||||
:config
|
||||
(evil-mode 1)
|
||||
(evil-set-leader 'normal (kbd "SPC")))
|
||||
|
||||
(use-package evil-collection
|
||||
:after evil
|
||||
:config
|
||||
(evil-collection-init))
|
||||
|
||||
(use-package general
|
||||
:after evil
|
||||
:config
|
||||
(general-evil-setup)
|
||||
|
||||
(general-define-key
|
||||
:states 'normal
|
||||
:prefix "SPC"
|
||||
"h" '(:ignore t :which-key "Help")
|
||||
":" '(execute-extended-command :which-key "Execute Command")
|
||||
";" '(eval-expression :which-key "Evaluate Expression"))
|
||||
|
||||
(general-define-key
|
||||
:states 'normal
|
||||
:prefix "SPC h"
|
||||
"v" '(describe-variable :which-key "Describe Variable")))
|
||||
|
||||
(use-package projectile
|
||||
:config (projectile-mode 1))
|
||||
|
||||
(use-package sly
|
||||
:config
|
||||
(setq inferior-lisp-program "sbcl"))
|
||||
|
||||
(use-package sly-macrostep)
|
||||
|
||||
(use-package vertico
|
||||
:config
|
||||
(vertico-mode))
|
||||
|
||||
(use-package which-key
|
||||
:config
|
||||
(which-key-mode))
|
||||
|
||||
(set-face-attribute 'default nil :font "JetBrainsMono Nerd Font" :height 130)
|
||||
(set-face-attribute 'fixed-pitch nil :font "JetBrainsMono Nerd Font" :height 130)
|
||||
|
||||
(setq inhibit-startup-message t)
|
||||
|
||||
(scroll-bar-mode -1)
|
||||
(tool-bar-mode -1)
|
||||
(menu-bar-mode -1)
|
||||
(setf indent-tabs-mode nil)
|
||||
'';
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
icons = "auto";
|
||||
}
|
||||
@@ -1,127 +0,0 @@
|
||||
pkgs:
|
||||
{
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
du = "dust";
|
||||
http = "xh";
|
||||
https = "xh";
|
||||
mux = "tmuxinator";
|
||||
nsh = "nix-shell --command fish";
|
||||
};
|
||||
|
||||
# interactiveShellInit = ''
|
||||
# function fish_prompt
|
||||
# set -l last_status $status
|
||||
# if not set -q __fish_git_prompt_show_informative_status
|
||||
# set -g __fish_git_prompt_show_informative_status 1
|
||||
# end
|
||||
# if not set -q __fish_git_prompt_hide_untrackedfiles
|
||||
# set -g __fish_git_prompt_hide_untrackedfiles 1
|
||||
# end
|
||||
#
|
||||
# if not set -q __fish_git_prompt_color_branch
|
||||
# set -g __fish_git_prompt_color_branch magenta --bold
|
||||
# end
|
||||
# if not set -q __fish_git_prompt_showupstream
|
||||
# set -g __fish_git_prompt_showupstream "informative"
|
||||
# end
|
||||
# if not set -q __fish_git_prompt_char_upstream_ahead
|
||||
# set -g __fish_git_prompt_char_upstream_ahead "↑"
|
||||
# end
|
||||
# if not set -q __fish_git_prompt_char_upstream_behind
|
||||
# set -g __fish_git_prompt_char_upstream_behind "↓"
|
||||
# end
|
||||
# if not set -q __fish_git_prompt_char_upstream_prefix
|
||||
# set -g __fish_git_prompt_char_upstream_prefix ""
|
||||
# end
|
||||
#
|
||||
# if not set -q __fish_git_prompt_char_stagedstate
|
||||
# set -g __fish_git_prompt_char_stagedstate "●"
|
||||
# end
|
||||
# if not set -q __fish_git_prompt_char_dirtystate
|
||||
# set -g __fish_git_prompt_char_dirtystate "✚"
|
||||
# end
|
||||
# if not set -q __fish_git_prompt_char_untrackedfiles
|
||||
# set -g __fish_git_prompt_char_untrackedfiles "…"
|
||||
# end
|
||||
# if not set -q __fish_git_prompt_char_invalidstate
|
||||
# set -g __fish_git_prompt_char_invalidstate "✖"
|
||||
# end
|
||||
# if not set -q __fish_git_prompt_char_cleanstate
|
||||
# set -g __fish_git_prompt_char_cleanstate "✔"
|
||||
# end
|
||||
#
|
||||
# if not set -q __fish_git_prompt_color_dirtystate
|
||||
# set -g __fish_git_prompt_color_dirtystate blue
|
||||
# end
|
||||
# if not set -q __fish_git_prompt_color_stagedstate
|
||||
# set -g __fish_git_prompt_color_stagedstate yellow
|
||||
# end
|
||||
# if not set -q __fish_git_prompt_color_invalidstate
|
||||
# set -g __fish_git_prompt_color_invalidstate red
|
||||
# end
|
||||
# if not set -q __fish_git_prompt_color_untrackedfiles
|
||||
# set -g __fish_git_prompt_color_untrackedfiles $fish_color_normal
|
||||
# end
|
||||
# if not set -q __fish_git_prompt_color_cleanstate
|
||||
# set -g __fish_git_prompt_color_cleanstate green --bold
|
||||
# end
|
||||
#
|
||||
# if not set -q __fish_prompt_normal
|
||||
# set -g __fish_prompt_normal (set_color normal)
|
||||
# end
|
||||
#
|
||||
# set -l color_cwd
|
||||
# set -l prefix
|
||||
# set -l suffix
|
||||
# switch "$USER"
|
||||
# case root toor
|
||||
# if set -q fish_color_cwd_root
|
||||
# set color_cwd $fish_color_cwd_root
|
||||
# else
|
||||
# set color_cwd $fish_color_cwd
|
||||
# end
|
||||
# set suffix '#'
|
||||
# case '*'
|
||||
# set color_cwd $fish_color_cwd
|
||||
# set suffix '$'
|
||||
# end
|
||||
#
|
||||
# # PWD
|
||||
# set_color $color_cwd
|
||||
# echo -n (prompt_pwd)
|
||||
# set_color normal
|
||||
#
|
||||
# printf '%s ' (fish_git_prompt)
|
||||
#
|
||||
# if not test $last_status -eq 0
|
||||
# set_color $fish_color_error
|
||||
# echo -n "[$last_status] "
|
||||
# set_color normal
|
||||
# end
|
||||
#
|
||||
# echo -n "$suffix "
|
||||
# end
|
||||
# '';
|
||||
plugins = [
|
||||
{
|
||||
name = "nix-env";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "lilyball";
|
||||
repo = "nix-env.fish";
|
||||
rev = "7b65bd228429e852c8fdfa07601159130a818cfa";
|
||||
sha256 = "RG/0rfhgq6aEKNZ0XwIqOaZ6K5S4+/Y5EEMnIdtfPhk=";
|
||||
};
|
||||
}
|
||||
# {
|
||||
# name = "fzf";
|
||||
# src = pkgs.fetchFromGitHub {
|
||||
# owner = "PatrickF1";
|
||||
# repo = "fzf.fish";
|
||||
# rev = "63c8f8e65761295da51029c5b6c9e601571837a1";
|
||||
# sha256 = "036n50zr9kyg6ad408zn7wq2vpfwhmnfwab465km4dk60ywmrlcb";
|
||||
|
||||
# };
|
||||
# }
|
||||
];
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
enable = true;
|
||||
defaultCommand = "fd --type f";
|
||||
fileWidgetCommand = "fd --type f";
|
||||
fileWidgetOptions = ["--preview" "'bat --color=always --style=numbers --line-range=:500 {}'"];
|
||||
changeDirWidgetCommand = "fd --type d";
|
||||
tmux.enableShellIntegration = true;
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
{
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
settings.theme = "catppuccin_frappe";
|
||||
|
||||
settings.editor.auto-format = false;
|
||||
settings.editor.auto-pairs = false;
|
||||
settings.editor.auto-save = true;
|
||||
# settings.editor.completion-replace = true;
|
||||
settings.editor.cursorline = true;
|
||||
settings.editor.idle-timeout = 0;
|
||||
settings.editor.rulers = [100];
|
||||
settings.editor.text-width = 100;
|
||||
|
||||
settings.editor.lsp.goto-reference-include-declaration = false;
|
||||
|
||||
settings.editor.cursor-shape.insert = "bar";
|
||||
|
||||
settings.editor.smart-tab.supersede-menu = true;
|
||||
|
||||
settings.keys.normal.space.space = "file_picker";
|
||||
settings.keys.normal.space."," = "buffer_picker";
|
||||
|
||||
settings.editor.whitespace.render.newline = "all";
|
||||
|
||||
languages.language-server.eslint.args = ["--stdio"];
|
||||
languages.language-server.eslint.command = "vscode-eslint-language-server";
|
||||
|
||||
languages.language-server.eslint.config.nodePath = "";
|
||||
languages.language-server.eslint.config.quiet = false;
|
||||
languages.language-server.eslint.config.rulesCustomizations = [];
|
||||
languages.language-server.eslint.config.run = "onType";
|
||||
languages.language-server.eslint.config.validate = "on";
|
||||
languages.language-server.eslint.config.codeAction.disableRuleComment.enable = true;
|
||||
languages.language-server.eslint.config.codeAction.disableRuleComment.location = "separateLine";
|
||||
languages.language-server.eslint.config.codeAction.showDocumentation.enable = true;
|
||||
languages.language-server.eslint.config.problems.shortenToSingleLine = false;
|
||||
|
||||
languages.language-server.jdtls.config.java.autobuild.enabled = true;
|
||||
|
||||
languages.language-server.jdtls.config.java.completion.maxResults = 1000;
|
||||
|
||||
languages.language-server.jdtls.config.java.format.settings.url = "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml";
|
||||
|
||||
languages.language = [
|
||||
{
|
||||
name = "typescript";
|
||||
language-servers = [ "typescript-language-server" "vscode-eslint-language-server" ];
|
||||
indent.tab-width = 4;
|
||||
indent.unit = " ";
|
||||
}
|
||||
{
|
||||
name = "tsx";
|
||||
language-servers = [ "typescript-language-server" "vscode-eslint-language-server" ];
|
||||
indent.tab-width = 4;
|
||||
indent.unit = " ";
|
||||
}
|
||||
{
|
||||
name = "java";
|
||||
indent.tab-width = 4;
|
||||
indent.unit = " ";
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
pkgs: {
|
||||
enable = true;
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
pkgs:
|
||||
{
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
extraConfig = ''
|
||||
set et
|
||||
set nofixeol
|
||||
set number
|
||||
set ts=2
|
||||
set sts=-1
|
||||
set sw=2
|
||||
'';
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
vim-gitgutter
|
||||
{
|
||||
plugin = nvim-lspconfig;
|
||||
type = "lua";
|
||||
config = ''
|
||||
-- Mappings.
|
||||
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
||||
local opts = { noremap=true, silent=true }
|
||||
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts)
|
||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
|
||||
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
|
||||
|
||||
-- Use an on_attach function to only map the following keys
|
||||
-- after the language server attaches to the current buffer
|
||||
local on_attach = function(client, bufnr)
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
|
||||
-- Mappings.
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
local bufopts = { noremap=true, silent=true, buffer=bufnr }
|
||||
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
|
||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
|
||||
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
|
||||
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, bufopts)
|
||||
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, bufopts)
|
||||
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, bufopts)
|
||||
vim.keymap.set('n', '<space>wl', function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
end, bufopts)
|
||||
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, bufopts)
|
||||
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, bufopts)
|
||||
vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action, bufopts)
|
||||
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
|
||||
vim.keymap.set('n', '<space>f', vim.lsp.buf.formatting, bufopts)
|
||||
end
|
||||
|
||||
require('lspconfig')['hls'].setup{
|
||||
on_attach = on_attach,
|
||||
}
|
||||
require('lspconfig')['rust_analyzer'].setup{
|
||||
on_attach = on_attach,
|
||||
}
|
||||
'';
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
pkgs: {
|
||||
enable = true;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
container.disabled = true;
|
||||
git_branch.symbol = " ";
|
||||
git_status.ahead = "⇡\${count}";
|
||||
git_status.behind = "⇣\${count}";
|
||||
git_status.diverged = "⇕⇡\${ahead_count}⇣\${behind_count}";
|
||||
git_status.format = "([\\[\$conflicted\$staged\$ahead_behind\\]](\$style) )";
|
||||
java.symbol = " ";
|
||||
line_break.disabled = true;
|
||||
nix_shell.symbol = " ";
|
||||
nodejs.symbol = " ";
|
||||
package.disabled = true;
|
||||
palette = "catppuccin_frappe";
|
||||
python.symbol = " ";
|
||||
package.symbol = " ";
|
||||
rust.symbol = " ";
|
||||
docker_context.disabled = true;
|
||||
shell.disabled = false;
|
||||
} // builtins.fromTOML (builtins.readFile
|
||||
(pkgs.fetchFromGitHub
|
||||
{
|
||||
owner = "catppuccin";
|
||||
repo = "starship";
|
||||
rev = "3e3e54410c3189053f4da7a7043261361a1ed1bc"; # Replace with the latest commit hash
|
||||
sha256 = "soEBVlq3ULeiZFAdQYMRFuswIIhI9bclIU8WXjxd7oY=";
|
||||
} + /palettes/frappe.toml));
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
pkgs: {
|
||||
baseIndex = 1;
|
||||
clock24 = true;
|
||||
customPaneNavigationAndResize = true;
|
||||
historyLimit = 50000;
|
||||
enable = true;
|
||||
escapeTime = 0;
|
||||
keyMode = "vi";
|
||||
mouse = true;
|
||||
plugins = [
|
||||
{
|
||||
plugin = pkgs.tmuxPlugins.catppuccin;
|
||||
extraConfig = ''set -g @catppuccin_window_tabs_enabled on
|
||||
set -g @catppuccin_window_default_text "#W"
|
||||
set -g @catppuccin_window_current_text "#W"'';
|
||||
}
|
||||
# {
|
||||
# plugin = pkgs.tmuxPlugins.tmux-thumbs;
|
||||
# extraConfig = ''
|
||||
# set -g @thumbs-unique enabled
|
||||
# '';
|
||||
# }
|
||||
];
|
||||
shell = pkgs.zsh + "/bin/zsh";
|
||||
shortcut = "Space";
|
||||
tmuxinator.enable = true;
|
||||
terminal = "xterm-256color";
|
||||
extraConfig = ''
|
||||
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
||||
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
|
||||
|
||||
bind-key -T launcher g popup -h 100% -w 100% -E lazygit
|
||||
bind-key g switch-client -Tlauncher
|
||||
set -g default-command ""
|
||||
'';
|
||||
}
|
||||
@@ -1,161 +0,0 @@
|
||||
{
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
local config = {}
|
||||
local workspace_switcher = wezterm.plugin.require("https://github.com/MLFlexer/smart_workspace_switcher.wezterm")
|
||||
workspace_switcher.zoxide_path='~/.nix-profile/bin/zoxide'
|
||||
|
||||
config.color_scheme = 'Catppuccin Frappe'
|
||||
config.default_prog = { '/Users/jfrikker/.nix-profile/bin/zsh', '-l' }
|
||||
config.font_size = 13.0
|
||||
-- config.font = wezterm.font("JetBrains Mono")
|
||||
config.inactive_pane_hsb = {
|
||||
saturation = 0.5,
|
||||
brightness = 0.5,
|
||||
}
|
||||
config.pane_focus_follows_mouse = true
|
||||
config.switch_to_last_active_tab_when_closing_tab = true
|
||||
config.tab_bar_at_bottom = true
|
||||
config.use_fancy_tab_bar = false
|
||||
config.window_decorations = "RESIZE"
|
||||
|
||||
wezterm.on('smart_workspace_switcher.workspace_switcher.created', function(window, path, workspace)
|
||||
local editor = window:active_tab()
|
||||
editor:set_title("edit")
|
||||
editor:panes()[1]:send_text("hx\n")
|
||||
local run = window:spawn_tab {}
|
||||
run:set_title "run"
|
||||
local term = window:spawn_tab {}
|
||||
term:set_title "term"
|
||||
editor:activate()
|
||||
end)
|
||||
|
||||
-- From https://alexplescan.com/posts/2024/08/10/wezterm/
|
||||
local function segments_for_right_status(window)
|
||||
return {
|
||||
window:active_workspace(),
|
||||
}
|
||||
end
|
||||
|
||||
wezterm.on('update-status', function(window, _)
|
||||
local SOLID_LEFT_ARROW = utf8.char(0xe0b2)
|
||||
local segments = segments_for_right_status(window)
|
||||
|
||||
local color_scheme = window:effective_config().resolved_palette
|
||||
-- Note the use of wezterm.color.parse here, this returns
|
||||
-- a Color object, which comes with functionality for lightening
|
||||
-- or darkening the colour (amongst other things).
|
||||
local bg = wezterm.color.parse(color_scheme.background)
|
||||
local fg = color_scheme.foreground
|
||||
|
||||
-- Each powerline segment is going to be coloured progressively
|
||||
-- darker/lighter depending on whether we're on a dark/light colour
|
||||
-- scheme. Let's establish the "from" and "to" bounds of our gradient.
|
||||
local gradient_to, gradient_from = bg
|
||||
gradient_from = gradient_to:lighten(0.2)
|
||||
|
||||
-- Yes, WezTerm supports creating gradients, because why not?! Although
|
||||
-- they'd usually be used for setting high fidelity gradients on your terminal's
|
||||
-- background, we'll use them here to give us a sample of the powerline segment
|
||||
-- colours we need.
|
||||
local gradient = wezterm.color.gradient(
|
||||
{
|
||||
orientation = 'Horizontal',
|
||||
colors = { gradient_from, gradient_to },
|
||||
},
|
||||
#segments -- only gives us as many colours as we have segments.
|
||||
)
|
||||
|
||||
-- We'll build up the elements to send to wezterm.format in this table.
|
||||
local elements = {}
|
||||
|
||||
for i, seg in ipairs(segments) do
|
||||
local is_first = i == 1
|
||||
|
||||
if is_first then
|
||||
table.insert(elements, { Background = { Color = 'none' } })
|
||||
end
|
||||
table.insert(elements, { Foreground = { Color = gradient[i] } })
|
||||
table.insert(elements, { Text = SOLID_LEFT_ARROW })
|
||||
|
||||
table.insert(elements, { Foreground = { Color = fg } })
|
||||
table.insert(elements, { Background = { Color = gradient[i] } })
|
||||
table.insert(elements, { Text = ' ' .. seg .. ' ' })
|
||||
end
|
||||
|
||||
window:set_right_status(wezterm.format(elements))
|
||||
end)
|
||||
|
||||
config.leader = { key = ' ', mods = 'CTRL', timeout_milliseconds = 10000 }
|
||||
config.keys = {
|
||||
{
|
||||
key = "s",
|
||||
mods = "CMD",
|
||||
action = workspace_switcher.switch_workspace(),
|
||||
},
|
||||
{
|
||||
key = "-",
|
||||
mods = "CMD",
|
||||
action = wezterm.action.SplitVertical {},
|
||||
},
|
||||
{
|
||||
key = "\\",
|
||||
mods = "CMD",
|
||||
action = wezterm.action.SplitHorizontal {},
|
||||
},
|
||||
{
|
||||
key = "h",
|
||||
mods = "CMD",
|
||||
action = wezterm.action.ActivatePaneDirection "Left",
|
||||
},
|
||||
{
|
||||
key = "j",
|
||||
mods = "CMD",
|
||||
action = wezterm.action.ActivatePaneDirection "Down",
|
||||
},
|
||||
{
|
||||
key = "k",
|
||||
mods = "CMD",
|
||||
action = wezterm.action.ActivatePaneDirection "Up",
|
||||
},
|
||||
{
|
||||
key = "l",
|
||||
mods = "CMD",
|
||||
action = wezterm.action.ActivatePaneDirection "Right",
|
||||
},
|
||||
{
|
||||
key = "g",
|
||||
mods = "CMD",
|
||||
action = wezterm.action.SpawnCommandInNewTab {
|
||||
args = { wezterm.home_dir .. "/.nix-profile/bin/zsh", "-l", "-c", "lazygit" }
|
||||
}
|
||||
},
|
||||
{
|
||||
key = "t",
|
||||
mods = "CMD",
|
||||
action = wezterm.action.SpawnCommandInNewTab {}
|
||||
},
|
||||
{
|
||||
key = 'z',
|
||||
mods = 'CMD',
|
||||
action = wezterm.action.TogglePaneZoomState,
|
||||
},
|
||||
{
|
||||
key = 'd',
|
||||
mods = 'CMD',
|
||||
action = wezterm.action.CloseCurrentTab { confirm = true },
|
||||
},
|
||||
}
|
||||
|
||||
for i = 1, 9 do
|
||||
-- CTRL+ALT + number to activate that tab
|
||||
table.insert(config.keys, {
|
||||
key = tostring(i),
|
||||
mods = 'LEADER',
|
||||
action = wezterm.action.ActivateTab(i - 1),
|
||||
})
|
||||
end
|
||||
|
||||
return config
|
||||
'';
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
pkgs: {
|
||||
enable = true;
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
};
|
||||
syntaxHighlighting.enable = true;
|
||||
autosuggestion.enable = true;
|
||||
historySubstringSearch.enable = true;
|
||||
history.share = false;
|
||||
cdpath = ["~/source"];
|
||||
plugins = [
|
||||
{
|
||||
name = "zsh-nix-shell";
|
||||
file = "nix-shell.plugin.zsh";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "chisui";
|
||||
repo = "zsh-nix-shell";
|
||||
rev = "v0.7.0";
|
||||
sha256 = "149zh2rm59blr2q458a5irkfh82y3dwdich60s9670kl3cl5h2m1";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,208 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Home Manager needs a bit of information about you and the
|
||||
# paths it should manage.
|
||||
home.username = {{ .chezmoi.username | quote }};
|
||||
home.homeDirectory = {{ .chezmoi.homeDir | quote }};
|
||||
|
||||
# home.sessionVariables.BAT_THEME = "catppuccin-frappe";
|
||||
# home.sessionVariables.RUST_SRC_PATH = "${pkgs.rust-bin.stable."1.68.0".rust-src}/lib/rustlib/src/rust/library";
|
||||
|
||||
# home.shellAliases = {
|
||||
# jdtls = "jdt-language-server";
|
||||
# };
|
||||
|
||||
home.sessionPath=[
|
||||
"$HOME/.cargo/bin"
|
||||
];
|
||||
|
||||
xdg.enable = true;
|
||||
# xdg.configFile."k9s/skin.yml" = {
|
||||
# enable = true;
|
||||
# source = pkgs.fetchFromGitHub {
|
||||
# owner = "catppuccin";
|
||||
# repo = "k9s";
|
||||
# rev = "322598e19a4270298b08dc2765f74795e23a1615"; # Replace with the latest commit hash
|
||||
# sha256 = "GrRCOwCgM8BFhY8TzO3/WDTUnGtqkhvlDWE//ox2GxI=";
|
||||
# } + /dist/frappe.yml;
|
||||
# };
|
||||
|
||||
xdg.configFile."lazygit/config.yml" = {
|
||||
enable = true;
|
||||
source = pkgs.fetchFromGitHub
|
||||
{
|
||||
owner = "catppuccin";
|
||||
repo = "lazygit";
|
||||
rev = "b2ecb6d41b6f54a82104879573c538e8bdaeb0bf"; # Replace with the latest commit hash
|
||||
sha256 = "9BBmWRcjNaJE9T0RKVEJaSnkrbMom0CLYE8PzAT6yFw=";
|
||||
} + /themes/frappe.yml;
|
||||
};
|
||||
|
||||
# xdg.configFile."fish/themes/Catppuccin Frappe.theme" = {
|
||||
# enable = true;
|
||||
# source = pkgs.fetchFromGitHub {
|
||||
# owner = "catppuccin";
|
||||
# repo = "fish";
|
||||
# rev = "91e6d6721362be05a5c62e235ed8517d90c567c9";
|
||||
# sha256 = "l9V7YMfJWhKDL65dNbxaddhaM6GJ0CFZ6z+4R6MJwBA=";
|
||||
# } + "/themes/Catppuccin Frappe.theme";
|
||||
# };
|
||||
|
||||
home.packages = [
|
||||
# pkgs.apacheKafka
|
||||
# pkgs.aria
|
||||
pkgs.asdf_3_3
|
||||
pkgs.aws-iam-authenticator
|
||||
pkgs.awscli
|
||||
pkgs.bashInteractive
|
||||
# pkgs.cargo
|
||||
pkgs.chezmoi
|
||||
pkgs.du-dust
|
||||
pkgs.emacs
|
||||
pkgs.fd
|
||||
pkgs.fend
|
||||
# pkgs.gcc
|
||||
# pkgs.ghc
|
||||
# pkgs.go
|
||||
# pkgs.graphviz
|
||||
# pkgs.haskellPackages.cabal-install
|
||||
# pkgs.haskellPackages.haskell-language-server
|
||||
# pkgs.helix
|
||||
# pkgs.httpie
|
||||
# pkgs.inconsolata-nerdfont
|
||||
# pkgs.jdt-language-server
|
||||
# pkgs.just
|
||||
# pkgs.jsonnet
|
||||
pkgs.kubectl
|
||||
pkgs.ledger
|
||||
pkgs.lorri
|
||||
# pkgs.maven
|
||||
pkgs.mysql-client
|
||||
# pkgs.neovide
|
||||
pkgs.neovim
|
||||
# pkgs.nodejs-16_x
|
||||
# pkgs.nodePackages.typescript-language-server
|
||||
pkgs.openssh
|
||||
# pkgs.postgresql
|
||||
# (pkgs.python3.withPackages (p: [p.ipython p.pyyaml p.boto3]))
|
||||
pkgs.ripgrep
|
||||
pkgs.rlwrap
|
||||
pkgs.roswell
|
||||
# pkgs.rust-analyzer
|
||||
# pkgs.rust-script
|
||||
# pkgs.rust-bin.stable."1.68.0".default
|
||||
# pkgs.rust-bin.stable."1.68.0".rust-analyzer
|
||||
# pkgs.rustup
|
||||
(pkgs.sbcl.withPackages (ps: with ps; [
|
||||
_3bmd
|
||||
_3bmd-ext-code-blocks
|
||||
agnostic-lizard
|
||||
alexandria
|
||||
anypool
|
||||
arrows
|
||||
async-process
|
||||
binding-arrows
|
||||
bt-semaphore
|
||||
chanl
|
||||
cl-annot
|
||||
cl-charms
|
||||
cl-markup
|
||||
cl-migratum
|
||||
cl-migratum_dot_provider_dot_local-path
|
||||
cl-migratum_dot_driver_dot_dbi
|
||||
cl-mock
|
||||
cl-punch
|
||||
cl-rdkafka
|
||||
cl-readline
|
||||
cl-setlocale
|
||||
clack
|
||||
clack-handler-hunchentoot
|
||||
clack-handler-woo
|
||||
dbd-mysql
|
||||
dbi
|
||||
deploy
|
||||
dexador
|
||||
fare-csv
|
||||
fiveam
|
||||
group-by
|
||||
inquisitor
|
||||
lack-request
|
||||
lack-response
|
||||
lisp-preprocessor
|
||||
local-time
|
||||
log4cl
|
||||
mito
|
||||
mockingbird
|
||||
myway
|
||||
prove
|
||||
prove-asdf
|
||||
queues
|
||||
queues_dot_priority-cqueue
|
||||
queues_dot_simple-cqueue
|
||||
replic
|
||||
serapeum
|
||||
shasht
|
||||
slynk
|
||||
smug
|
||||
split-sequence
|
||||
str
|
||||
sxql-composer
|
||||
trivial-ws
|
||||
trivial-open-browser
|
||||
trivial-timeout
|
||||
uuid
|
||||
yason ]))
|
||||
# pkgs.source-code-pro
|
||||
# pkgs.stack
|
||||
pkgs.tokei
|
||||
pkgs.xh
|
||||
# pkgs.xonsh
|
||||
pkgs.yubikey-manager
|
||||
# pkgs.yarn
|
||||
# pkgs.zellij
|
||||
];
|
||||
|
||||
# This value determines the Home Manager release that your
|
||||
# configuration is compatible with. This helps avoid breakage
|
||||
# when a new Home Manager release introduces backwards
|
||||
# incompatible changes.
|
||||
#
|
||||
# You can update Home Manager without changing this value. See
|
||||
# the Home Manager release notes for a list of state version
|
||||
# changes in each release.
|
||||
home.stateVersion = "22.05";
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
|
||||
programs.bash.enable = true;
|
||||
programs.bat = import ./home-bat.nix pkgs;
|
||||
# programs.btop.enable = true;
|
||||
programs.direnv.enable = true;
|
||||
programs.eza = import ./home-exa.nix;
|
||||
# programs.fish = import ./home-fish.nix pkgs;
|
||||
programs.fzf = import ./home-fzf.nix;
|
||||
programs.gh.enable = true;
|
||||
programs.git.enable = true;
|
||||
programs.git.userName = "Joe Frikker";
|
||||
programs.git.userEmail = {{ .email | quote }};
|
||||
programs.git.delta.enable = true;
|
||||
programs.helix = import ./home-hx.nix;
|
||||
# programs.ion.enable = true;
|
||||
# programs.java.enable = true;
|
||||
# programs.java.package = pkgs.jdk17;
|
||||
programs.jq.enable = true;
|
||||
# programs.k9s.enable = true;
|
||||
programs.lazygit.enable = true;
|
||||
programs.starship = import ./home-starship.nix pkgs;
|
||||
programs.tmux = import ./home-tmux.nix pkgs;
|
||||
programs.wezterm = import ./home-wezterm.nix;
|
||||
programs.zoxide.enable = true;
|
||||
programs.zsh = import ./home-zsh.nix pkgs;
|
||||
|
||||
# programs.neovim = import ./home-neovim.nix pkgs;
|
||||
|
||||
# programs.emacs = import ./home-emacs.nix;
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
permittedInsecurePackages = [
|
||||
"nodejs-16.20.2"
|
||||
];
|
||||
}
|
||||
@@ -1,93 +0,0 @@
|
||||
[ (import <rust-overlay>)
|
||||
(
|
||||
final: prev:
|
||||
{
|
||||
# vscode-langservers-extracted =
|
||||
# prev.buildNpmPackage rec {
|
||||
# pname = "vscode-langservers-extracted";
|
||||
# version = "4.8.0";
|
||||
|
||||
# src = prev.fetchFromGitHub {
|
||||
# owner = "hrsh7th";
|
||||
# repo = pname;
|
||||
# rev = "v${version}";
|
||||
# hash = "sha256-sGnxmEQ0J74zNbhRpsgF/cYoXwn4jh9yBVjk6UiUdK0=";
|
||||
# };
|
||||
|
||||
# npmDepsHash = "sha256-LFWC87Ahvjf2moijayFze1Jk0TmTc7rOUd/s489PHro=";
|
||||
|
||||
# buildPhase =
|
||||
# let
|
||||
# extensions =
|
||||
# if prev.stdenv.isDarwin
|
||||
# then "${prev.vscodium}/Applications/VSCodium.app/Contents/Resources/app/extensions"
|
||||
# else "${prev.vscodium}/lib/vscode/resources/app/extensions";
|
||||
# in
|
||||
# ''
|
||||
# npx babel ${extensions}/css-language-features/server/dist/node \
|
||||
# --out-dir lib/css-language-server/node/
|
||||
# npx babel ${extensions}/html-language-features/server/dist/node \
|
||||
# --out-dir lib/html-language-server/node/
|
||||
# npx babel ${extensions}/json-language-features/server/dist/node \
|
||||
# --out-dir lib/json-language-server/node/
|
||||
# npx babel ${extensions}/markdown-language-features/server/dist/node \
|
||||
# --out-dir lib/markdown-language-server/node/
|
||||
# cp -r ${prev.vscode-extensions.dbaeumer.vscode-eslint}/share/vscode/extensions/dbaeumer.vscode-eslint/server/out \
|
||||
# lib/eslint-language-server
|
||||
# mv lib/markdown-language-server/node/workerMain.js lib/markdown-language-server/node/main.js
|
||||
# '';
|
||||
# meta = with prev.lib; {
|
||||
# description = "HTML/CSS/JSON/ESLint language servers extracted from vscode";
|
||||
# homepage = "https://github.com/hrsh7th/vscode-langservers-extracted";
|
||||
# license = licenses.mit;
|
||||
# maintainers = with maintainers; [ lord-valen ];
|
||||
# };
|
||||
# };
|
||||
}
|
||||
)
|
||||
# (
|
||||
# final: prev:
|
||||
# {
|
||||
# helix = prev.rustPlatform.buildRustPackage rec {
|
||||
# pname = "helix";
|
||||
# version = "master";
|
||||
|
||||
# # This release tarball includes source code for the tree-sitter grammars,
|
||||
# # which is not ordinarily part of the repository.
|
||||
# src = prev.fetchzip {
|
||||
# # url = "https://github.com/helix-editor/helix/releases/download/${version}/helix-${version}-source.tar.xz";
|
||||
# url = "https://github.com/helix-editor/helix/archive/109f53fb60f1b126c4c9afd97dd75972725d04ac.zip";
|
||||
# hash = "sha256-WzxaZ+X5HGen81EWVi0dirMzH4xSh4hV1flXSLl0P1k=";
|
||||
# stripRoot = false;
|
||||
# };
|
||||
|
||||
# cargoHash = "sha256-THzPUVcmboVJHu3rJ6rev3GrkNilZRMlitCx7M1+HBE=";
|
||||
|
||||
# nativeBuildInputs = [ prev.git prev.installShellFiles prev.makeWrapper ];
|
||||
|
||||
# postInstall = ''
|
||||
# # not needed at runtime
|
||||
# rm -r runtime/grammars/sources
|
||||
|
||||
# mkdir -p $out/lib
|
||||
# cp -r runtime $out/lib
|
||||
# installShellCompletion contrib/completion/hx.{bash,fish,zsh}
|
||||
# mkdir -p $out/share/{applications,icons/hicolor/256x256/apps}
|
||||
# cp contrib/Helix.desktop $out/share/applications
|
||||
# cp contrib/helix.png $out/share/icons/hicolor/256x256/apps
|
||||
# '';
|
||||
# postFixup = ''
|
||||
# wrapProgram $out/bin/hx --set HELIX_RUNTIME $out/lib/runtime
|
||||
# '';
|
||||
|
||||
# meta = with prev.lib; {
|
||||
# description = "A post-modern modal text editor";
|
||||
# homepage = "https://helix-editor.com";
|
||||
# license = licenses.mpl20;
|
||||
# mainProgram = "hx";
|
||||
# maintainers = with prev.maintainers; [ danth yusdacra zowoq ];
|
||||
# };
|
||||
# };
|
||||
# }
|
||||
# )
|
||||
]
|
||||
@@ -1,9 +0,0 @@
|
||||
tt.*
|
||||
.tests
|
||||
doc/tags
|
||||
debug
|
||||
.repro
|
||||
foo.*
|
||||
*.log
|
||||
data
|
||||
lazy-lock.json
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"neodev": {
|
||||
"library": {
|
||||
"enabled": true,
|
||||
"plugins": true
|
||||
}
|
||||
},
|
||||
"neoconf": {
|
||||
"plugins": {
|
||||
"lua_ls": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,201 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -1,4 +0,0 @@
|
||||
# 💤 LazyVim
|
||||
|
||||
A starter template for [LazyVim](https://github.com/LazyVim/LazyVim).
|
||||
Refer to the [documentation](https://lazyvim.github.io/installation) to get started.
|
||||
@@ -1,2 +0,0 @@
|
||||
-- bootstrap lazy.nvim, LazyVim and your plugins
|
||||
require("config.lazy")
|
||||
@@ -1,3 +0,0 @@
|
||||
-- Autocmds are automatically loaded on the VeryLazy event
|
||||
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||
-- Add any additional autocmds here
|
||||
@@ -1,4 +0,0 @@
|
||||
-- Keymaps are automatically loaded on the VeryLazy event
|
||||
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||
-- Add any additional keymaps here
|
||||
-- vim.keymap.set("n", "<leader>w", "<cmd>w<cr>", { desc = "Write file"})
|
||||
@@ -1,52 +0,0 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
-- bootstrap lazy.nvim
|
||||
-- stylua: ignore
|
||||
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
|
||||
end
|
||||
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- add LazyVim and import its plugins
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
-- import any extras modules here
|
||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
{ import = "lazyvim.plugins.extras.lang.java" },
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
{ import = "lazyvim.plugins.extras.lang.python" },
|
||||
{ import = "lazyvim.plugins.extras.lang.rust" },
|
||||
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
|
||||
{ import = "lazyvim.plugins.extras.dap.core" },
|
||||
{ import = "lazyvim.plugins.extras.linting.eslint" },
|
||||
-- { import = "lazyvim.plugins.extras.editor.flash" },
|
||||
-- import/override with your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
defaults = {
|
||||
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
||||
lazy = false,
|
||||
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
||||
-- have outdated releases, which may break your Neovim install.
|
||||
version = false, -- always use the latest git commit
|
||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||
},
|
||||
install = { colorscheme = { "catppuccin" } },
|
||||
checker = { enabled = false }, -- automatically check for plugin updates
|
||||
performance = {
|
||||
rtp = {
|
||||
-- disable some rtp plugins
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
-- "matchit",
|
||||
-- "matchparen",
|
||||
-- "netrwPlugin",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"tutor",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -1,14 +0,0 @@
|
||||
-- Options are automatically loaded before lazy.nvim startup
|
||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||
-- Add any additional options here
|
||||
|
||||
local opt = vim.opt
|
||||
opt.autowriteall = true
|
||||
opt.colorcolumn = "100"
|
||||
-- opt.hidden = false
|
||||
opt.tabstop = 4
|
||||
opt.sidescrolloff = 0
|
||||
opt.shiftwidth = 4
|
||||
opt.relativenumber = false
|
||||
|
||||
vim.g.autoformat = false
|
||||
@@ -1,45 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "catppuccin",
|
||||
},
|
||||
},
|
||||
{ "catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
opts = {
|
||||
flavour = "frappe",
|
||||
-- custom_highlights = function(colors)
|
||||
-- return {
|
||||
-- ["@type.qualifier"] = { link = "StorageClass" },
|
||||
-- ["@lsp.typemod.annotation"] = { link = "@attribute" },
|
||||
-- ["@lsp.type.interface"] = { link = "Structure" },
|
||||
-- ["@lsp.type.method"] = {},
|
||||
-- ["StorageClass"] = { fg = colors.mauve },
|
||||
-- ["@parameter"] = { fg = colors.text },
|
||||
-- ["@property"] = { fg = colors.maroon },
|
||||
-- ["@field"] = { fg = colors.maroon },
|
||||
-- ["Function"] = { fg = colors.text },
|
||||
-- ["Type"] = { fg = colors.text },
|
||||
-- ["Structure"] = { fg = colors.text },
|
||||
-- ["@method"] = { fg = colors.yellow },
|
||||
-- }
|
||||
-- end,
|
||||
custom_highlights = function(colors)
|
||||
return {
|
||||
["@type.qualifier"] = { link = "StorageClass" },
|
||||
["@parameter"] = { fg = colors.text },
|
||||
["@field"] = { fg = colors.maroon },
|
||||
["@lsp.type.interface"] = { link = "Structure" },
|
||||
["StorageClass"] = { fg = colors.mauve },
|
||||
}
|
||||
end,
|
||||
},
|
||||
},
|
||||
-- { "ellisonleao/gruvbox.nvim" },
|
||||
-- {"rktjmp/lush.nvim" },
|
||||
-- {"briones-gabriel/darcula-solid.nvim",
|
||||
-- depends = {"rktjmp/lush.nvim" },
|
||||
-- },
|
||||
-- { "doums/darcula" },
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
return {
|
||||
{ "jay-babu/mason-nvim-dap.nvim", tag = "v2.0.1" },
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
-- dependencies = {
|
||||
-- { "mfussenegger/nvim-jdtls" },
|
||||
-- },
|
||||
opts = {
|
||||
servers = {
|
||||
eslint = {
|
||||
mason = false,
|
||||
},
|
||||
hls = {
|
||||
mason = false,
|
||||
},
|
||||
jdtls = {
|
||||
mason = false,
|
||||
},
|
||||
tsserver = {
|
||||
mason = false,
|
||||
}
|
||||
}
|
||||
-- autoformat = false,
|
||||
-- servers = {
|
||||
-- jdtls = {},
|
||||
-- },
|
||||
-- setup = {
|
||||
-- jdtls = function(_, opts)
|
||||
-- vim.api.nvim_create_autocmd("Filetype", {
|
||||
-- pattern = "java", -- autocmd to start jdtls
|
||||
-- callback = function()
|
||||
-- -- use this function notation to build some variables
|
||||
-- local root_markers = { ".git", "mvnw", "gradlew", "pom.xml", "build.gradle" }
|
||||
-- local root_dir = require("jdtls.setup").find_root(root_markers)
|
||||
--
|
||||
-- -- calculate workspace dir
|
||||
-- local project_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":p:h:t")
|
||||
-- local workspace_dir = vim.fn.stdpath("data") .. "/site/java/workspace-root/" .. project_name
|
||||
-- -- os.execute("mkdir " .. workspace_dir)
|
||||
--
|
||||
-- -- get the mason install path
|
||||
-- local install_path = require("mason-registry").get_package("jdtls"):get_install_path()
|
||||
-- local debug_install_path = require("mason-registry").get_package("java-debug-adapter"):get_install_path()
|
||||
-- local test_install_path = require("mason-registry").get_package("java-test"):get_install_path()
|
||||
--
|
||||
-- -- get the current OS
|
||||
-- local os
|
||||
-- if vim.fn.has("macunix") then
|
||||
-- os = "mac"
|
||||
-- elseif vim.fn.has("win32") then
|
||||
-- os = "win"
|
||||
-- else
|
||||
-- os = "linux"
|
||||
-- end
|
||||
--
|
||||
-- -- return the server config
|
||||
-- local config = {
|
||||
-- cmd = {
|
||||
-- "java",
|
||||
-- "-Declipse.application=org.eclipse.jdt.ls.core.id1",
|
||||
-- "-Dosgi.bundles.defaultStartLevel=4",
|
||||
-- "-Declipse.product=org.eclipse.jdt.ls.core.product",
|
||||
-- "-Dlog.protocol=true",
|
||||
-- "-Dlog.level=ALL",
|
||||
-- -- "-javaagent:" .. install_path .. "/lombok.jar",
|
||||
-- "-Xms1g",
|
||||
-- "--add-modules=ALL-SYSTEM",
|
||||
-- "--add-opens",
|
||||
-- "java.base/java.util=ALL-UNNAMED",
|
||||
-- "--add-opens",
|
||||
-- "java.base/java.lang=ALL-UNNAMED",
|
||||
-- "-jar",
|
||||
-- vim.fn.glob(install_path .. "/plugins/org.eclipse.equinox.launcher_*.jar"),
|
||||
-- "-configuration",
|
||||
-- install_path .. "/config_" .. os,
|
||||
-- "-data",
|
||||
-- workspace_dir,
|
||||
-- },
|
||||
-- root_dir = root_dir,
|
||||
-- settings = {
|
||||
-- java = {
|
||||
-- referencesCodeLens = {
|
||||
-- enabled = false,
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- init_options = {
|
||||
-- bundles = vim.list_extend({
|
||||
-- vim.fn.glob(debug_install_path .. "/extension/server/com.microsoft.java.debug.plugin-*.jar", true),
|
||||
-- }, vim.split(vim.fn.glob(test_install_path .. "/extension/server/*.jar", true), "\n")),
|
||||
-- },
|
||||
-- ["on_attach"] = function(client, bufnr)
|
||||
-- require("jdtls").setup_dap()
|
||||
-- require("jdtls.setup").add_commands()
|
||||
-- vim.keymap.set("n", "<leader>cc", function() require('jdtls').compile() end, {buffer = bufnr, desc = "Java Errors"})
|
||||
-- end,
|
||||
-- }
|
||||
-- require("jdtls").start_or_attach(config)
|
||||
-- end,
|
||||
-- })
|
||||
-- return true
|
||||
-- end,
|
||||
-- },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,166 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"nvimdev/dashboard-nvim",
|
||||
enabled = false,
|
||||
},
|
||||
{
|
||||
"stevearc/dressing.nvim",
|
||||
enabled = false,
|
||||
},
|
||||
{
|
||||
"akinsho/bufferline.nvim",
|
||||
enabled = false,
|
||||
},
|
||||
{
|
||||
"SmiteshP/nvim-navic",
|
||||
enabled = false,
|
||||
},
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
keys = {
|
||||
{
|
||||
"<leader>cS",
|
||||
"<cmd>Trouble lsp toggle focus=false win.position=right win.size=103<cr>",
|
||||
desc = "LSP references/definitions/... (Trouble)",
|
||||
},
|
||||
},
|
||||
},
|
||||
-- {
|
||||
-- "folke/todo-comments.nvim",
|
||||
-- enabled = false,
|
||||
-- },
|
||||
{
|
||||
"nvim-pack/nvim-spectre",
|
||||
enabled = false,
|
||||
},
|
||||
{
|
||||
"persistence.nvim",
|
||||
enabled = false,
|
||||
},
|
||||
-- {
|
||||
-- "L3MON4D3/LuaSnip",
|
||||
-- enabled = false,
|
||||
-- },
|
||||
-- {
|
||||
-- "rafamadriz/friendly-snippets",
|
||||
-- enabled = false,
|
||||
-- },
|
||||
-- {
|
||||
-- "ggandor/leap-spooky.nvim",
|
||||
-- enabled = true,
|
||||
-- opts = {
|
||||
-- paste_on_remote_yank = true,
|
||||
-- },
|
||||
-- },
|
||||
-- {
|
||||
-- "ggandor/flit.nvim",
|
||||
-- enabled = false,
|
||||
-- },
|
||||
{
|
||||
"folke/noice.nvim",
|
||||
enabled = false,
|
||||
opts = {
|
||||
cmdline = {
|
||||
view = "cmdline",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/flash.nvim",
|
||||
opts = {
|
||||
modes = {
|
||||
search = {
|
||||
enabled = false,
|
||||
},
|
||||
char = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"echasnovski/mini.pairs",
|
||||
enabled = false,
|
||||
},
|
||||
-- {
|
||||
-- "echasnovski/mini.indentscope",
|
||||
-- opts = {
|
||||
-- draw = {
|
||||
-- animation = require("mini.indentscope").gen_animation.none(),
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
opts = function(_, opts)
|
||||
local cmp = require("cmp")
|
||||
opts.sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
})
|
||||
return opts
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
opts = function(opts)
|
||||
local actions = require("telescope.actions")
|
||||
opts.defaults = {
|
||||
mappings = {
|
||||
i = {
|
||||
["<esc>"] = actions.close,
|
||||
},
|
||||
},
|
||||
path_display = { "shorten" },
|
||||
pickers = {
|
||||
buffers = {
|
||||
mappings = {
|
||||
i = {
|
||||
["<c-d>"] = actions.delete_buffer,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
return opts
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, { "sql" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
opts = {
|
||||
integrations = {
|
||||
alpha = false,
|
||||
navic = false,
|
||||
-- lsp_trouble = false,
|
||||
-- trouble = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
-- {
|
||||
-- "jackMort/ChatGPT.nvim",
|
||||
-- event = "VeryLazy",
|
||||
-- config = function()
|
||||
-- require("chatgpt").setup({
|
||||
-- show_quickfixes_cmd = "cope",
|
||||
-- edit_with_instructions = {
|
||||
-- keymaps = {
|
||||
-- use_output_as_input = "<C-r>",
|
||||
-- },
|
||||
-- },
|
||||
-- })
|
||||
-- end,
|
||||
-- dependencies = {
|
||||
-- "MunifTanjim/nui.nvim",
|
||||
-- "nvim-lua/plenary.nvim",
|
||||
-- "nvim-telescope/telescope.nvim"
|
||||
-- },
|
||||
-- },
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
column_width = 120
|
||||
Generated
+141
@@ -0,0 +1,141 @@
|
||||
{
|
||||
"nodes": {
|
||||
"claude-code": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1789074092,
|
||||
"narHash": "sha256-QCXTUbd4FuwOHO7LgJws78YTRcco4xgR8RoYgKLvd9w=",
|
||||
"owner": "sadjow",
|
||||
"repo": "claude-code-nix",
|
||||
"rev": "1f88b393ac054378c393f914dc83d08a6ef5daeb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "sadjow",
|
||||
"repo": "claude-code-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1788450739,
|
||||
"narHash": "sha256-glZLQlzIn1fXH6PazR2iUmTo7kzzyYSshrWhLS9TqCU=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "31729ca8cbdb4fa927b34e5f4353e6a83f39e993",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1789267039,
|
||||
"narHash": "sha256-LWiBv9yAYFi2LPbUhDGHPGKYskJQjj2fw12OlyO1uQo=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "ec172013fa62135f58fb58dd17ae9651e8f39727",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-26.05",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-index-database": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1788680125,
|
||||
"narHash": "sha256-amGSoDobwmp4CFvCn841ws2iuitus+HUJdD/gKgsrJA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-index-database",
|
||||
"rev": "116ad1c2adb642405ef8916f6a94c8626f971344",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-index-database",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1789009968,
|
||||
"narHash": "sha256-GB16oaxpsrnGNnGIE+0uYBqMRzB9X6FYDUvjvnJAYew=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d58a46e3bc02d91ebe04667f8397752a749c0024",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-26.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1788057806,
|
||||
"narHash": "sha256-DTQSMxzDWmT0zhguthvegnVkn7CFqGCv4IHCzk5ZUpM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "596e2e3940e09b2abbeb03f75fa1828c57fcd72c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"claude-code": "claude-code",
|
||||
"flake-parts": "flake-parts",
|
||||
"home-manager": "home-manager",
|
||||
"nix-index-database": "nix-index-database",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
{
|
||||
description = "Home Manager configuration of Joe Frikker";
|
||||
|
||||
inputs = {
|
||||
# Specify the source of Home Manager and Nixpkgs.
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05";
|
||||
claude-code = {
|
||||
url = "github:sadjow/claude-code-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-26.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
# kube = {
|
||||
# url = "https://gitea.home-frikker.dedyn.io/jfrikker/kube/archive/1.0.1.tar.gz";
|
||||
# inputs.nixpkgs.follows = "nixpkgs";
|
||||
# };
|
||||
|
||||
nix-index-database = {
|
||||
url = "github:nix-community/nix-index-database";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs@{
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-parts,
|
||||
home-manager,
|
||||
claude-code,
|
||||
nix-index-database,
|
||||
...
|
||||
}:
|
||||
let
|
||||
pkgs-for-system =
|
||||
system:
|
||||
import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
overlays = [
|
||||
claude-code.overlays.default
|
||||
];
|
||||
};
|
||||
in
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
imports = [
|
||||
inputs.home-manager.flakeModules.home-manager
|
||||
];
|
||||
flake = {
|
||||
homeModules.jfrikker = import ./modules/home;
|
||||
|
||||
homeConfigurations.redbook = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = pkgs-for-system "aarch64-darwin";
|
||||
modules = [
|
||||
nix-index-database.homeModules.default
|
||||
self.homeModules.jfrikker
|
||||
(import ./home/redbook.nix)
|
||||
];
|
||||
};
|
||||
|
||||
homeConfigurations.home = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = pkgs-for-system "x86_64-linux";
|
||||
modules = [
|
||||
nix-index-database.homeModules.default
|
||||
self.homeModules.jfrikker
|
||||
(import ./home/home.nix)
|
||||
];
|
||||
};
|
||||
|
||||
homeConfigurations.home-laptop = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = pkgs-for-system "x86_64-linux";
|
||||
|
||||
modules = [
|
||||
nix-index-database.homeModules.default
|
||||
self.homeModules.jfrikker
|
||||
(import ./home/home-laptop.nix)
|
||||
];
|
||||
# extraSpecialArgs = { kube = kube.packages.x86_64-linux.default; };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{ pkgs, ... }: {
|
||||
home.stateVersion = "22.05";
|
||||
home.username = "jfrikker";
|
||||
home.homeDirectory = "/home/jfrikker";
|
||||
# home.packages = [ pkgs.pinentry ];
|
||||
jfrikker.enable = true;
|
||||
jfrikker.desktop.enable = true;
|
||||
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
font-family = "Iosevka Term Extended";
|
||||
font-size = 10;
|
||||
};
|
||||
};
|
||||
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
font = "Iosevka Term:size=10:width=expanded";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
enable = true;
|
||||
package = pkgs.vanilla-dmz;
|
||||
name = "Vanilla-DMZ";
|
||||
sway.enable = true;
|
||||
gtk.enable = true;
|
||||
};
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
config.modifier = "Mod4";
|
||||
# config.terminal = "${pkgs.ghostty}/bin/ghostty";
|
||||
config.input = {
|
||||
"1452:628:bcm5974" = {
|
||||
scroll_factor = "0.4";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.emacs.package = pkgs.emacs-pgtk;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
home.stateVersion = "22.05";
|
||||
home.username = "jfrikker";
|
||||
home.homeDirectory = "/home/jfrikker";
|
||||
jfrikker.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{ pkgs, ... }: {
|
||||
home.stateVersion = "22.05";
|
||||
home.username = "jfrikker";
|
||||
home.homeDirectory = "/Users/jfrikker";
|
||||
home.packages = [ pkgs.pinentry_mac ];
|
||||
jfrikker.enable = true;
|
||||
jfrikker.desktop.enable = true;
|
||||
jfrikker.redbook.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,275 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib)
|
||||
mkIf
|
||||
mkMerge
|
||||
;
|
||||
cfg = config.jfrikker;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./emacs.nix
|
||||
./helix.nix
|
||||
./starship.nix
|
||||
./tmux.nix
|
||||
];
|
||||
|
||||
options.jfrikker = {
|
||||
enable = lib.mkEnableOption "Joe Frikker's configuration";
|
||||
desktop.enable = lib.mkEnableOption "Desktop (GUI) applications";
|
||||
redbook.enable = lib.mkEnableOption "Redbook-specific configuration";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
age-plugin-yubikey
|
||||
dust
|
||||
fd
|
||||
ledger
|
||||
magic-wormhole
|
||||
nil
|
||||
nixfmt
|
||||
openssh
|
||||
rage
|
||||
ripgrep
|
||||
rlwrap
|
||||
(sbcl.withPackages (
|
||||
ps: with ps; [
|
||||
alexandria
|
||||
cl-markup
|
||||
cl-mock
|
||||
clack
|
||||
clack-handler-woo
|
||||
dbi
|
||||
defstar
|
||||
dexador
|
||||
fare-csv
|
||||
group-by
|
||||
lack-request
|
||||
lack-response
|
||||
local-time
|
||||
log4cl
|
||||
mito
|
||||
myway
|
||||
prove
|
||||
prove-asdf
|
||||
replic
|
||||
serapeum
|
||||
shasht
|
||||
slynk
|
||||
smug
|
||||
split-sequence
|
||||
str
|
||||
sxql-composer
|
||||
trivia
|
||||
trivial-mmap
|
||||
trivial-ws
|
||||
trivial-open-browser
|
||||
trivial-timeout
|
||||
uuid
|
||||
]
|
||||
))
|
||||
tokei
|
||||
xh
|
||||
yubikey-manager
|
||||
];
|
||||
|
||||
programs = {
|
||||
bash.enable = true;
|
||||
gh.enable = true;
|
||||
home-manager.enable = true;
|
||||
jq.enable = true;
|
||||
lazygit.enable = true;
|
||||
nix-index.enable = true;
|
||||
nix-index-database.comma.enable = true;
|
||||
zoxide.enable = true;
|
||||
|
||||
bat = {
|
||||
enable = true;
|
||||
config.style = "numbers";
|
||||
config.theme = "catppuccin-frappe";
|
||||
themes = {
|
||||
catppuccin-frappe = {
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "sublime-text"; # Bat uses sublime syntax for its themes
|
||||
rev = "3d8625d937d89869476e94bc100192aa220ce44a";
|
||||
sha256 = "3ABUsfJpb6RO6AiuuSL5gwDofJIwC5tlEMzBrlY9/s0=";
|
||||
};
|
||||
file = "Frappe.tmTheme";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
claude-code = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
eza = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
icons = "auto";
|
||||
};
|
||||
|
||||
fzf = {
|
||||
defaultCommand = "fd --type f";
|
||||
fileWidgetCommand = "fd --type f";
|
||||
fileWidgetOptions = [
|
||||
"--preview"
|
||||
"'bat --color=always --style=numbers --line-range=:500 {}'"
|
||||
];
|
||||
changeDirWidgetCommand = "fd --type d";
|
||||
tmux.enableShellIntegration = true;
|
||||
};
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
settings.user.name = "Joe Frikker";
|
||||
settings.user.email = "joe@redbookcattle.com";
|
||||
settings.github.user = "joe@redbookcattle.com";
|
||||
settings.merge.conflictstyle = "zdiff3";
|
||||
};
|
||||
|
||||
nh = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
delta = {
|
||||
enable = true;
|
||||
enableGitIntegration = true;
|
||||
};
|
||||
|
||||
zsh = {
|
||||
enable = true;
|
||||
oh-my-zsh.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
autosuggestion.enable = true;
|
||||
historySubstringSearch.enable = true;
|
||||
history.share = false;
|
||||
cdpath = [ "~/source" ];
|
||||
plugins = [
|
||||
{
|
||||
name = "zsh-nix-shell";
|
||||
file = "nix-shell.plugin.zsh";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "chisui";
|
||||
repo = "zsh-nix-shell";
|
||||
rev = "v0.7.0";
|
||||
sha256 = "149zh2rm59blr2q458a5irkfh82y3dwdich60s9670kl3cl5h2m1";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
xdg = {
|
||||
enable = false;
|
||||
# configFile."lazygit/config.yml" = {
|
||||
# enable = true;
|
||||
# source = pkgs.fetchFromGitHub
|
||||
# {
|
||||
# owner = "catppuccin";
|
||||
# repo = "lazygit";
|
||||
# rev = "b2ecb6d41b6f54a82104879573c538e8bdaeb0bf"; # Replace with the latest commit hash
|
||||
# sha256 = "9BBmWRcjNaJE9T0RKVEJaSnkrbMom0CLYE8PzAT6yFw=";
|
||||
# } + /themes/frappe.yml;
|
||||
# };
|
||||
};
|
||||
}
|
||||
(mkIf cfg.desktop.enable {
|
||||
home.packages = with pkgs; [
|
||||
google-chrome
|
||||
nerd-fonts.jetbrains-mono
|
||||
nerd-fonts.symbols-only
|
||||
(iosevka-bin.override { variant = "Aile"; })
|
||||
(iosevka-bin.override { variant = "Etoile"; })
|
||||
(iosevka-bin.override { variant = "SGr-IosevkaTermSS14"; })
|
||||
nerd-fonts.symbols-only
|
||||
keymapp
|
||||
proton-pass
|
||||
wireshark
|
||||
];
|
||||
|
||||
programs = {
|
||||
ghostty = {
|
||||
enable = false;
|
||||
package = pkgs.ghostty-bin;
|
||||
settings = {
|
||||
adjust-cell-height = "15%";
|
||||
font-family = "Iosevka Term SS14";
|
||||
font-size = 13;
|
||||
theme = "Catppuccin Frappe";
|
||||
};
|
||||
};
|
||||
|
||||
kitty = {
|
||||
enable = true;
|
||||
font = {
|
||||
name = "Iosevka Term SS14";
|
||||
package = pkgs.iosevka-bin.override { variant = "SGr-IosevkaTermSS14"; };
|
||||
size = 13;
|
||||
};
|
||||
themeFile = "Catppuccin-Frappe";
|
||||
keybindings = {
|
||||
"ctrl+1" = "goto_tab 1";
|
||||
"ctrl+2" = "goto_tab 2";
|
||||
"ctrl+3" = "goto_tab 3";
|
||||
"ctrl+4" = "goto_tab 4";
|
||||
"ctrl+5" = "goto_tab 5";
|
||||
"ctrl+6" = "goto_tab 6";
|
||||
"ctrl+7" = "goto_tab 7";
|
||||
"ctrl+8" = "goto_tab 8";
|
||||
"ctrl+9" = "goto_tab 9";
|
||||
};
|
||||
};
|
||||
|
||||
wezterm = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
local config = {}
|
||||
config.default_prog = { '${pkgs.zsh}/bin/zsh', '-l'}
|
||||
config.font_size = ${if pkgs.stdenv.isDarwin then "13.0" else "10.0"}
|
||||
''
|
||||
+ builtins.readFile ./wezterm.lua;
|
||||
};
|
||||
};
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
})
|
||||
(mkIf (cfg.redbook.enable && cfg.desktop.enable) {
|
||||
home.packages = with pkgs; [
|
||||
linear
|
||||
notion-app
|
||||
(slack.overrideAttrs {
|
||||
version = "4.50.143";
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://downloads.slack-edge.com/desktop-releases/mac/arm64/4.50.143/Slack-4.50.143-macOS.dmg";
|
||||
hash = "sha256-f5oYi8NPKXWpDcowFYMUjptbQs4V9hK2bm1TuaQeJn0=";
|
||||
};
|
||||
})
|
||||
teams
|
||||
];
|
||||
})
|
||||
(mkIf (cfg.redbook.enable && cfg.desktop.enable) {
|
||||
programs.emacs = {
|
||||
extraPackages =
|
||||
epkgs: with epkgs; [
|
||||
slack
|
||||
ox-slack
|
||||
];
|
||||
extraConfig = builtins.readFile ./slack.el;
|
||||
};
|
||||
})
|
||||
]);
|
||||
}
|
||||
@@ -0,0 +1,908 @@
|
||||
(setq use-package-always-defer t)
|
||||
|
||||
(use-package emacs
|
||||
:defer nil
|
||||
:config
|
||||
(setq-default fill-column 120)
|
||||
(setq-default tab-width 4))
|
||||
|
||||
(use-package simple
|
||||
:config
|
||||
(setq-default indent-tabs-mode nil))
|
||||
|
||||
(setopt save-interprogram-paste-before-kill t)
|
||||
(setopt enable-recursive-minibuffers t)
|
||||
(setopt line-spacing 0.15)
|
||||
|
||||
(setopt mouse-wheel-tilt-scroll t)
|
||||
(setq-default truncate-lines t)
|
||||
|
||||
(setopt tab-bar-show nil)
|
||||
(tab-bar-mode)
|
||||
|
||||
(setopt inhibit-startup-screen t)
|
||||
(setopt initial-scratch-message nil)
|
||||
|
||||
(menu-bar-mode -1)
|
||||
(scroll-bar-mode -1)
|
||||
(tool-bar-mode -1)
|
||||
|
||||
(setopt make-backup-files nil)
|
||||
(setopt create-lockfiles nil)
|
||||
(setopt auto-save-default nil)
|
||||
|
||||
(setopt view-read-only t)
|
||||
|
||||
(setopt sentence-end-double-space nil)
|
||||
|
||||
(setopt kill-whole-line t)
|
||||
|
||||
(column-number-mode t)
|
||||
|
||||
(setopt dired-auto-revert-buffer t)
|
||||
|
||||
(global-hl-line-mode)
|
||||
|
||||
(setopt tab-always-indent 'complete)
|
||||
|
||||
(setq-default cursor-type 'bar)
|
||||
|
||||
(repeat-mode)
|
||||
|
||||
(savehist-mode)
|
||||
|
||||
(require 'bind-key)
|
||||
(unbind-key "C-x RET")
|
||||
(unbind-key "C-x #")
|
||||
(unbind-key "C-x 5")
|
||||
(unbind-key "C-x 6")
|
||||
(unbind-key "C-x \\")
|
||||
(unbind-key "C-x `")
|
||||
(unbind-key "C-x m")
|
||||
(unbind-key "C-x l")
|
||||
(unbind-key "C-x i")
|
||||
(unbind-key "C-x u")
|
||||
(unbind-key "C-x @")
|
||||
(unbind-key "C-x C-b")
|
||||
(unbind-key "C-x C-d")
|
||||
(unbind-key "C-x C-l")
|
||||
(unbind-key "C-x C-p")
|
||||
(unbind-key "C-x C-u")
|
||||
(unbind-key "C-x C-z")
|
||||
|
||||
(setopt doom-modeline-irc nil)
|
||||
(setopt doom-modeline-workspace-name nil)
|
||||
(setopt doom-modeline-buffer-encoding nil)
|
||||
(setopt doom-modeline-vcs-max-length 30)
|
||||
(doom-modeline-mode)
|
||||
|
||||
(ligature-set-ligatures 'prog-mode
|
||||
'("--" "---" "==" "===" "!=" "!==" "=!="
|
||||
"=:=" "=/=" "<=" ">=" "&&" "&&&" "&=" "++" "+++" "***" ";;" "!!"
|
||||
"??" "???" "?:" "?." "?=" "<:" ":<" ":>" ">:" "<:<" "<>" "<<<" ">>>"
|
||||
"<<" ">>" "||" "-|" "_|_" "|-" "||-" "|=" "||=" "##" "###" "####"
|
||||
"#{" "#[" "]#" "#(" "#?" "#_" "#_(" "#:" "#!" "#=" "^=" "<$>" "<$"
|
||||
"$>" "<+>" "<+" "+>" "<*>" "<*" "*>" "</" "</>" "/>" "<!--" "<#--"
|
||||
"-->" "->" "->>" "<<-" "<-" "<=<" "=<<" "<<=" "<==" "<=>" "<==>"
|
||||
"==>" "=>" "=>>" ">=>" ">>=" ">>-" ">-" "-<" "-<<" ">->" "<-<" "<-|"
|
||||
"<=|" "|=>" "|->" "<->" "<~~" "<~" "<~>" "~~" "~~>" "~>" "~-" "-~"
|
||||
"~@" "[||]" "|]" "[|" "|}" "{|" "[<" ">]" "|>" "<|" "||>" "<||"
|
||||
"|||>" "<|||" "<|>" "..." ".." ".=" "..<" ".?" "::" ":::" ":=" "::="
|
||||
":?" ":?>" "//" "///" "/*" "*/" "/=" "//=" "/==" "@_" "__" "???"
|
||||
"<:<" ";;;"))
|
||||
(global-ligature-mode t)
|
||||
|
||||
(add-hook 'text-mode-hook 'mixed-pitch-mode)
|
||||
|
||||
(defun no-mixed-pitch ()
|
||||
(mixed-pitch-mode -1))
|
||||
|
||||
(add-hook 'yaml-ts-mode-hook 'no-mixed-pitch)
|
||||
(add-hook 'mhtml-mode 'no-mixed-pitch)
|
||||
(add-hook 'nxml-mode 'no-mixed-pitch)
|
||||
|
||||
(bind-keys ("M-o" . ace-window)
|
||||
("s-o" . ace-window)
|
||||
("C-c o" . ace-window))
|
||||
(setopt aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l))
|
||||
(setopt aw-dispatch-always t)
|
||||
|
||||
(bind-keys ("s-f" . project-find-file)
|
||||
("s-F" . project-switch-project)
|
||||
;; ("s-s" . persp-switch)
|
||||
)
|
||||
|
||||
(with-eval-after-load 'tab-bar
|
||||
(bind-keys :map tab-bar-mode-map
|
||||
("s-s" . tab-bar-switch-to-tab)))
|
||||
|
||||
(server-mode -1)
|
||||
|
||||
(setopt visible-bell t)
|
||||
|
||||
(transient-mark-mode -1)
|
||||
|
||||
(bind-keys :repeat-map tab-bar-repeat-map
|
||||
("<left>" . tab-bar-history-back)
|
||||
("<right>" . tab-bar-history-forward))
|
||||
|
||||
(tab-bar-history-mode)
|
||||
|
||||
(setopt compilation-scroll-output 'first-error)
|
||||
|
||||
(use-package minibuffer
|
||||
:bind (:map minibuffer-local-map
|
||||
("M-s" . consult-history)
|
||||
("M-r" . consult-history) )
|
||||
:custom
|
||||
(completion-styles '(orderless basic)))
|
||||
|
||||
(use-package xref
|
||||
:custom
|
||||
(xref-show-xrefs-function 'consult-xref)
|
||||
(xref-show-definitions-function 'consult-xref))
|
||||
|
||||
(use-package register
|
||||
:custom
|
||||
(register-preview-delay 0.5)
|
||||
:config
|
||||
(advice-add 'register-preview :override #'consult-register-window))
|
||||
|
||||
(use-package isearch
|
||||
:bind
|
||||
(:map isearch-mode-map
|
||||
("M-e" . consult-isearch-history)
|
||||
("M-s e" . consult-isearch-history)
|
||||
("M-s l" . consult-line)
|
||||
("M-s L" . consult-line-multi))
|
||||
:custom
|
||||
(isearch-wrap-pause 'no-ding))
|
||||
|
||||
(defun jf/window-children (window)
|
||||
(let ((result nil)
|
||||
(child (window-child window)))
|
||||
(while child
|
||||
(push child result)
|
||||
(setq child (window-next-sibling child)))
|
||||
(reverse result)))
|
||||
|
||||
(defun jf/window-main-root (&optional frame)
|
||||
"Return FRAME's main (non-side) window or window subtree."
|
||||
(let* ((root (frame-root-window (or frame (selected-frame))))
|
||||
(children (jf/window-children root)))
|
||||
(if (seq-some (lambda (w) (window-parameter w 'window-side)) children)
|
||||
(seq-find (lambda (w) (not (window-parameter w 'window-side))) children)
|
||||
root)))
|
||||
|
||||
(defun jf/window-leaves (window)
|
||||
"Return the live leaf windows in WINDOW's subtree."
|
||||
(if (window-live-p window)
|
||||
(list window)
|
||||
(mapcan #'jf/window-leaves (jf/window-children window))))
|
||||
|
||||
(defun jf/topright-window (windows)
|
||||
"Return whichever of WINDOWS sits furthest up, then furthest right."
|
||||
(car (sort (copy-sequence windows)
|
||||
(lambda (a b)
|
||||
(let ((top-a (nth 1 (window-edges a)))
|
||||
(top-b (nth 1 (window-edges b))))
|
||||
(if (= top-a top-b)
|
||||
(> (nth 0 (window-edges a)) (nth 0 (window-edges b)))
|
||||
(< top-a top-b)))))))
|
||||
|
||||
(defun jf/display-buffer-right (buffer alist)
|
||||
"Display BUFFER on the right of the main editing area.
|
||||
|
||||
Applies three rules, based on the shape of the frame's non-side windows:
|
||||
1. One window -> split it and show BUFFER in the new right window.
|
||||
2. Two windows side-by-side -> show BUFFER in the right one. If the
|
||||
right window is selected, swap the two windows first (keeping
|
||||
focus on the buffer that was active) so BUFFER doesn't evict it.
|
||||
3. Any other layout -> show BUFFER in the upper-rightmost window."
|
||||
(let ((main (jf/window-main-root)))
|
||||
(cond
|
||||
((window-live-p main)
|
||||
(let* ((new (split-window main nil 'right))
|
||||
(width (max 1 (- (frame-width) 120)))
|
||||
(delta (window-resizable new (- width (window-width new)) t)))
|
||||
(window-resize new delta t)
|
||||
(window--display-buffer buffer new 'window alist)))
|
||||
((and (window-left-child main)
|
||||
(= (length (jf/window-children main)) 2)
|
||||
(seq-every-p #'window-live-p (jf/window-children main)))
|
||||
(let* ((left (window-left-child main))
|
||||
(right (window-next-sibling left)))
|
||||
(when (eq (selected-window) right)
|
||||
(window-swap-states left right)
|
||||
(select-window left))
|
||||
(window--display-buffer buffer right 'reuse alist)))
|
||||
(t
|
||||
(window--display-buffer buffer (jf/topright-window (jf/window-leaves main)) 'reuse alist)))))
|
||||
|
||||
|
||||
(setopt popper-reference-buffers
|
||||
'("\\*Flymake diagnostics .*"
|
||||
"\\*Embark Export: .*"
|
||||
"\\*Embark Collect .*"
|
||||
"\\*xref\\*"
|
||||
"\\*compilation\\*"
|
||||
"\\*pnpm:.*"
|
||||
"\\*sly-mrepl *"
|
||||
"\\*lispy-message\\*"
|
||||
"\\*occur\\*"
|
||||
".*eshell\\*"
|
||||
"\\*SQL: .*"
|
||||
"magit-revision: .*"
|
||||
"\\*Help\\*"
|
||||
"\\*rustfmt\\*"
|
||||
"\\*slack: .*"
|
||||
"\\*forge: .*"
|
||||
"new-pullreq"
|
||||
"\\*claude:.*"
|
||||
"\\*Man .*"
|
||||
"\\*List .*"
|
||||
"\\*eldoc\\*"))
|
||||
(setopt popper-display-control nil)
|
||||
|
||||
(popper-mode)
|
||||
(popper-echo-mode)
|
||||
|
||||
(bind-keys ("C-q" . popper-toggle)
|
||||
("C-;" . popper-cycle))
|
||||
|
||||
(defvar jf/fullscreen-popup--param 'jf/fullscreen-saved-configuration
|
||||
"Key used to stash the window configuration a fullscreen popup replaced.
|
||||
Stored per-tab when `tab-bar-mode' is active, otherwise as a plain frame
|
||||
parameter; see `jf/tab-or-frame-parameter'.")
|
||||
|
||||
(defvar-local jf/fullscreen-popup-p nil
|
||||
"Non-nil in a buffer currently being displayed as a fullscreen popup.")
|
||||
|
||||
(defun jf/current-tab-cell (&optional frame)
|
||||
"Return FRAME's current tab's raw data cell, or nil without `tab-bar-mode'."
|
||||
(and (bound-and-true-p tab-bar-mode)
|
||||
(assq 'current-tab (tab-bar-tabs frame))))
|
||||
|
||||
(defun jf/tab-or-frame-parameter (parameter &optional frame)
|
||||
"Like `frame-parameter', but scoped to FRAME's selected tab when tabs are in use.
|
||||
|
||||
A plain frame parameter is shared by every tab on that frame, which is wrong
|
||||
for state like `jf/fullscreen-popup--param': switching tabs swaps in an
|
||||
entirely different window layout, so \"the layout to restore\" has to travel
|
||||
with the tab, not the frame."
|
||||
(if-let ((tab (jf/current-tab-cell frame)))
|
||||
(alist-get parameter tab)
|
||||
(frame-parameter frame parameter)))
|
||||
|
||||
(defun jf/set-tab-or-frame-parameter (parameter value &optional frame)
|
||||
"Set PARAMETER to VALUE, scoped like `jf/tab-or-frame-parameter'."
|
||||
(if-let ((tab (jf/current-tab-cell frame)))
|
||||
(let ((cell (assq parameter tab)))
|
||||
(if cell
|
||||
(setcdr cell value)
|
||||
(setcdr tab (cons (cons parameter value) (cdr tab)))))
|
||||
(set-frame-parameter frame parameter value)))
|
||||
|
||||
(defun jf/display-buffer-fullscreen (buffer alist)
|
||||
"Display BUFFER, deleting other windows, saving the prior layout.
|
||||
|
||||
Intended for use in `display-buffer-alist' for popups (e.g. Magit
|
||||
status/log) that should take over the frame while displayed, but
|
||||
restore the previous window configuration once closed via either
|
||||
`q' or `popper-toggle' -- both end up calling `quit-window', which
|
||||
is where the restore actually happens; see
|
||||
`jf/quit-window-restore-fullscreen'."
|
||||
(unless (jf/tab-or-frame-parameter jf/fullscreen-popup--param)
|
||||
(jf/set-tab-or-frame-parameter jf/fullscreen-popup--param
|
||||
(current-window-configuration)))
|
||||
(when-let ((window (or (display-buffer-reuse-window buffer alist)
|
||||
(display-buffer-same-window buffer alist)
|
||||
(display-buffer-pop-up-window buffer alist)
|
||||
(display-buffer-use-some-window buffer alist))))
|
||||
(let ((ignore-window-parameters t))
|
||||
(delete-other-windows window))
|
||||
(with-current-buffer buffer
|
||||
(setq jf/fullscreen-popup-p t))
|
||||
window))
|
||||
|
||||
(defun jf/quit-window-restore-fullscreen (orig-fn &optional kill window)
|
||||
"Restore the saved window configuration after quitting a fullscreen popup.
|
||||
|
||||
Advice around `quit-window' so both `q' (which Magit and other
|
||||
special-mode buffers bind to buffer-quitting commands that call
|
||||
`quit-window') and Popper's close/toggle commands (which also call
|
||||
`quit-window' directly) trigger the restore. Only restores once the
|
||||
last fullscreen popup on the tab (or frame, without `tab-bar-mode')
|
||||
has closed, so opening one fullscreen popup from within another
|
||||
falls back to the outer one first."
|
||||
(let* ((window (or window (selected-window)))
|
||||
(was-fullscreen (buffer-local-value 'jf/fullscreen-popup-p
|
||||
(window-buffer window)))
|
||||
(frame (window-frame window)))
|
||||
(funcall orig-fn kill window)
|
||||
(when (and was-fullscreen
|
||||
(not (and (window-live-p window)
|
||||
(buffer-local-value 'jf/fullscreen-popup-p
|
||||
(window-buffer window))))
|
||||
(jf/tab-or-frame-parameter jf/fullscreen-popup--param frame))
|
||||
(let ((conf (jf/tab-or-frame-parameter jf/fullscreen-popup--param frame)))
|
||||
(jf/set-tab-or-frame-parameter jf/fullscreen-popup--param nil frame)
|
||||
(set-window-configuration conf)))))
|
||||
|
||||
(advice-add 'quit-window :around #'jf/quit-window-restore-fullscreen)
|
||||
|
||||
(setopt split-width-threshold 200)
|
||||
(setopt split-height-threshold nil)
|
||||
(setopt display-buffer-base-action
|
||||
'((display-buffer-reuse-window
|
||||
display-buffer-reuse-mode-window
|
||||
display-buffer-use-some-window)))
|
||||
|
||||
(setq display-buffer-alist
|
||||
'(((or "\\*Flymake diagnostics .*"
|
||||
"\\*Embark Export: .*"
|
||||
"\\*Embark Collect .*"
|
||||
"\\*xref\\*"
|
||||
"\\*compilation\\*"
|
||||
"\\*pnpm:.*"
|
||||
"\\*sly-mrepl *"
|
||||
"\\*lispy-message\\*"
|
||||
"\\*occur\\*"
|
||||
".*eshell\\*"
|
||||
"\\*SQL: .*")
|
||||
(display-buffer-in-side-window)
|
||||
(side . bottom)
|
||||
(slot . 0)
|
||||
(window-height . 0.33))
|
||||
((or "magit: *"
|
||||
"magit-log*"
|
||||
"\\*Messages\\*"
|
||||
"\\*trace-output\\*"
|
||||
"\\*EGLOT connections\\*"
|
||||
"magit-revision: .*"
|
||||
"\\*Help\\*"
|
||||
"\\*rustfmt\\*"
|
||||
"\\*slack: .*"
|
||||
"\\*forge: .*"
|
||||
"new-pullreq"
|
||||
"\\*claude:.*"
|
||||
"\\*Man .*"
|
||||
"\\*List .*"
|
||||
"\\*Embark Actions\\*"
|
||||
"\\*eldoc\\*")
|
||||
(display-buffer-reuse-window
|
||||
display-buffer-reuse-mode-window
|
||||
jf/display-buffer-right))))
|
||||
|
||||
(setopt window-persistent-parameters
|
||||
(cl-list* '(no-delete-other-windows . writable)
|
||||
'(no-other-window . writable)
|
||||
window-persistent-parameters))
|
||||
|
||||
;; (setopt evil-want-keybinding nil)
|
||||
;; (require 'evil)
|
||||
;; (evil-mode 1)
|
||||
;; (require 'evil-collection)
|
||||
;; (evil-collection-init)
|
||||
|
||||
;; (require 'evil-org)
|
||||
;; (add-hook 'org-mode-hook 'evil-org-mode)
|
||||
;; (evil-org-set-key-theme '(navigation insert textobjects additional calendar))
|
||||
;; (require 'evil-org-agenda)
|
||||
;; (evil-org-agenda-set-keys)
|
||||
(use-package god-mode
|
||||
:bind (("<escape>" . (lambda () (interactive) (god-mode-all 1)))
|
||||
:map god-local-mode-map
|
||||
("i" . (lambda () (interactive) (god-mode-all -1)))
|
||||
("z" . repeat)))
|
||||
|
||||
(defun my-god-mode-update-cursor-type ()
|
||||
(setq cursor-type (cond
|
||||
((and (featurep 'org-present) org-present-mode) nil)
|
||||
((or (and (featurep 'god-mode) god-local-mode) buffer-read-only) 'box)
|
||||
(t 'bar))))
|
||||
(add-hook 'post-command-hook 'my-god-mode-update-cursor-type)
|
||||
|
||||
(use-package which-key
|
||||
:hook after-init
|
||||
:config
|
||||
(which-key-enable-god-mode-support))
|
||||
|
||||
(defun avy-goto-char-timer-embark ()
|
||||
(interactive)
|
||||
(require 'avy)
|
||||
(let ((avy-action-oneshot
|
||||
(lambda (pt)
|
||||
(unwind-protect
|
||||
(save-excursion
|
||||
(goto-char pt)
|
||||
(embark-act))
|
||||
(select-window
|
||||
(cdr (ring-ref avy-ring 0)))))))
|
||||
(avy-goto-char-timer)))
|
||||
|
||||
(bind-keys
|
||||
("M-j" . avy-goto-char-timer-embark))
|
||||
|
||||
(use-package avy
|
||||
:bind (("C-j" . avy-goto-char-timer)))
|
||||
|
||||
(use-package embark
|
||||
:bind (("C-." . embark-act)))
|
||||
|
||||
(defun string-inflection-rust-style-cycle-function (str)
|
||||
(cond
|
||||
((string-inflection-snake-case-p str)
|
||||
(string-inflection-upcase-function str))
|
||||
((string-inflection-upcase-p str)
|
||||
(string-inflection-pascal-case-function str))
|
||||
(t
|
||||
(string-inflection-snake-case-function str))))
|
||||
|
||||
(defun string-inflection-rust-style-cycle ()
|
||||
(interactive)
|
||||
(require 'string-inflection)
|
||||
(string-inflection--symbol-or-region #'string-inflection-rust-style-cycle-function))
|
||||
|
||||
(bind-keys :repeat-map string-inflection-java-map
|
||||
("u" . string-inflection-java-style-cycle))
|
||||
|
||||
(bind-keys :repeat-map string-inflection-rust-map
|
||||
("u" . string-inflection-rust-style-cycle))
|
||||
|
||||
(use-package edit-indirect
|
||||
:bind (("C-x 4 n" . edit-indirect-region)))
|
||||
|
||||
(use-package apheleia
|
||||
:config
|
||||
(push '(prisma-format "prisma" "format" "--schema" filepath) apheleia-formatters))
|
||||
|
||||
(use-package buffer-terminator
|
||||
:hook after-init)
|
||||
|
||||
(use-package elec-pair
|
||||
:hook (after-init . electric-pair-mode))
|
||||
|
||||
(use-package tree-sitter
|
||||
:hook (after-init . global-tree-sitter-mode))
|
||||
|
||||
(use-package ediff-wind
|
||||
:custom
|
||||
(ediff-split-window-function 'split-window-horizontally))
|
||||
|
||||
(defun project-nix-flake ()
|
||||
(interactive)
|
||||
(nix-flake (project-root (project-current t))))
|
||||
(bind-keys ("C-x p n" . project-nix-flake))
|
||||
|
||||
(use-package ansi-color
|
||||
:hook
|
||||
(compilation-filter . ansi-color-compilation-filter))
|
||||
|
||||
(use-package display-fill-column-indicator
|
||||
:hook (prog-mode))
|
||||
|
||||
(use-package prog-mode
|
||||
:bind (:map prog-mode-map
|
||||
("C-c D" . flymake-show-project-diagnostics)
|
||||
("M-n" . flymake-goto-next-error)
|
||||
("M-p" . flymake-goto-prev-error))
|
||||
:config
|
||||
(defun my-prog-fill-reindent-defun (&optional argument)
|
||||
"Refill or reindent the paragraph or defun that contains point.
|
||||
|
||||
If the point is in a string or a comment, fill the paragraph that
|
||||
contains point or follows point.
|
||||
|
||||
Otherwise, reindent the function definition that contains point
|
||||
or follows point."
|
||||
(interactive "P")
|
||||
(save-excursion
|
||||
(let ((treesit-text-node
|
||||
(and (treesit-available-p)
|
||||
(treesit-parser-list)
|
||||
(treesit-node-match-p
|
||||
(treesit-node-at (point)) 'text t))))
|
||||
(if (or treesit-text-node
|
||||
(and (not (and (treesit-available-p) (treesit-parser-list))) (nth 8 (syntax-ppss)))
|
||||
(re-search-forward "\\s-*\\s<" (line-end-position) t))
|
||||
(fill-paragraph argument (region-active-p))
|
||||
(beginning-of-defun)
|
||||
(let ((start (point)))
|
||||
(end-of-defun)
|
||||
(indent-region start (point) nil))))))
|
||||
|
||||
(advice-add 'prog-fill-reindent-defun :override #'my-prog-fill-reindent-defun))
|
||||
|
||||
(use-package flymake
|
||||
:commands (flymake-show-project-diagnostics flymake-goto-next-error flymake-goto-prev-error)
|
||||
:bind (:map flymake-project-diagnostics-mode-map
|
||||
("q" . quit-window)))
|
||||
|
||||
(setq major-mode-remap-alist '((rust-mode . rust-mode)))
|
||||
(use-package rust-mode
|
||||
:bind (:map rust-mode-map
|
||||
("C-c u" . string-inflection-rust-style-cycle))
|
||||
:custom
|
||||
(rust-mode-treesitter-derive t))
|
||||
|
||||
(defun yaml-validate ()
|
||||
(interactive)
|
||||
(compile (concat "yamllint -d '{extends: default, rules: {indentation: {indent-sequences: false}, braces: {max-spaces-inside: 1}}}' " (buffer-file-name)) t))
|
||||
|
||||
(use-package yaml-pro
|
||||
:hook (yaml-ts-mode . yaml-pro-ts-mode))
|
||||
|
||||
(use-package lispy
|
||||
:hook (emacs-lisp-mode lisp-mode lisp-data-mode)
|
||||
:bind (:map lispy-mode-map
|
||||
("i" . (lambda ()
|
||||
(interactive)
|
||||
(if (and (featurep 'god-mode) god-global-mode)
|
||||
(god-mode-all -1)
|
||||
(special-lispy-tab))))
|
||||
("C-j" . avy-goto-char-timer))
|
||||
:custom
|
||||
(lispy-compat '(god-mode edebug)))
|
||||
|
||||
(add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . tsx-mode))
|
||||
|
||||
(use-package typescript-ts-mode
|
||||
:init
|
||||
(add-to-list 'major-mode-remap-alist '(typescript-mode . typescript-ts-mode))
|
||||
(add-to-list 'major-mode-remap-alist '(tsx-mode . tsx-ts-mode))
|
||||
(defvar my/edit-indirect-tag-modes
|
||||
'(("graphql" . graphql-ts-mode)
|
||||
("gql" . graphql-ts-mode)
|
||||
("sql" . sql-mode)
|
||||
("css" . css-mode))
|
||||
"Map of tagged-template tag names to major modes.")
|
||||
|
||||
(defun my/edit-indirect--node-bounds (node)
|
||||
"Return (BEG . END) for NODE's contents, excluding delimiters."
|
||||
(cons (1+ (treesit-node-start node))
|
||||
(1- (treesit-node-end node))))
|
||||
|
||||
(defun my/edit-indirect-tagged-template-at-point ()
|
||||
(interactive)
|
||||
(let* ((node (treesit-node-at (point)))
|
||||
(tmpl-node (treesit-parent-until
|
||||
node
|
||||
(lambda (n) (equal (treesit-node-type n) "template_string"))))
|
||||
(str-node (unless tmpl-node
|
||||
(treesit-parent-until
|
||||
node
|
||||
(lambda (n) (equal (treesit-node-type n) "string")))))
|
||||
(target-node (or tmpl-node str-node)))
|
||||
(unless target-node
|
||||
(user-error "Point is not inside a string or template literal"))
|
||||
(let* ((tagged-node (and tmpl-node (treesit-node-parent tmpl-node)))
|
||||
(tag-node (and tagged-node
|
||||
(equal (treesit-node-type tagged-node) "call_expression")
|
||||
(treesit-node-child-by-field-name tagged-node "function")))
|
||||
(tag-name (and tag-node (treesit-node-text tag-node t)))
|
||||
(mode (cond
|
||||
(tag-name (or (cdr (assoc tag-name my/edit-indirect-tag-modes))
|
||||
major-mode))
|
||||
(t 'text-mode)))
|
||||
(bounds (my/edit-indirect--node-bounds target-node))
|
||||
(buf (edit-indirect-region (car bounds) (cdr bounds) t)))
|
||||
(with-current-buffer buf
|
||||
(funcall mode)))))
|
||||
:bind
|
||||
(:map typescript-ts-mode-map
|
||||
("C-c '" . my/edit-indirect-tagged-template-at-point)
|
||||
:map tsx-ts-mode-map
|
||||
("C-c '" . my/edit-indirect-tagged-template-at-point))
|
||||
:custom (typescript-ts-mode-indent-offset 2)
|
||||
:config
|
||||
(defun my-tsx-ts-mode--indent-compatibility-b893426 ()
|
||||
"Indent rules helper, to handle different releases of tree-sitter-tsx.
|
||||
Check if a node type is available, then return the right indent rules."
|
||||
;; handle https://github.com/tree-sitter/tree-sitter-typescript/commit/b893426b82492e59388a326b824a346d829487e8
|
||||
(condition-case nil
|
||||
(progn (treesit-query-capture 'tsx '((jsx_fragment) @capture))
|
||||
`(((match "<" "jsx_fragment") parent 0)
|
||||
((parent-is "jsx_fragment") parent typescript-ts-mode-indent-offset)))
|
||||
(treesit-query-error
|
||||
`(((match "<" "jsx_text") parent 0)
|
||||
((parent-is "jsx_text") grand-parent typescript-ts-mode-indent-offset)))))
|
||||
(advice-add 'tsx-ts-mode--indent-compatibility-b893426 :override #'my-tsx-ts-mode--indent-compatibility-b893426))
|
||||
|
||||
|
||||
(use-package eglot
|
||||
:bind (:map eglot-mode-map
|
||||
("C-c a" . eglot-code-actions)
|
||||
("C-c r" . eglot-rename)
|
||||
("C-c i" . eglot-find-implementation))
|
||||
:custom
|
||||
(eglot-ignored-server-capabilities '(:inlayHintProvider :semanticTokensProvider))
|
||||
(eglot-code-action-indications nil)
|
||||
(eglot-events-buffer-config '(:size 300000 :format full))
|
||||
:config
|
||||
(add-to-list 'eglot-server-programs '((prisma-ts-mode) "prisma-language-server" "--stdio"))
|
||||
(add-to-list 'eglot-stay-out-of 'yasnippet)
|
||||
(add-hook 'eglot-managed-mode-hook (lambda () (eglot-inlay-hints-mode -1)) nil t))
|
||||
|
||||
(use-package java-ts-mode
|
||||
:init
|
||||
(push '(java-mode . java-ts-mode) major-mode-remap-alist)
|
||||
:bind (:map java-ts-mode-map
|
||||
("C-c u" . string-inflection-java-style-cycle))
|
||||
(push `((n-p-gp nil "block" "lambda_expression") parent-bol java-ts-mode-indent-offset)
|
||||
(cdar java-ts-mode--indent-rules))
|
||||
(push `((n-p-gp "}" "block" "lambda_expression") parent-bol 0)
|
||||
(cdar java-ts-mode--indent-rules))
|
||||
|
||||
(add-hook 'java-mode-hook (lambda () (c-set-offset 'arglist-intro '+)))
|
||||
|
||||
(defvar jf/class-name-to-file-search-path (list "src/main/java" "src/test/java"))
|
||||
|
||||
(defun jf/class-name-to-file (class-name)
|
||||
(let ((root (project-root (project-current t)))
|
||||
(fragment (format "%s.java" (replace-regexp-in-string "\\." "/" class-name)))
|
||||
(result))
|
||||
(dolist (p jf/class-name-to-file-search-path result)
|
||||
(unless result
|
||||
(let ((path (format "%s/%s" p fragment)))
|
||||
(when (file-exists-p (concat root path))
|
||||
(setq result path)))))))
|
||||
|
||||
(defun jf/compile-class-to-file ()
|
||||
(jf/class-name-to-file (concat (match-string 1) (match-string 2)))))
|
||||
|
||||
;(add-to-list 'compilation-error-regexp-alist-alist
|
||||
; '(java-stack-trace .
|
||||
; ("^[[:space:]]*at \\(\\(?:[[:lower:]]+\\.\\)+\\)[^(]+(\\([[:alnum:]]+\\)\\.java:\\([[:digit:]]+\\))"
|
||||
; jf/compile-class-to-file 3)))
|
||||
;(add-to-list 'compilation-error-regexp-alist 'java-stack-trace)
|
||||
|
||||
(use-package sql-indent
|
||||
:hook
|
||||
(sql-mode . sqlind-minor-mode))
|
||||
|
||||
(use-package haskell-ts-mode
|
||||
:custom
|
||||
(haskell-ts-use-indent t))
|
||||
|
||||
(use-package envrc
|
||||
:hook
|
||||
(after-init . envrc-global-mode)
|
||||
:custom
|
||||
(envrc-show-summary-in-minibuffer nil))
|
||||
|
||||
(use-package magit
|
||||
:bind (("s-g" . magit))
|
||||
:custom
|
||||
(magit-define-global-key-bindings 'recommended)
|
||||
(magit-save-repository-buffers 'dontask)
|
||||
(magit-commit-show-diff nil)
|
||||
:config
|
||||
(set-face-attribute 'git-commit-summary nil :inherit nil)
|
||||
(defun magit-fetch-all-on-load ()
|
||||
(magit-run-git-async "fetch" "--all"))
|
||||
(add-hook 'magit-status-mode-hook 'magit-fetch-all-on-load)
|
||||
(remove-hook 'magit-status-headers-hook 'magit-insert-tags-header))
|
||||
|
||||
(use-package forge
|
||||
:after magit
|
||||
:config
|
||||
(add-hook 'forge-edit-post-hook 'forge-create-pullreq-insert-single-commit-message)
|
||||
(setopt forge-status-buffer-default-topic-filters
|
||||
(forge--topics-spec :type 'topic :active nil :state 'open :order 'newest)))
|
||||
|
||||
(use-package diff-hl
|
||||
:hook
|
||||
((after-init . global-diff-hl-mode)
|
||||
(magit-post-refresh . diff-hl-magit-post-refresh)))
|
||||
|
||||
(use-package consult
|
||||
:commands (consult-history)
|
||||
:functions (consult-register-window consult-xref)
|
||||
:binds (;; ("C-c M-x" . consult-mode-command)
|
||||
("s-b" . consult-project-buffer)
|
||||
("C-c h" . consult-history)
|
||||
;; ("C-c k" . consult-kmacro)
|
||||
;; ("C-c m" . consult-man)
|
||||
;; ([remap Info-search] . consult-info)
|
||||
|
||||
;; ("C-x M-:" . consult-complex-command)
|
||||
("C-x b" . consult-buffer)
|
||||
("s-B" . consult-buffer)
|
||||
("C-x 4 b" . consult-buffer-other-window)
|
||||
("C-x 5 b" . consult-buffer-other-frame)
|
||||
;; ("C-x t b" . consult-buffer-other-tab)
|
||||
("C-x r b" . consult-bookmark)
|
||||
("C-x p b" . consult-project-buffer)
|
||||
|
||||
("M-#" . consult-register-load)
|
||||
("M-'" . consult-register-store)
|
||||
("C-M-#" . consult-register)
|
||||
("M-y" . consult-yank-pop)
|
||||
("M-g e" . consult-compile-error)
|
||||
("M-g f" . consult-flymake)
|
||||
("M-g g" . consult-goto-line)
|
||||
("M-g M-g" . consult-goto-line)
|
||||
("M-g o" . consult-org-heading)
|
||||
("M-g m" . consult-mark)
|
||||
("M-g k" . consult-global-mark)
|
||||
("M-g i" . consult-imenu)
|
||||
("M-g I" . consult-imenu-multi)
|
||||
("M-s r" . consult-ripgrep)
|
||||
("M-s l" . consult-line)
|
||||
("M-s L" . consult-line-multi)
|
||||
("M-s e" . consult-isearch-history))
|
||||
:custom
|
||||
(consult-narrow-key "<")
|
||||
:config
|
||||
(consult-customize
|
||||
consult-theme :preview-key '(:debounce 0.2 any)
|
||||
consult-ripgrep consult-git-grep consult-grep consult-man
|
||||
consult-bookmark consult-recent-file consult-xref
|
||||
consult-source-bookmark consult-source-file-register
|
||||
consult-source-recent-file
|
||||
consult-source-buffer
|
||||
;; :preview-key "M-."
|
||||
consult-source-project-recent-file
|
||||
:preview-key '(:debounce 0.4 any)))
|
||||
|
||||
(use-package vertico
|
||||
:hook
|
||||
(after-init . vertico-mode)
|
||||
:custom
|
||||
(vertico-count 25))
|
||||
|
||||
(use-package marginalia
|
||||
:hook
|
||||
(after-init . marginalia-mode))
|
||||
|
||||
(use-package corfu
|
||||
:hook
|
||||
(after-init . global-corfu-mode)
|
||||
:custom
|
||||
(corfu-cycle t)
|
||||
(corfu-popupinfo-mode nil)
|
||||
(corfu-quit-at-boundary nil)
|
||||
(corfu-on-exact-match 'show))
|
||||
;; (setq completion-in-region-function #'consult-completion-in-region)
|
||||
|
||||
(use-package cape
|
||||
:functions (cape-file)
|
||||
:init
|
||||
(add-hook 'completion-at-point-functions 'cape-file))
|
||||
|
||||
(use-package org
|
||||
:bind (("C-c A" . org-agenda)
|
||||
("C-c C" . org-capture)
|
||||
("C-c l" . org-id-store-link)
|
||||
:map org-mode-map
|
||||
("C-j" . avy-goto-char-timer))
|
||||
:custom
|
||||
(org-babel-load-languages '((emacs-lisp . t) (sql . t)))
|
||||
(org-confirm-babel-evaluate nil)
|
||||
(org-link-keep-stored-after-insertion t)
|
||||
(org-capture-templates
|
||||
'(("t" "Todo" entry
|
||||
(here)
|
||||
"** TODO %?\n:LOGBOOK:\n- State \"TODO\" %U\n:END:\n")
|
||||
("w" "Work stuff")
|
||||
("wp" "Work Project" entry
|
||||
(file+headline "~/org/todo/work.org.age" "Next Actions")
|
||||
"*** PROJ %?\n- State \"PROJ\" %U\n")
|
||||
("wa" "Work Next Action" entry
|
||||
(file+headline "~/org/todo/work.org.age" "Next Actions")
|
||||
"*** TODO %?\n- State \"TODO\" %U\n")
|
||||
("p" "Personal stuff")
|
||||
("pp" "Personal Project" entry
|
||||
(file+headline "~/org/todo/personal.org.age" "Next Actions")
|
||||
"*** PROJ %?\n- State \"PROJ\" %U\n")
|
||||
("pa" "Personal Next Action" entry
|
||||
(file+headline "~/org/todo/personal.org.age" "Next Actions")
|
||||
"*** TODO %?\n- State \"TODO\" %U\n")))
|
||||
(org-agenda-files '("~/org/todo/work.org" "~/org/todo/personal.org.age"))
|
||||
(org-agenda-todo-ignore-scheduled 'future)
|
||||
(org-agenda-tags-todo-honor-ignore-options t)
|
||||
(org-enforce-todo-dependencies t)
|
||||
(org-agenda-dim-blocked-tasks 'invisible)
|
||||
:config
|
||||
(add-hook 'org-mode-hook 'visual-line-mode)
|
||||
(set-face-attribute 'org-level-1 nil :font "Iosevka Aile")
|
||||
(set-face-attribute 'org-level-2 nil :font "Iosevka Aile")
|
||||
(set-face-attribute 'org-level-3 nil :font "Iosevka Aile")
|
||||
(set-face-attribute 'org-level-4 nil :font "Iosevka Aile")
|
||||
(set-face-attribute 'org-level-5 nil :font "Iosevka Aile")
|
||||
(set-face-attribute 'org-level-6 nil :font "Iosevka Aile")
|
||||
(set-face-attribute 'org-level-7 nil :font "Iosevka Aile")
|
||||
(set-face-attribute 'org-level-8 nil :font "Iosevka Aile"))
|
||||
|
||||
(defvar-local my/org-present-face-remapping-cookies nil)
|
||||
(use-package org-present
|
||||
:config
|
||||
(require 'face-remap)
|
||||
(require 'visual-fill-column)
|
||||
|
||||
(defun my/org-present-start ()
|
||||
(setq-local my/org-present-face-remapping-cookies nil)
|
||||
;; Tweak font sizes
|
||||
(dolist (face '((default :height 2.0)
|
||||
(header-line :height 4.0 :background "#303446")
|
||||
(org-document-title :height 1.75)
|
||||
(org-code :height 2.0)
|
||||
(org-verbatim :height 2.0)
|
||||
(org-block :height 1.25)
|
||||
(org-block-begin-line :height 0.7)
|
||||
(org-level-1 :height 3.0)
|
||||
(org-level-2 :height 3.0)
|
||||
(org-level-3 :height 3.0)
|
||||
(org-level-4 :height 3.0)
|
||||
(org-level-5 :height 3.0)
|
||||
(org-level-6 :height 3.0)
|
||||
(org-level-7 :height 3.0)
|
||||
(org-level-8 :height 3.0)))
|
||||
(push (apply #'face-remap-add-relative face) my/org-present-face-remapping-cookies))
|
||||
|
||||
;; Set a blank header line string to create blank space at the top
|
||||
(setq header-line-format " ")
|
||||
|
||||
;; Display inline images automatically
|
||||
(org-display-inline-images)
|
||||
(org-present-hide-cursor)
|
||||
|
||||
;; Center the presentation and wrap lines
|
||||
(visual-fill-column-mode 1)
|
||||
(setq visual-fill-column-center-text t)
|
||||
;; (visual-line-mode 1)
|
||||
)
|
||||
|
||||
(defun my/org-present-end ()
|
||||
;; Reset font customizations
|
||||
(dolist (cookie my/org-present-face-remapping-cookies)
|
||||
(face-remap-remove-relative cookie))
|
||||
|
||||
;; Clear the header line string so that it isn't displayed
|
||||
(setq header-line-format nil)
|
||||
|
||||
;; Stop displaying inline images
|
||||
(org-remove-inline-images)
|
||||
(org-present-show-cursor)
|
||||
|
||||
;; Stop centering the document
|
||||
(visual-fill-column-mode 0)
|
||||
;; (visual-line-mode 0)
|
||||
)
|
||||
|
||||
(add-hook 'org-present-mode-hook 'my/org-present-start)
|
||||
(add-hook 'org-present-mode-quit-hook 'my/org-present-end))
|
||||
|
||||
;; (require 'org-roam)
|
||||
;; (bind-keys ("C-c n l" . org-roam-buffer-toggle)
|
||||
;; ("C-c n f" . org-roam-node-find)
|
||||
;; ("C-c n g" . org-roam-graph)
|
||||
;; ("C-c n i" . org-roam-node-insert)
|
||||
;; ("C-c n c" . org-roam-capture))
|
||||
|
||||
;; (setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag)))
|
||||
;; (org-roam-db-autosync-mode)
|
||||
|
||||
(use-package org-modern
|
||||
:hook org-mode)
|
||||
|
||||
;; (define-key org-mode-map (kbd "C-c C-r") verb-command-map)
|
||||
|
||||
(use-package eat
|
||||
:commands (eat)
|
||||
:hook (eshell-load-hook . eat-eshell-mode))
|
||||
|
||||
(use-package age
|
||||
:hook
|
||||
(after-init . age-file-enable)
|
||||
:custom
|
||||
(age-default-identity "~/source/dotfiles/keys/yubi1age.txt")
|
||||
(age-default-recipient "~/source/dotfiles/keys/myself.txt")
|
||||
:config
|
||||
(setenv "PINENTRY_PROGRAM" "pinentry-mac"))
|
||||
|
||||
(use-package claude-code
|
||||
:bind-keymap ("C-c c" . claude-code-command-map)
|
||||
:custom (claude-code-optimize-window-resize nil))
|
||||
@@ -0,0 +1,137 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
config = lib.mkIf (config.jfrikker.enable && config.jfrikker.desktop.enable) {
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
extraPackages =
|
||||
epkgs: with epkgs; [
|
||||
ace-window
|
||||
age
|
||||
apheleia
|
||||
avy
|
||||
buffer-terminator
|
||||
cape
|
||||
catppuccin-theme
|
||||
(epkgs.trivialBuild {
|
||||
pname = "claude-code";
|
||||
version = "0.4.5";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "stevemolitor";
|
||||
repo = "claude-code.el";
|
||||
rev = "03199df8b3a1e9cd4857f0851f7a912ba524aff3";
|
||||
sha256 = "sha256-5QJrWIu4EgnHcOqMwlrs2JBBx7aI9OaSJswesr6Apfk=";
|
||||
};
|
||||
packageRequires = [ epkgs.inheritenv ];
|
||||
})
|
||||
consult
|
||||
consult-eglot
|
||||
consult-gh
|
||||
corfu
|
||||
diff-hl
|
||||
doom-modeline
|
||||
eat
|
||||
edit-indirect
|
||||
embark
|
||||
embark-consult
|
||||
envrc
|
||||
forge
|
||||
free-keys
|
||||
git-timemachine
|
||||
god-mode
|
||||
graphql-ts-mode
|
||||
haskell-ts-mode
|
||||
jenkinsfile-mode
|
||||
jq-mode
|
||||
ligature
|
||||
(lispy.overrideAttrs {
|
||||
packageRequires = [
|
||||
ace-window
|
||||
iedit
|
||||
swiper
|
||||
zoutline
|
||||
hydra
|
||||
];
|
||||
ignoreCompilationError = true;
|
||||
})
|
||||
ledger-mode
|
||||
lua-mode
|
||||
magit
|
||||
marginalia
|
||||
mixed-pitch
|
||||
nix-mode
|
||||
orderless
|
||||
org-modern
|
||||
org-present
|
||||
org-roam
|
||||
pnpm-mode
|
||||
popper
|
||||
prisma-ts-mode
|
||||
rust-mode
|
||||
sly
|
||||
sly-macrostep
|
||||
sql-indent
|
||||
string-inflection
|
||||
tree-sitter
|
||||
(treesit-grammars.with-grammars (g: [
|
||||
g.tree-sitter-bash
|
||||
g.tree-sitter-commonlisp
|
||||
g.tree-sitter-css
|
||||
g.tree-sitter-dockerfile
|
||||
g.tree-sitter-dot
|
||||
g.tree-sitter-elisp
|
||||
g.tree-sitter-graphql
|
||||
g.tree-sitter-gitcommit
|
||||
g.tree-sitter-gitignore
|
||||
g.tree-sitter-haskell
|
||||
g.tree-sitter-html
|
||||
g.tree-sitter-java
|
||||
g.tree-sitter-javascript
|
||||
g.tree-sitter-jq
|
||||
g.tree-sitter-json
|
||||
g.tree-sitter-json5
|
||||
g.tree-sitter-just
|
||||
g.tree-sitter-ledger
|
||||
g.tree-sitter-llvm
|
||||
g.tree-sitter-make
|
||||
g.tree-sitter-nginx
|
||||
g.tree-sitter-nix
|
||||
g.tree-sitter-org
|
||||
g.tree-sitter-php
|
||||
g.tree-sitter-prisma
|
||||
g.tree-sitter-python
|
||||
g.tree-sitter-rust
|
||||
g.tree-sitter-rust-format-args
|
||||
g.tree-sitter-scss
|
||||
g.tree-sitter-sql
|
||||
g.tree-sitter-toml
|
||||
g.tree-sitter-tsx
|
||||
g.tree-sitter-typescript
|
||||
g.tree-sitter-xml
|
||||
g.tree-sitter-yaml
|
||||
]))
|
||||
verb
|
||||
vertico
|
||||
visual-fill-column
|
||||
yaml-pro
|
||||
];
|
||||
extraConfig = ''
|
||||
(defvar my-base-font-size ${if pkgs.stdenv.isDarwin then "130" else "100"})
|
||||
(require 'catppuccin-theme)
|
||||
(setopt catppuccin-flavor 'frappe)
|
||||
(load-theme 'catppuccin :no-confirm)
|
||||
|
||||
;; (set-face-attribute 'default nil :font "JetBrainsMono Nerd Font" :height 130)
|
||||
;; (set-face-attribute 'fixed-pitch nil :font "JetBrainsMono Nerd Font" :height 130)
|
||||
(set-face-attribute 'default nil :font "Iosevka Term SS14" :height my-base-font-size)
|
||||
(set-face-attribute 'fixed-pitch nil :font "Iosevka Term SS14" :height my-base-font-size)
|
||||
(set-face-attribute 'variable-pitch nil :font "Iosevka Etoile" :height my-base-font-size)
|
||||
''
|
||||
+ builtins.readFile ./emacs.el;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
{ config, lib, ... }: {
|
||||
config = lib.mkIf config.jfrikker.enable {
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
|
||||
settings.editor = {
|
||||
auto-format = false;
|
||||
auto-pairs = false;
|
||||
auto-save.after-delay.enable = true;
|
||||
auto-save.after-delay.timeout = 1000;
|
||||
cursorline = true;
|
||||
idle-timeout = 0;
|
||||
rulers = [ 120 ];
|
||||
text-width = 100;
|
||||
lsp.goto-reference-include-declaration = false;
|
||||
cursor-shape.insert = "bar";
|
||||
smart-tab.supersede-menu = true;
|
||||
whitespace.render.newline = "all";
|
||||
};
|
||||
|
||||
settings.keys.normal.space = {
|
||||
space = "file_picker";
|
||||
"," = "buffer_picker";
|
||||
# b = "@:sh wezterm cli spawn --cwd . -- tig blame <C-r>%<ret>";
|
||||
};
|
||||
|
||||
settings.theme = "catppuccin_frappe";
|
||||
|
||||
languages.language-server.eslint = {
|
||||
args = [ "--stdio" ];
|
||||
command = "vscode-eslint-language-server";
|
||||
config.nodePath = "";
|
||||
config.quiet = false;
|
||||
config.rulesCustomizations = [ ];
|
||||
config.run = "onType";
|
||||
config.validate = "on";
|
||||
config.codeAction.disableRuleComment.enable = true;
|
||||
config.codeAction.disableRuleComment.location = "separateLine";
|
||||
config.codeAction.showDocumentation.enable = true;
|
||||
config.problems.shortenToSingleLine = false;
|
||||
};
|
||||
|
||||
languages.language-server.jdtls.config.java = {
|
||||
autobuild.enabled = true;
|
||||
completion.maxResults = 1000;
|
||||
format.settings.url = "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml";
|
||||
};
|
||||
|
||||
languages.language-server.rust-analyzer.config.files.watcher = "client";
|
||||
|
||||
languages.language = [
|
||||
{
|
||||
name = "typescript";
|
||||
language-servers = [
|
||||
"typescript-language-server"
|
||||
"vscode-eslint-language-server"
|
||||
];
|
||||
indent.tab-width = 4;
|
||||
indent.unit = " ";
|
||||
}
|
||||
{
|
||||
name = "tsx";
|
||||
language-servers = [
|
||||
"typescript-language-server"
|
||||
"vscode-eslint-language-server"
|
||||
];
|
||||
indent.tab-width = 4;
|
||||
indent.unit = " ";
|
||||
}
|
||||
{
|
||||
name = "java";
|
||||
indent.tab-width = 4;
|
||||
indent.unit = " ";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
(use-package lui
|
||||
:defer t
|
||||
:custom
|
||||
(lui-time-stamp-format "[%Y-%m-%d %H:%M]"))
|
||||
|
||||
(use-package slack
|
||||
:commands slack-start
|
||||
:custom
|
||||
(slack-render-profile-images-p nil)
|
||||
(slack-buffer-function #'switch-to-buffer))
|
||||
@@ -0,0 +1,10 @@
|
||||
(use-package lui
|
||||
:defer t
|
||||
:custom
|
||||
(lui-time-stamp-format "[%Y-%m-%d %H:%M]"))
|
||||
|
||||
(use-package slack
|
||||
:commands slack-start
|
||||
:custom
|
||||
(slack-render-profile-images-p nil)
|
||||
(slack-buffer-function #'switch-to-buffer))
|
||||
@@ -0,0 +1,36 @@
|
||||
{ pkgs, ... }: {
|
||||
config.programs.starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
container.disabled = true;
|
||||
git_branch.symbol = " ";
|
||||
git_status.ahead = "⇡\${count}";
|
||||
git_status.behind = "⇣\${count}";
|
||||
git_status.diverged = "⇕⇡\${ahead_count}⇣\${behind_count}";
|
||||
git_status.format = "([\\[\$conflicted\$staged\$ahead_behind\\]](\$style) )";
|
||||
java.symbol = " ";
|
||||
line_break.disabled = true;
|
||||
nix_shell.symbol = " ";
|
||||
nodejs.symbol = " ";
|
||||
package.disabled = true;
|
||||
palette = "catppuccin_frappe";
|
||||
python.symbol = " ";
|
||||
package.symbol = " ";
|
||||
rust.symbol = " ";
|
||||
docker_context.disabled = true;
|
||||
shell.disabled = false;
|
||||
}
|
||||
// builtins.fromTOML (
|
||||
builtins.readFile (
|
||||
pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "starship";
|
||||
rev = "3e3e54410c3189053f4da7a7043261361a1ed1bc"; # Replace with the latest commit hash
|
||||
sha256 = "soEBVlq3ULeiZFAdQYMRFuswIIhI9bclIU8WXjxd7oY=";
|
||||
}
|
||||
+ /palettes/frappe.toml
|
||||
)
|
||||
);
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{ pkgs, ... }: {
|
||||
config.programs.tmux = {
|
||||
baseIndex = 1;
|
||||
clock24 = true;
|
||||
customPaneNavigationAndResize = true;
|
||||
historyLimit = 50000;
|
||||
enable = true;
|
||||
escapeTime = 0;
|
||||
keyMode = "vi";
|
||||
mouse = true;
|
||||
shell = pkgs.zsh + "/bin/zsh";
|
||||
shortcut = "Space";
|
||||
tmuxinator.enable = true;
|
||||
terminal = "xterm-256color";
|
||||
extraConfig = ''
|
||||
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
||||
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
|
||||
|
||||
bind-key -T launcher g popup -h 100% -w 100% -E lazygit
|
||||
bind-key g switch-client -Tlauncher
|
||||
set -g default-command ""
|
||||
'';
|
||||
plugins = [
|
||||
{
|
||||
plugin = pkgs.tmuxPlugins.catppuccin;
|
||||
extraConfig = ''
|
||||
set -g @catppuccin_window_tabs_enabled on
|
||||
set -g @catppuccin_window_default_text "#W"
|
||||
set -g @catppuccin_window_current_text "#W"'';
|
||||
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
local config = {}
|
||||
|
||||
config.font = wezterm.font 'Iosevka Term SS14'
|
||||
config.font_size = 13.0
|
||||
-- config.font = wezterm.font("JetBrains Mono")
|
||||
config.inactive_pane_hsb = {
|
||||
saturation = 0.5,
|
||||
brightness = 0.5,
|
||||
}
|
||||
config.pane_focus_follows_mouse = true
|
||||
config.switch_to_last_active_tab_when_closing_tab = true
|
||||
config.tab_bar_at_bottom = true
|
||||
config.use_fancy_tab_bar = false
|
||||
config.window_decorations = "RESIZE"
|
||||
local workspace_switcher = wezterm.plugin.require("https://github.com/MLFlexer/smart_workspace_switcher.wezterm")
|
||||
workspace_switcher.zoxide_path='~/.nix-profile/bin/zoxide'
|
||||
wezterm.on('smart_workspace_switcher.workspace_switcher.created', function(window, path, workspace)
|
||||
local editor = window:active_tab()
|
||||
editor:set_title("edit")
|
||||
editor:panes()[1]:send_text("hx\n")
|
||||
local run = window:spawn_tab {}
|
||||
run:set_title "run"
|
||||
local term = window:spawn_tab {}
|
||||
term:set_title "term"
|
||||
editor:activate()
|
||||
end)
|
||||
|
||||
local function segments_for_right_status(window)
|
||||
return {
|
||||
window:active_workspace(),
|
||||
}
|
||||
end
|
||||
|
||||
wezterm.on('update-status',
|
||||
function(window, _)
|
||||
local SOLID_LEFT_ARROW = utf8.char(0xe0b2)
|
||||
local segments = segments_for_right_status(window)
|
||||
|
||||
local color_scheme = window:effective_config().resolved_palette
|
||||
-- Note the use of wezterm.color.parse here, this returns
|
||||
-- a Color object, which comes with functionality for lightening
|
||||
-- or darkening the colour (amongst other things).
|
||||
local bg = wezterm.color.parse(color_scheme.background)
|
||||
local fg = color_scheme.foreground
|
||||
|
||||
-- Each powerline segment is going to be coloured progressively
|
||||
-- darker/lighter depending on whether we're on a dark/light colour
|
||||
-- scheme. Let's establish the "from" and "to" bounds of our gradient.
|
||||
local gradient_to, gradient_from = bg
|
||||
gradient_from = gradient_to:lighten(0.2)
|
||||
|
||||
-- Yes, WezTerm supports creating gradients, because why not?! Although
|
||||
-- they'd usually be used for setting high fidelity gradients on your terminal's
|
||||
-- background, we'll use them here to give us a sample of the powerline segment
|
||||
-- colours we need.
|
||||
local gradient = wezterm.color.gradient(
|
||||
{
|
||||
orientation = 'Horizontal',
|
||||
colors = { gradient_from, gradient_to },
|
||||
},
|
||||
#segments -- only gives us as many colours as we have segments.
|
||||
)
|
||||
|
||||
-- We'll build up the elements to send to wezterm.format in this table.
|
||||
local elements = {}
|
||||
|
||||
for i, seg in ipairs(segments) do
|
||||
local is_first = i == 1
|
||||
|
||||
if is_first then
|
||||
table.insert(elements, { Background = { Color = 'none' } })
|
||||
end
|
||||
table.insert(elements, { Foreground = { Color = gradient[i] } })
|
||||
table.insert(elements, { Text = SOLID_LEFT_ARROW })
|
||||
|
||||
table.insert(elements, { Foreground = { Color = fg } })
|
||||
table.insert(elements, { Background = { Color = gradient[i] } })
|
||||
table.insert(elements, { Text = ' ' .. seg .. ' ' })
|
||||
end
|
||||
|
||||
window:set_right_status(wezterm.format(elements))
|
||||
end)
|
||||
config.leader = { key = ' ', mods = 'CTRL', timeout_milliseconds = 10000 }
|
||||
config.keys = {
|
||||
{
|
||||
key = "s",
|
||||
mods = "CMD",
|
||||
action = workspace_switcher.switch_workspace(),
|
||||
},
|
||||
{
|
||||
key = "-",
|
||||
mods = "CMD",
|
||||
action = wezterm.action.SplitVertical {},
|
||||
},
|
||||
{
|
||||
key = "\\",
|
||||
mods = "CMD",
|
||||
action = wezterm.action.SplitHorizontal {},
|
||||
},
|
||||
{
|
||||
key = "h",
|
||||
mods = "CMD",
|
||||
action = wezterm.action.ActivatePaneDirection "Left",
|
||||
},
|
||||
{
|
||||
key = "j",
|
||||
mods = "CMD",
|
||||
action = wezterm.action.ActivatePaneDirection "Down",
|
||||
},
|
||||
{
|
||||
key = "k",
|
||||
mods = "CMD",
|
||||
action = wezterm.action.ActivatePaneDirection "Up",
|
||||
},
|
||||
{
|
||||
key = "l",
|
||||
mods = "CMD",
|
||||
action = wezterm.action.ActivatePaneDirection "Right",
|
||||
},
|
||||
{
|
||||
key = "g",
|
||||
mods = "CMD",
|
||||
action = wezterm.action.SpawnCommandInNewTab {
|
||||
args = { wezterm.home_dir .. "/.nix-profile/bin/zsh", "-l", "-i", "-c", "lazygit" }
|
||||
}
|
||||
},
|
||||
{
|
||||
key = "t",
|
||||
mods = "CMD",
|
||||
action = wezterm.action.SpawnCommandInNewTab {}
|
||||
},
|
||||
{
|
||||
key = 'z',
|
||||
mods = 'CMD',
|
||||
action = wezterm.action.TogglePaneZoomState,
|
||||
},
|
||||
{
|
||||
key = 'd',
|
||||
mods = 'CMD',
|
||||
action = wezterm.action.CloseCurrentTab { confirm = true },
|
||||
},
|
||||
}
|
||||
|
||||
for i = 1, 9 do
|
||||
-- CTRL+ALT + number to activate that tab
|
||||
table.insert(config.keys, {
|
||||
key = tostring(i),
|
||||
mods = 'LEADER',
|
||||
action = wezterm.action.ActivateTab(i - 1),
|
||||
})
|
||||
end
|
||||
config.color_scheme = 'Catppuccin Frappe'
|
||||
|
||||
return config
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
home-manager switch
|
||||
Reference in New Issue
Block a user