Template for hidpi, disable tramp, finally fix indenting

This commit is contained in:
Andrew Scott 2023-06-21 23:29:53 -04:00
parent 7ea4db0b6b
commit 27fe8763da
Signed by: a
GPG key ID: 7CD5A5977E4931C1

View file

@ -58,7 +58,7 @@
;; Store autosaves in $XDG_CACHE_HOME ;; Store autosaves in $XDG_CACHE_HOME
(setq auto-save-file-name-transforms (setq auto-save-file-name-transforms
`((".*" "~/.cache/emacs/autosave/" t))) `((".*" "~/.cache/emacs/autosave/" t)))
;; Default encoding ;; Default encoding
(set-default-coding-systems 'utf-8) (set-default-coding-systems 'utf-8)
@ -142,9 +142,9 @@
(savehist-mode)) (savehist-mode))
;; SSH ;; SSH
(use-package tramp ;; (use-package tramp
:config ;; :config
(setq tramp-default-method "ssh")) ;; (setq tramp-default-method "ssh"))
;; Completion with vertico/consult ;; Completion with vertico/consult
(use-package vertico (use-package vertico
@ -399,13 +399,13 @@
;; Modeline ;; Modeline
(use-package minions (use-package minions
:hook (doom-modeline-mode . minions-mode) :hook (doom-modeline-mode . minions-mode)
(simple-modeline-mode . minions-mode)) (simple-modeline-mode . minions-mode))
(use-package doom-modeline (use-package doom-modeline
:init (doom-modeline-mode) :init (doom-modeline-mode)
:custom :custom
(doom-modeline-height 32) (doom-modeline-height 32)
;(doom-modeline-bar-width .75) ;(doom-modeline-bar-width .75)
(doom-modeline-window-width-limit fill-column) (doom-modeline-window-width-limit fill-column)
(doom-modeline-lsp t) (doom-modeline-lsp t)
(doom-modeline-minor-modes t) (doom-modeline-minor-modes t)
@ -419,13 +419,19 @@
;; Font ;; Font
(use-package mixed-pitch (use-package mixed-pitch
;:hook ;:hook
;(org-mode . mixed-pitch-mode) ;(org-mode . mixed-pitch-mode)
:config :config
{{- if eq .chezmoi.hostname "helix"}}
(set-face-attribute 'default nil :font "Hack" :height 180)
(set-face-attribute 'fixed-pitch nil :font "Hack" :height 180)
(set-face-attribute 'variable-pitch nil :font "DejaVu Sans" :height 200))
{{- else }}
(set-face-attribute 'default nil :font "Hack" :height 90) (set-face-attribute 'default nil :font "Hack" :height 90)
(set-face-attribute 'fixed-pitch nil :font "Hack" :height 90) (set-face-attribute 'fixed-pitch nil :font "Hack" :height 90)
(set-face-attribute 'variable-pitch nil :font "DejaVu Sans" :height 100)) (set-face-attribute 'variable-pitch nil :font "DejaVu Sans" :height 100))
;(add-hook 'mixed-pitch-mode-hook #'solaire-mode-reset) {{- end }}
;(add-hook 'mixed-pitch-mode-hook #'solaire-mode-reset)
;; Icons ;; Icons
(use-package all-the-icons) (use-package all-the-icons)
@ -528,10 +534,10 @@
;; (lsp-rust-analyzer-display-reborrow-hints nil) ;; (lsp-rust-analyzer-display-reborrow-hints nil)
:config :config
(setq lsp-prefer-flymake nil)) ; prefer lsp-ui (flycheck) to flymake (setq lsp-prefer-flymake nil)) ; prefer lsp-ui (flycheck) to flymake
; (setq lsp-disabled-clients '(clangd))) ; prefer ccls to clangd ; (setq lsp-disabled-clients '(clangd))) ; prefer ccls to clangd
; :bind ; :bind
; (:map lsp-mode-map ; (:map lsp-mode-map
; ("TAB" . completion-at-point))) ; ("TAB" . completion-at-point)))
(use-package lsp-ui (use-package lsp-ui
:requires lsp-mode flycheck :requires lsp-mode flycheck
@ -562,7 +568,7 @@
(eval-when-compile (eval-when-compile
(require 'cl-lib)) (require 'cl-lib))
(require 'dap-python) (require 'dap-python)
;(require 'dap-node) ;(require 'dap-node)
(require 'dap-lldb) (require 'dap-lldb)
(require 'dap-gdb-lldb) (require 'dap-gdb-lldb)
(dap-gdb-lldb-setup) (dap-gdb-lldb-setup)
@ -571,14 +577,14 @@
(list :type "lldb" (list :type "lldb"
:request "launch" :request "launch"
:name "LLDB::Run" :name "LLDB::Run"
:gdbpath "rust-lldb")) :gdbpath "rust-lldb"))
:bind :bind
(:map dap-mode-map (:map dap-mode-map
("<f5>" . dap-debug) ("<f5>" . dap-debug)
("<f10>" . dap-next) ("<f10>" . dap-next)
("<f11>" . dap-step-in) ("<f11>" . dap-step-in)
("S-<f5>" . dap-disconnect) ("S-<f5>" . dap-disconnect)
("C-S-<f5>" . dap-debug-restart))) ("C-S-<f5>" . dap-debug-restart)))
(use-package realgud) (use-package realgud)
@ -635,7 +641,7 @@
(use-package js2-mode (use-package js2-mode
:config :config
(add-to-list 'interpreter-mode-alist '("#!/usr/bin/env node" . js2-mode)) (add-to-list 'interpreter-mode-alist '("#!/usr/bin/env node" . js2-mode))
;(setq js2-strict-missing-semi-warning t) ;(setq js2-strict-missing-semi-warning t)
(setq js2-mode-show-strict-warnings t) (setq js2-mode-show-strict-warnings t)
:hook (js-mode . js2-minor-mode)) :hook (js-mode . js2-minor-mode))
@ -643,7 +649,7 @@
:config :config
(setq typescript-indent-level 2) (setq typescript-indent-level 2)
:mode ("\\.ts\\'" . typescript-mode) :mode ("\\.ts\\'" . typescript-mode)
("\\.tsx\\'" . typescript-mode)) ("\\.tsx\\'" . typescript-mode))
;; (use-package restclient ;; (use-package restclient
;; :init ;; :init
@ -692,8 +698,8 @@
:bind ("C-c C-n" . jsdoc)) :bind ("C-c C-n" . jsdoc))
;; LaTeX ;; LaTeX
;(use-package lsp-latex) ;(use-package lsp-latex)
;'(setq lsp-tex-server 'digestif) ;'(setq lsp-tex-server 'digestif)
;; OpenGL / GLSL ;; OpenGL / GLSL
(use-package glsl-mode) (use-package glsl-mode)
@ -706,8 +712,8 @@
(use-package lsp-pyright (use-package lsp-pyright
:hook (python-mode . (lambda () :hook (python-mode . (lambda ()
(require 'lsp-pyright) (require 'lsp-pyright)
(lsp)))) ; or lsp-deferred (lsp)))) ; or lsp-deferred
(use-package numpydoc (use-package numpydoc
:after python :after python
@ -721,11 +727,11 @@
(setq conda-anaconda-home (expand-file-name "/opt/miniconda3")) (setq conda-anaconda-home (expand-file-name "/opt/miniconda3"))
(setq conda-env-home-directory (expand-file-name "~/.conda/envs")) (setq conda-env-home-directory (expand-file-name "~/.conda/envs"))
(conda-env-initialize-interactive-shells) (conda-env-initialize-interactive-shells)
;(conda-env-autoactivate-mode) ;(conda-env-autoactivate-mode)
:hook :hook
('find-file-hook . (lambda () ('find-file-hook . (lambda ()
(when (bound-and-true-p conda-project-env-path) (when (bound-and-true-p conda-project-env-path)
(conda-env-activate-for-buffer))))) (conda-env-activate-for-buffer)))))
;; Rust ;; Rust
(use-package rustic (use-package rustic
@ -742,13 +748,13 @@
("C-c C-c e" . lsp-rust-analyzer-expand-macro) ("C-c C-c e" . lsp-rust-analyzer-expand-macro)
("C-c C-c d" . dap-hydra) ("C-c C-c d" . dap-hydra)
("C-c C-c h" . lsp-ui-doc-glance))) ("C-c C-c h" . lsp-ui-doc-glance)))
;; :config ;; :config
;; uncomment for less flashiness ;; uncomment for less flashiness
;; (setq lsp-eldoc-hook nil) ;; (setq lsp-eldoc-hook nil)
;; (setq lsp-enable-symbol-highlighting nil) ;; (setq lsp-enable-symbol-highlighting nil)
;; (setq lsp-signature-auto-activate nil) ;; (setq lsp-signature-auto-activate nil)
;; comment to disable rustfmt on save ;; comment to disable rustfmt on save
;; (add-hook 'rustic-mode-hook 'rk/rustic-mode-hook)) ;; (add-hook 'rustic-mode-hook 'rk/rustic-mode-hook))
;; (defun rk/rustic-mode-hook () ;; (defun rk/rustic-mode-hook ()
@ -768,9 +774,13 @@
:config :config
(add-to-list 'lsp-language-id-configuration '(zig-mode . "zig")) (add-to-list 'lsp-language-id-configuration '(zig-mode . "zig"))
(lsp-register-client (lsp-register-client
(make-lsp-client (make-lsp-client
:new-connection (lsp-stdio-connection "/usr/bin/zls") :new-connection (lsp-stdio-connection "/usr/bin/zls")
:major-modes '(zig-mode) :major-modes '(zig-mode)
:server-id 'zls))) :server-id 'zls))
:hook
(zig-mode . (lambda ()
(setq-local fill-column 100)
(setq-local tab-width 4))))
;;; End init.el ;;; End init.el