Before MacOS
This commit is contained in:
1 parent
e9d31e5cef
commit
edcf5dd381
5 files changed
+247
-112
No files matched your search
+3
-2
@@ -90,7 +90,7 @@ fish_directory_timeout=900
|
|||||||
|
|
||||||
[Layout]
|
[Layout]
|
||||||
output_lines=0
|
output_lines=0
|
||||||
left_panel_size=40
|
left_panel_size=160
|
||||||
top_panel_size=0
|
top_panel_size=0
|
||||||
message_visible=true
|
message_visible=true
|
||||||
keybar_visible=false
|
keybar_visible=false
|
||||||
@@ -121,6 +121,7 @@ xterm-kitty=
|
|||||||
color_terminals=
|
color_terminals=
|
||||||
|
|
||||||
xterm-256color=
|
xterm-256color=
|
||||||
|
linux=
|
||||||
|
|
||||||
[Panels]
|
[Panels]
|
||||||
simple_swap=false
|
simple_swap=false
|
||||||
@@ -161,6 +162,6 @@ ignore_dirs=
|
|||||||
|
|
||||||
[Panelize]
|
[Panelize]
|
||||||
Find *.orig after patching=find . -name \\*.orig -print
|
Find *.orig after patching=find . -name \\*.orig -print
|
||||||
Find SUID and SGID programs=find . \\( \\( -perm -04000 -a -perm /011 \\) -o \\( -perm -02000 -a -perm /01 \\) \\) -print
|
|
||||||
Find rejects after patching=find . -name \\*.rej -print
|
Find rejects after patching=find . -name \\*.rej -print
|
||||||
Modified git files=git ls-files --modified
|
Modified git files=git ls-files --modified
|
||||||
|
Find SUID and SGID programs=find . \\( \\( -perm -04000 -a -perm /011 \\) -o \\( -perm -02000 -a -perm /01 \\) \\) -print
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
alias gvc="ssh git@git.venomade.com"
|
alias gvc="ssh git@git.venomade.com"
|
||||||
alias rgf='rg --files | rg'
|
alias rgf='rg --files | rg'
|
||||||
alias ls='ls --color=auto'
|
alias ls='ls --color=auto'
|
||||||
|
alias md='mkdir'
|
||||||
|
alias ec='emacsclient -nw'
|
||||||
+213
-110
@@ -29,17 +29,19 @@
|
|||||||
- [[#programming][Programming]]
|
- [[#programming][Programming]]
|
||||||
- [[#projects][Projects]]
|
- [[#projects][Projects]]
|
||||||
- [[#lsp][LSP]]
|
- [[#lsp][LSP]]
|
||||||
|
- [[#sidebar][Sidebar]]
|
||||||
- [[#treesitter][TreeSitter]]
|
- [[#treesitter][TreeSitter]]
|
||||||
- [[#languages][Languages]]
|
- [[#languages][Languages]]
|
||||||
- [[#company][Company]]
|
- [[#company][Company]]
|
||||||
- [[#cape][Cape]]
|
- [[#cape][Cape]]
|
||||||
|
- [[#codeium][Codeium]]
|
||||||
- [[#utilities][Utilities]]
|
- [[#utilities][Utilities]]
|
||||||
- [[#user-interface][User Interface]]
|
- [[#user-interface][User Interface]]
|
||||||
- [[#add-nerd-icons][Add Nerd Icons]]
|
- [[#add-nerd-icons][Add Nerd Icons]]
|
||||||
- [[#fonts][Fonts]]
|
- [[#fonts][Fonts]]
|
||||||
- [[#theme][Theme]]
|
- [[#theme][Theme]]
|
||||||
- [[#niceties][Niceties]]
|
- [[#niceties][Niceties]]
|
||||||
- [[#modern-looking-emacs][Modern Looking Emacs]]
|
- [[#zen-mode][Zen Mode]]
|
||||||
|
|
||||||
* Straight Package Manager
|
* Straight Package Manager
|
||||||
I'm using the Straight package manager instead of use-package because it is only available in Emacs 29 and above.
|
I'm using the Straight package manager instead of use-package because it is only available in Emacs 29 and above.
|
||||||
@@ -58,6 +60,7 @@ I'm using the Straight package manager instead of use-package because it is only
|
|||||||
(load bootstrap-file nil 'nomessage))
|
(load bootstrap-file nil 'nomessage))
|
||||||
|
|
||||||
(setq straight-use-package-by-default t)
|
(setq straight-use-package-by-default t)
|
||||||
|
(setq package-native-compile t)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Configs
|
* Configs
|
||||||
@@ -159,6 +162,11 @@ Quickly grep both my current project and the system include directory.
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Fix Annoyances
|
** Fix Annoyances
|
||||||
|
*** Add Scroll Marginn
|
||||||
|
This adds a scroll margin at the top and bottom of 10 lines to make it easier to scroll through the buffer.
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(setq scroll-margin 10)
|
||||||
|
#+end_src
|
||||||
*** Disable Backups
|
*** Disable Backups
|
||||||
Living on the edge.
|
Living on the edge.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
@@ -179,16 +187,40 @@ Fixing warnings is for nerds. This is basically necessary after more than 5 pack
|
|||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq warning-minimum-level :emergency)
|
(setq warning-minimum-level :emergency)
|
||||||
#+end_src
|
#+end_src
|
||||||
*** Add Scroll Marginn
|
*** Local Bin
|
||||||
This adds a scroll margin at the top and bottom of 10 lines to make it easier to scroll through the buffer.
|
Add the local bin directory to PATH.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq scroll-margin 10)
|
(setenv "PATH" (concat (concat
|
||||||
|
(concat (expand-file-name "~/.local/bin") ":")
|
||||||
|
(getenv "PATH"))))
|
||||||
|
|
||||||
|
(setq exec-path (append exec-path (list (expand-file-name "~/.local/bin"))))
|
||||||
#+end_src
|
#+end_src
|
||||||
*** Save Place
|
*** Save Place
|
||||||
Go back to old position on file open.
|
Go back to old position on file open.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(save-place-mode 1)
|
(save-place-mode 1)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
*** COMMENT System Clipboard
|
||||||
|
Use system clipboard in terminal-mode. (Currently commented out due to using graphical-mode)
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
;; credit: yorickvP on Github
|
||||||
|
(setq wl-copy-process nil)
|
||||||
|
(defun wl-copy (text)
|
||||||
|
(setq wl-copy-process (make-process :name "wl-copy"
|
||||||
|
:buffer nil
|
||||||
|
:command '("wl-copy" "-f" "-n")
|
||||||
|
:connection-type 'pipe
|
||||||
|
:noquery t))
|
||||||
|
(process-send-string wl-copy-process text)
|
||||||
|
(process-send-eof wl-copy-process))
|
||||||
|
(defun wl-paste ()
|
||||||
|
(if (and wl-copy-process (process-live-p wl-copy-process))
|
||||||
|
nil ; should return nil if we're the current paste owner
|
||||||
|
(shell-command-to-string "wl-paste -n | tr -d \r")))
|
||||||
|
(setq interprogram-cut-function 'wl-copy)
|
||||||
|
(setq interprogram-paste-function 'wl-paste)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** Keybindings
|
** Keybindings
|
||||||
*** Reload Emacs
|
*** Reload Emacs
|
||||||
@@ -226,7 +258,7 @@ Add shortcuts to various Emacs functions.
|
|||||||
(keymap-global-set "C-c e b" 'eval-buffer)
|
(keymap-global-set "C-c e b" 'eval-buffer)
|
||||||
(keymap-global-set "C-c e r" 'eval-region)
|
(keymap-global-set "C-c e r" 'eval-region)
|
||||||
(keymap-global-set "C-c e s" 'eshell)
|
(keymap-global-set "C-c e s" 'eshell)
|
||||||
(keymap-global-set "C-c e t" 'ef-themes-load-random)
|
(keymap-global-set "C-c e t" 'theme-toggle)
|
||||||
#+end_src
|
#+end_src
|
||||||
*** Regex and Copy from Above
|
*** Regex and Copy from Above
|
||||||
Add shortcuts to entering a regex replace and copying a line from above.
|
Add shortcuts to entering a regex replace and copying a line from above.
|
||||||
@@ -234,6 +266,11 @@ Add shortcuts to entering a regex replace and copying a line from above.
|
|||||||
(keymap-global-set "C-c r" 'replace-regexp)
|
(keymap-global-set "C-c r" 'replace-regexp)
|
||||||
(keymap-global-set "C-c y a" 'copy-from-above-command)
|
(keymap-global-set "C-c y a" 'copy-from-above-command)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
*** Reverse C-x o
|
||||||
|
Add a reversed C-x o to go to previous window.
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(keymap-global-set "C-x O" 'previous-multiframe-window)
|
||||||
|
#+end_src
|
||||||
*** Window Management
|
*** Window Management
|
||||||
Add shortcuts to scrolling and moving between windows.
|
Add shortcuts to scrolling and moving between windows.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
@@ -408,7 +445,10 @@ Tools for the primary version control system.
|
|||||||
*** Magit
|
*** Magit
|
||||||
A very extensive Git GUI for Emacs.
|
A very extensive Git GUI for Emacs.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package magit)
|
(use-package magit
|
||||||
|
:after nerd-icons
|
||||||
|
:custom
|
||||||
|
(magit-format-file-function #'magit-format-file-nerd-icons))
|
||||||
#+end_src
|
#+end_src
|
||||||
*** Magit Todos
|
*** Magit Todos
|
||||||
Show Todo list in Magit.
|
Show Todo list in Magit.
|
||||||
@@ -459,11 +499,6 @@ Adds fuzzy completion to basic Emacs commands.
|
|||||||
(setq enable-recursive-minibuffers t)
|
(setq enable-recursive-minibuffers t)
|
||||||
:config
|
:config
|
||||||
(ivy-mode 1))
|
(ivy-mode 1))
|
||||||
|
|
||||||
;; (use-package ivy-prescient
|
|
||||||
;; :after counsel
|
|
||||||
;; :config
|
|
||||||
;; (ivy-prescient-mode 1))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
*** Ivy Rich
|
*** Ivy Rich
|
||||||
Adds Icons to all the new fuzzy completed Emacs commands.
|
Adds Icons to all the new fuzzy completed Emacs commands.
|
||||||
@@ -524,11 +559,11 @@ Stylize Org Mode headers with Nerd Icons.
|
|||||||
(use-package org-bullets
|
(use-package org-bullets
|
||||||
:config
|
:config
|
||||||
(setq org-bullets-bullet-list '(
|
(setq org-bullets-bullet-list '(
|
||||||
""
|
"•"
|
||||||
""
|
"•"
|
||||||
""
|
"◦"
|
||||||
""
|
"◦"
|
||||||
"")))
|
"◦")))
|
||||||
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
|
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@@ -673,21 +708,42 @@ Use language servers to provide info and completion.
|
|||||||
:init
|
:init
|
||||||
(setq lsp-completion-provider :none
|
(setq lsp-completion-provider :none
|
||||||
lsp-keymap-prefix "C-c l"
|
lsp-keymap-prefix "C-c l"
|
||||||
lsp-headerline-breadcrumb-enable nil)
|
lsp-headerline-breadcrumb-enable nil
|
||||||
|
lsp-modeline-code-actions-enable nil)
|
||||||
:commands lsp lsp-deferred
|
:commands lsp lsp-deferred
|
||||||
:config
|
:config
|
||||||
(lsp-enable-snippet t))
|
(lsp-enable-snippet t))
|
||||||
;; (lsp-enable-which-key-integration t))
|
|
||||||
|
|
||||||
;; (use-package lsp-ui
|
|
||||||
;; :commands lsp-ui-mode
|
|
||||||
;; :hook (prog-mode . lsp-ui-mode)
|
|
||||||
;; :config
|
|
||||||
;; (keymap-global-set "C-c l d" 'lsp-ui-doc-show))
|
|
||||||
|
|
||||||
;; Instead:
|
|
||||||
(keymap-global-set "C-c l d" 'lsp-describe-thing-at-point)
|
(keymap-global-set "C-c l d" 'lsp-describe-thing-at-point)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
*** LSP Mode - Undo Tree compatibility
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(with-eval-after-load 'lsp-mode
|
||||||
|
(defun my/lsp--should-ignore-file (filename)
|
||||||
|
(or (string-match-p "\\.emacs[-_.]backups?/" filename)
|
||||||
|
(string-match-p "\\.emacs[-_.]undo/" filename)
|
||||||
|
(string-match-p "/\\.emacs\\.d/undo/" filename)
|
||||||
|
(string-match-p "/\\.emacs\\.d/backups/" filename)
|
||||||
|
(string-match-p "/#.*#$" filename)
|
||||||
|
(string-match-p "/.*~$" filename)
|
||||||
|
(string-match-p "/.*\\.~undo-tree~$" filename)))
|
||||||
|
|
||||||
|
(advice-add 'lsp--on-did-open :before
|
||||||
|
(lambda (&rest args)
|
||||||
|
(let ((file (lsp--uri-to-path (gethash "uri" (cl-first args)))))
|
||||||
|
(when (my/lsp--should-ignore-file file)
|
||||||
|
(cl-return-from lsp--on-did-open))))
|
||||||
|
'((name . ignore-emacs-backup-open)))
|
||||||
|
|
||||||
|
(advice-add 'lsp--on-did-save :before
|
||||||
|
(lambda (&rest args)
|
||||||
|
(let ((file (lsp--uri-to-path (gethash "uri" (cl-first args)))))
|
||||||
|
(when (my/lsp--should-ignore-file file)
|
||||||
|
(cl-return-from lsp--on-did-save))))
|
||||||
|
'((name . ignore-emacs-backup-save))))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
*** YASnippet
|
*** YASnippet
|
||||||
Autocomplete Snippets to write common code patterns faster.
|
Autocomplete Snippets to write common code patterns faster.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
@@ -718,6 +774,50 @@ Search documentation from within Emacs.
|
|||||||
(keymap-global-set "C-c d" 'devdocs-lookup))
|
(keymap-global-set "C-c d" 'devdocs-lookup))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
** Sidebar
|
||||||
|
Project file sidebar for project wide visual grepping.
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package dired-sidebar
|
||||||
|
:init
|
||||||
|
(setq dired-sidebar-theme 'icons
|
||||||
|
dired-sidebar-use-term-integration t
|
||||||
|
dired-sidebar-width 30
|
||||||
|
dired-sidebar-no-delete-other-windows t
|
||||||
|
dired-sidebar-should-follow-file t))
|
||||||
|
|
||||||
|
(defun open-project-sidebar ()
|
||||||
|
"Toggle `dired-sidebar' at the project root."
|
||||||
|
(interactive)
|
||||||
|
(let ((default-directory (project-root (project-current t))))
|
||||||
|
(dired-sidebar-toggle-sidebar)))
|
||||||
|
|
||||||
|
(keymap-global-set "C-c p s" 'open-project-sidebar)
|
||||||
|
|
||||||
|
(defun dired-sidebar-header-line ()
|
||||||
|
"Set a minimal header line for dired-sidebar buffers."
|
||||||
|
(setq header-line-format
|
||||||
|
(propertize
|
||||||
|
(concat " " (file-name-nondirectory
|
||||||
|
(directory-file-name default-directory)))
|
||||||
|
'face 'bold)))
|
||||||
|
|
||||||
|
(add-hook 'dired-sidebar-mode-hook #'dired-sidebar-header-line)
|
||||||
|
|
||||||
|
(defun dired-sidebar-clean-top-line ()
|
||||||
|
"Hide the top directory line in `dired-sidebar` buffers."
|
||||||
|
(save-excursion
|
||||||
|
(goto-char (point-min))
|
||||||
|
(when (looking-at "^ \\(/.*\\):.*$")
|
||||||
|
(let ((inhibit-read-only t))
|
||||||
|
(delete-region (point) (progn (forward-line 1) (point)))))))
|
||||||
|
|
||||||
|
(add-hook 'dired-sidebar-mode-hook #'dired-sidebar-clean-top-line)
|
||||||
|
|
||||||
|
(add-hook 'dired-sidebar-mode-hook
|
||||||
|
(lambda ()
|
||||||
|
(setq mode-line-format nil))) ;; disable modeline in sidebar
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** TreeSitter
|
** TreeSitter
|
||||||
Use advanced highlighting by default.
|
Use advanced highlighting by default.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
@@ -754,13 +854,7 @@ The Classic.
|
|||||||
|
|
||||||
(add-hook 'find-file-hook 'insert-header-guards)
|
(add-hook 'find-file-hook 'insert-header-guards)
|
||||||
#+end_src
|
#+end_src
|
||||||
*** COMMENT D
|
*** Go
|
||||||
C Interop with a GC.
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(use-package d-mode
|
|
||||||
:hook (d-mode . lsp))
|
|
||||||
#+end_src
|
|
||||||
*** COMMENT Go
|
|
||||||
A simple C-like language with a GC.
|
A simple C-like language with a GC.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package go-mode
|
(use-package go-mode
|
||||||
@@ -795,16 +889,9 @@ Functionally Scottish.
|
|||||||
:hook
|
:hook
|
||||||
(haskell-mode . lsp))
|
(haskell-mode . lsp))
|
||||||
#+end_src
|
#+end_src
|
||||||
*** COMMENT LISP
|
*** LISP
|
||||||
Programming for Programmers.
|
Programming for Programmers.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
;; (use-package slime
|
|
||||||
;; :init
|
|
||||||
;; (slime-setup '(slime-fancy slime-quicklisp slime-asdf slime-mrepl))
|
|
||||||
;; :config
|
|
||||||
;; (setq inferior-lisp-program "/usr/bin/sbcl")
|
|
||||||
;; (add-hook 'slime-repl-mode-hook 'smartparens-mode))
|
|
||||||
|
|
||||||
(use-package sly
|
(use-package sly
|
||||||
:config
|
:config
|
||||||
(setq inferior-lisp-program "ros -Q run"
|
(setq inferior-lisp-program "ros -Q run"
|
||||||
@@ -814,11 +901,8 @@ Programming for Programmers.
|
|||||||
(add-hook 'lisp-mode-hook
|
(add-hook 'lisp-mode-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(define-key lisp-mode-map (kbd "C-c d") 'sly-documentation))))
|
(define-key lisp-mode-map (kbd "C-c d") 'sly-documentation))))
|
||||||
|
|
||||||
;; (with-eval-after-load 'sly
|
|
||||||
;; (load (expand-file-name "~/.roswell/helper.el")))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
*** COMMENT Lua
|
*** Lua
|
||||||
A simple Python-like language with many implementations.
|
A simple Python-like language with many implementations.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(straight-use-package
|
(straight-use-package
|
||||||
@@ -859,10 +943,41 @@ Installed with OPAM
|
|||||||
(require 'dune)
|
(require 'dune)
|
||||||
(require 'utop)
|
(require 'utop)
|
||||||
#+end_src
|
#+end_src
|
||||||
*** COMMENT Vala
|
*** Typescript
|
||||||
An OOP Language for C & GLib interop.
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package vala-mode)
|
(setenv "PATH" (concat (concat
|
||||||
|
(concat (expand-file-name "~/.bun/bin") ":")
|
||||||
|
(getenv "PATH"))))
|
||||||
|
|
||||||
|
(setq exec-path (append exec-path (list (expand-file-name "~/.bun/bin"))))
|
||||||
|
|
||||||
|
(add-hook 'typescript-ts-mode-hook 'lsp)
|
||||||
|
(add-hook 'tsx-ts-mode-hook 'lsp)
|
||||||
|
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-ts-mode))
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . tsx-ts-mode))
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.json\\'" . json-ts-mode))
|
||||||
|
|
||||||
|
;; Tailwind
|
||||||
|
(use-package lsp-tailwindcss
|
||||||
|
:straight '(lsp-tailwindcss :type git :host github :repo "merrickluo/lsp-tailwindcss")
|
||||||
|
:init (setq lsp-tailwindcss-add-on-mode t)
|
||||||
|
:config
|
||||||
|
(dolist (tw-major-mode
|
||||||
|
'(css-mode
|
||||||
|
css-ts-mode
|
||||||
|
typescript-mode
|
||||||
|
typescript-ts-mode
|
||||||
|
tsx-ts-mode
|
||||||
|
js2-mode
|
||||||
|
js-ts-mode))
|
||||||
|
(add-to-list 'lsp-tailwindcss-major-modes tw-major-mode)))
|
||||||
|
#+end_src
|
||||||
|
*** Zig
|
||||||
|
A systems language with emphasis on metaprogramming.
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package zig-mode
|
||||||
|
:hook (zig-mode . lsp))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Company
|
** Company
|
||||||
@@ -923,6 +1038,31 @@ Add non-lsp completions to the capf.
|
|||||||
(add-hook 'completion-at-point-functions #'yasnippet-capf))
|
(add-hook 'completion-at-point-functions #'yasnippet-capf))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
** Codeium
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(straight-use-package
|
||||||
|
'(codeium :type git :host github :repo "Exafunction/codeium.el"))
|
||||||
|
|
||||||
|
(setq codeium-api-enabled
|
||||||
|
(lambda (api)
|
||||||
|
(memq api '(GetCompletions Heartbeat CancelRequest GetAuthToken RegisterUser auth-redirect AcceptCompletion))))
|
||||||
|
|
||||||
|
(defun my-codeium/document/text ()
|
||||||
|
(buffer-substring-no-properties (max (- (point) 3000) (point-min)) (min (+ (point) 1000) (point-max))))
|
||||||
|
(defun my-codeium/document/cursor_offset ()
|
||||||
|
(codeium-utf8-byte-length
|
||||||
|
(buffer-substring-no-properties (max (- (point) 3000) (point-min)) (point))))
|
||||||
|
(setq codeium/document/text 'my-codeium/document/text)
|
||||||
|
(setq codeium/document/cursor_offset 'my-codeium/document/cursor_offset)
|
||||||
|
|
||||||
|
(defun my/codeium/completion ()
|
||||||
|
"Decouple codeium from other completions"
|
||||||
|
(interactive)
|
||||||
|
(cape-interactive #'codeium-completion-at-point))
|
||||||
|
|
||||||
|
(keymap-global-set "C-c a" 'my/codeium/completion)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** Utilities
|
** Utilities
|
||||||
*** Flycheck
|
*** Flycheck
|
||||||
Syntax checking for Emacs.
|
Syntax checking for Emacs.
|
||||||
@@ -936,6 +1076,13 @@ Syntax checking for Emacs.
|
|||||||
(flycheck-add-next-checker 'c/c++-gcc 'c/c++-cppcheck 'append)
|
(flycheck-add-next-checker 'c/c++-gcc 'c/c++-cppcheck 'append)
|
||||||
(setq flycheck-indication-mode nil)
|
(setq flycheck-indication-mode nil)
|
||||||
(set-face-attribute 'flycheck-warning nil :underline nil)) ;; Disable Warning Underline (NOT WORKING)
|
(set-face-attribute 'flycheck-warning nil :underline nil)) ;; Disable Warning Underline (NOT WORKING)
|
||||||
|
|
||||||
|
(add-to-list 'display-buffer-alist
|
||||||
|
'("\\*Flycheck errors\\*"
|
||||||
|
(display-buffer-reuse-window
|
||||||
|
display-buffer-in-side-window)
|
||||||
|
(side . bottom)
|
||||||
|
(window-height . 0.2))) ;; Set flycheck error list to only take up the bottom 20% of the window
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* User Interface
|
* User Interface
|
||||||
@@ -961,7 +1108,7 @@ Set font for both Monospace and Proportional text.
|
|||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defvar fontconf
|
(defvar fontconf
|
||||||
'((font . "Aporetic Sans Mono")
|
'((font . "Aporetic Sans Mono")
|
||||||
(size . 13)))
|
(size . 11)))
|
||||||
|
|
||||||
(set-face-attribute 'variable-pitch nil
|
(set-face-attribute 'variable-pitch nil
|
||||||
:font (cdr (assoc 'font fontconf))
|
:font (cdr (assoc 'font fontconf))
|
||||||
@@ -1040,13 +1187,28 @@ Bind both scroling and +/- to zooming.
|
|||||||
** Theme
|
** Theme
|
||||||
Set the theme to a nice dark one.
|
Set the theme to a nice dark one.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package ef-themes
|
(use-package kaolin-themes
|
||||||
:config
|
:config
|
||||||
(set-window-margins nil 0))
|
(set-window-margins nil 0))
|
||||||
|
|
||||||
(add-hook 'emacs-startup-hook
|
(add-hook 'emacs-startup-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(load-theme 'ef-bio t)))
|
(load-theme 'kaolin-light t)))
|
||||||
|
|
||||||
|
(defun theme-toggle ()
|
||||||
|
"Toggle between two Emacs themes: doom-one and doom-dracula."
|
||||||
|
(interactive)
|
||||||
|
(let ((theme-a 'kaolin-light)
|
||||||
|
(theme-b 'kaolin-dark))
|
||||||
|
(cond
|
||||||
|
((member theme-a custom-enabled-themes)
|
||||||
|
(disable-theme theme-a)
|
||||||
|
(load-theme theme-b t))
|
||||||
|
((member theme-b custom-enabled-themes)
|
||||||
|
(disable-theme theme-b)
|
||||||
|
(load-theme theme-a t))
|
||||||
|
(t
|
||||||
|
(load-theme theme-a t)))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Niceties
|
** Niceties
|
||||||
@@ -1069,67 +1231,8 @@ Reduce fringe size to 1px.
|
|||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(set-fringe-mode 1)
|
(set-fringe-mode 1)
|
||||||
#+end_src
|
#+end_src
|
||||||
*** Disable Background
|
|
||||||
In no-window mode, disable the background to fit in with terminal theme.
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(defun on-after-init ()
|
|
||||||
(unless (display-graphic-p (selected-frame))
|
|
||||||
(set-face-background 'default "unspecified-bg" (selected-frame))))
|
|
||||||
|
|
||||||
(add-hook 'window-setup-hook 'on-after-init)
|
** Zen Mode
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Modern Looking Emacs
|
|
||||||
*** Org Modern
|
|
||||||
Modern iconography and styling for Org-Mode.
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(use-package org-modern)
|
|
||||||
|
|
||||||
(modify-all-frames-parameters
|
|
||||||
'((right-divider-width . 40)
|
|
||||||
(internal-border-width . 40)))
|
|
||||||
(dolist (face '(window-divider
|
|
||||||
window-divider-first-pixel
|
|
||||||
window-divider-last-pixel))
|
|
||||||
(face-spec-reset-face face)
|
|
||||||
(set-face-foreground face (face-attribute 'default :background)))
|
|
||||||
(set-face-background 'fringe (face-attribute 'default :background))
|
|
||||||
|
|
||||||
|
|
||||||
(setq org-pretty-entities t
|
|
||||||
org-auto-align-tags nil
|
|
||||||
org-tags-column 0
|
|
||||||
org-catch-invisible-edits 'show-and-error
|
|
||||||
org-special-ctrl-a/e t
|
|
||||||
org-insert-heading-respect-content t)
|
|
||||||
|
|
||||||
(add-hook 'org-mode-hook #'org-modern-mode)
|
|
||||||
(add-hook 'org-agenda-finalize-hook #'org-modern-agenda)
|
|
||||||
#+end_src
|
|
||||||
*** Spacious Padding
|
|
||||||
Adds padding around various elements.
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(use-package spacious-padding)
|
|
||||||
|
|
||||||
;; These are the default values, but I keep them here for visibility.
|
|
||||||
(setq spacious-padding-widths
|
|
||||||
'( :internal-border-width 15
|
|
||||||
:header-line-width 4
|
|
||||||
:mode-line-width 6
|
|
||||||
:tab-width 4
|
|
||||||
:right-divider-width 30
|
|
||||||
:scroll-bar-width 8
|
|
||||||
:fringe-width 8))
|
|
||||||
|
|
||||||
;; Read the doc string of `spacious-padding-subtle-mode-line' as it
|
|
||||||
;; is very flexible and provides several examples.
|
|
||||||
(setq spacious-padding-subtle-mode-line
|
|
||||||
`( :mode-line-active 'default
|
|
||||||
:mode-line-inactive vertical-border))
|
|
||||||
|
|
||||||
(spacious-padding-mode 1)
|
|
||||||
#+end_src
|
|
||||||
*** Zen Mode
|
|
||||||
Center the edtior with Olivetti for distraction-free editing.
|
Center the edtior with Olivetti for distraction-free editing.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package olivetti
|
(use-package olivetti
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
(setq gc-cons-threshold 100000000)
|
||||||
|
(setq read-process-output-max (* 1024 1024))
|
||||||
|
(setenv "LSP_USE_PLISTS" "true")
|
||||||
|
(setq-default lsp-use-plists t)
|
||||||
@@ -57,6 +57,7 @@ git_dirty() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set_prompt() {
|
set_prompt() {
|
||||||
|
if [ "$DEVBOX_SHELL_ENABLED" -ne 1 ]; then
|
||||||
local user="${USER_COLOR}%n${RESET_COLOR}"
|
local user="${USER_COLOR}%n${RESET_COLOR}"
|
||||||
local venv=""
|
local venv=""
|
||||||
[[ -n "$VIRTUAL_ENV" ]] && venv="${VENV_COLOR}($(basename $VIRTUAL_ENV))${RESET_COLOR} "
|
[[ -n "$VIRTUAL_ENV" ]] && venv="${VENV_COLOR}($(basename $VIRTUAL_ENV))${RESET_COLOR} "
|
||||||
@@ -71,6 +72,7 @@ set_prompt() {
|
|||||||
|
|
||||||
PROMPT="${user} %F{white}in%f ${venv}${path}${git_info}
|
PROMPT="${user} %F{white}in%f ${venv}${path}${git_info}
|
||||||
${PROMPT_SYMBOL_COLOR}λ${RESET_COLOR} "
|
${PROMPT_SYMBOL_COLOR}λ${RESET_COLOR} "
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
autoload -Uz add-zsh-hook
|
autoload -Uz add-zsh-hook
|
||||||
@@ -84,3 +86,26 @@ source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
|||||||
|
|
||||||
# OPAM for OCaml
|
# OPAM for OCaml
|
||||||
[[ ! -r '/home/venomade/.opam/opam-init/init.zsh' ]] || source '/home/venomade/.opam/opam-init/init.zsh' > /dev/null 2> /dev/null
|
[[ ! -r '/home/venomade/.opam/opam-init/init.zsh' ]] || source '/home/venomade/.opam/opam-init/init.zsh' > /dev/null 2> /dev/null
|
||||||
|
# bun completions
|
||||||
|
[ -s "/home/venomade/.bun/_bun" ] && source "/home/venomade/.bun/_bun"
|
||||||
|
|
||||||
|
# bun
|
||||||
|
# export BUN_INSTALL="$HOME/.bun"
|
||||||
|
# export PATH="$BUN_INSTALL/bin:$PATH"
|
||||||
|
|
||||||
|
# Devbox
|
||||||
|
eval "$(devbox global shellenv)"
|
||||||
|
|
||||||
|
# Function to run emacs based on the presence of devbox.json
|
||||||
|
run_emacs() {
|
||||||
|
if [[ $# -eq 0 ]]; then
|
||||||
|
if [[ -f "devbox.json" ]]; then
|
||||||
|
devbox run emacs &>/dev/null &
|
||||||
|
else
|
||||||
|
emacs
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
command emacs "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
alias emacs='run_emacs'
|
||||||
Reference in new issue
Block a user