adding new configs back

This commit is contained in:
2026-01-23 14:45:07 -05:00
parent 0257340cd8
commit 1fa2c0f6c7
5 changed files with 69 additions and 188 deletions

View File

@@ -1,96 +0,0 @@
;;; dev-settings-work.el --- Work-specific development configuration (Windows)
;;; C# Configuration
(use-package csharp-mode
:defer t
:hook (csharp-mode . eglot-ensure)
:config
;; C# LSP server configuration
;; Install via: dotnet tool install --global csharp-ls
(add-to-list 'eglot-server-programs
'(csharp-mode . ("csharp-ls")))
(add-to-list 'auto-mode-alist '("\\.cs\\'" . csharp-mode)))
;; DAP for .NET debugging
(with-eval-after-load 'dap-mode
(require 'dap-netcore)
(setq dap-netcore-install-dir (expand-file-name "~/.emacs.d/.extension/vscode/ms-dotnettools.csharp")))
;;; Python Configuration
(use-package python-ts-mode
:ensure nil ; Built-in with tree-sitter
:mode "\\.py\\'"
:hook (python-ts-mode . eglot-ensure)
:config
(setq python-shell-interpreter "python3"))
;; Python debugging configuration
(with-eval-after-load 'dap-mode
(require 'dap-python)
(setq dap-python-debugger 'debugpy))
;; Python virtual environment support
(use-package pyvenv
:defer t
:commands (pyvenv-activate pyvenv-workon))
;;; JavaScript/TypeScript Configuration
;; Use built-in js-mode with eglot (no js2-mode needed)
(use-package js-mode
:ensure nil ; Built-in
:mode "\\.js\\'"
:hook (js-mode . eglot-ensure)
:config
(setq js-indent-level 2))
;; TypeScript with tree-sitter
(use-package typescript-ts-mode
:ensure nil ; Built-in with tree-sitter
:mode (("\\.ts\\'" . typescript-ts-mode)
("\\.tsx\\'" . tsx-ts-mode))
:hook ((typescript-ts-mode . eglot-ensure)
(tsx-ts-mode . eglot-ensure))
:config
(setq typescript-ts-mode-indent-offset 2))
;;; Node.js Configuration
;; Node.js REPL
(use-package nodejs-repl
:defer t
:commands nodejs-repl)
;; JSON support
(use-package json-ts-mode
:ensure nil ; Built-in with tree-sitter
:mode "\\.json\\'")
;;; Additional Web Development Tools
;; Web mode for HTML/JSX/template files
(use-package web-mode
:defer t
:mode ("\\.html\\'"
"\\.vue\\'")
:config
(setq web-mode-markup-indent-offset 2
web-mode-css-indent-offset 2
web-mode-code-indent-offset 2))
;; CSS with tree-sitter
(use-package css-ts-mode
:ensure nil ; Built-in with tree-sitter
:mode "\\.css\\'"
:config
(setq css-indent-offset 2))
;; REST client for API testing
(use-package restclient
:defer t
:mode ("\\.http\\'" . restclient-mode))
(provide 'dev-settings-work)
;;; dev-settings-work.el ends here

View File

@@ -158,32 +158,32 @@
:after yasnippet)
;;; LSP Keybindings
(with-eval-after-load 'general
(rh/leader-keys
"g" '(:ignore t :which-key "lsp/go-to")
"gd" '(xref-find-definitions :which-key "go to definition")
"gr" '(xref-find-references :which-key "find references")
"gi" '(eglot-find-implementation :which-key "go to implementation")
"gt" '(eglot-find-typeDefinition :which-key "go to type definition")
"gh" '(eldoc-doc-buffer :which-key "show documentation")
"gs" '(eldoc :which-key "signature help")
"ga" '(eglot-code-actions :which-key "code actions")
"gn" '(eglot-rename :which-key "rename symbol")
"ge" '(flymake-show-buffer-diagnostics :which-key "show diagnostics")
"gf" '(eglot-format-buffer :which-key "format buffer")
;; Standard Emacs bindings for LSP/Eglot features
(with-eval-after-load 'eglot
(define-key eglot-mode-map (kbd "C-c l d") 'xref-find-definitions)
(define-key eglot-mode-map (kbd "C-c l r") 'xref-find-references)
(define-key eglot-mode-map (kbd "C-c l i") 'eglot-find-implementation)
(define-key eglot-mode-map (kbd "C-c l t") 'eglot-find-typeDefinition)
(define-key eglot-mode-map (kbd "C-c l h") 'eldoc-doc-buffer)
(define-key eglot-mode-map (kbd "C-c l s") 'eldoc)
(define-key eglot-mode-map (kbd "C-c l a") 'eglot-code-actions)
(define-key eglot-mode-map (kbd "C-c l n") 'eglot-rename)
(define-key eglot-mode-map (kbd "C-c l e") 'flymake-show-buffer-diagnostics)
(define-key eglot-mode-map (kbd "C-c l f") 'eglot-format-buffer))
"d" '(:ignore t :which-key "debug")
"dd" '(dap-debug :which-key "start debugging")
"db" '(dap-breakpoint-toggle :which-key "toggle breakpoint")
"dc" '(dap-continue :which-key "continue")
"dn" '(dap-next :which-key "step over")
"di" '(dap-step-in :which-key "step into")
"do" '(dap-step-out :which-key "step out")
"dr" '(dap-restart-frame :which-key "restart")
"dq" '(dap-disconnect :which-key "quit/disconnect")
"de" '(dap-eval :which-key "eval expression")
"dl" '(dap-ui-locals :which-key "show locals")
"ds" '(dap-ui-sessions :which-key "show sessions")))
;; Standard Emacs bindings for DAP debugging
(with-eval-after-load 'dap-mode
(define-key dap-mode-map (kbd "C-c d d") 'dap-debug)
(define-key dap-mode-map (kbd "C-c d b") 'dap-breakpoint-toggle)
(define-key dap-mode-map (kbd "C-c d c") 'dap-continue)
(define-key dap-mode-map (kbd "C-c d n") 'dap-next)
(define-key dap-mode-map (kbd "C-c d i") 'dap-step-in)
(define-key dap-mode-map (kbd "C-c d o") 'dap-step-out)
(define-key dap-mode-map (kbd "C-c d r") 'dap-restart-frame)
(define-key dap-mode-map (kbd "C-c d q") 'dap-disconnect)
(define-key dap-mode-map (kbd "C-c d e") 'dap-eval)
(define-key dap-mode-map (kbd "C-c d l") 'dap-ui-locals)
(define-key dap-mode-map (kbd "C-c d s") 'dap-ui-sessions))
;;; Conditional loading of work-specific settings (Windows only)
(when (eq system-type 'windows-nt)

70
init.el
View File

@@ -8,8 +8,7 @@
(setq visible-bell t) ;; visual indicator instead of noise on bells
;;line numbers - relative
(setq display-line-numbers-type 'relative)
;;line numbers - standard
(global-display-line-numbers-mode)
;;disable file backups
@@ -107,70 +106,6 @@
;; Make ESC quit prompts
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
(use-package general
:config
(general-create-definer rh/leader-keys
:keymaps '(normal insert visual emacs)
:prefix "SPC"
:global-prefix "C-SPC")
(rh/leader-keys
"t" '(:ignore t :which-key "toggles")
"tt" '(consult-theme :which-key "choose theme")
"f" '(:ignore t :which-key "files")
"ff" '(find-file :which-key "find file")
"fr" '(consult-recent-file :which-key "recent files")
"fb" '(consult-buffer :which-key "switch buffer")
"o" '(:ignore t :which-key "org")
"oa" '(org-agenda :which-key "agenda")
"oc" '(org-capture :which-key "capture")
"ol" '(org-store-link :which-key "store link")
"oi" '(org-insert-link :which-key "insert link")
"ot" '(org-todo :which-key "cycle todo")
"os" '(org-schedule :which-key "schedule")
"od" '(org-deadline :which-key "deadline")
"oT" '(org-time-stamp :which-key "timestamp")
"op" '(org-priority :which-key "priority")
"ox" '(org-toggle-checkbox :which-key "toggle checkbox")
"o-" '(org-ctrl-c-minus :which-key "insert item/cycle list type")
"or" '(org-refile :which-key "refile")))
(use-package evil
:init
(setq evil-want-integration t)
(setq evil-want-keybinding nil)
(setq evil-want-C-u-scroll t)
(setq evil-want-C-i-jump nil)
:config
(evil-mode 1)
(define-key evil-insert-state-map (kbd "C-g") 'evil-normal-state)
(define-key evil-insert-state-map (kbd "C-h") 'evil-delete-backward-char-and-join)
;; Use visual line motions even outside of visual-line-mode buffers
(evil-global-set-key 'motion "j" 'evil-next-visual-line)
(evil-global-set-key 'motion "k" 'evil-previous-visual-line)
(evil-set-initial-state 'messages-buffer-mode 'normal)
(evil-set-initial-state 'dashboard-mode 'normal))
(use-package evil-collection
:after evil
:config
(evil-collection-init))
(use-package hydra)
(defhydra hydra-text-scale (:timeout 4)
"scale text"
("j" text-scale-increase "in")
("k" text-scale-decrease "out")
("f" nil "finished" :exit t))
(rh/leader-keys
"ts" '(hydra-text-scale/body :which-key "scale text"))
;; Projectile Configuration ----------------------------------------------------
(use-package projectile
@@ -228,5 +163,8 @@
:config
(setq org-agenda-files (directory-files-recursively "~/org" "\\.org$")))
;; Load standard Emacs-style keybindings
(load (expand-file-name "org-bindings.el" user-emacs-directory))
;; Development Environment -----------------------------------------------------
(load (expand-file-name "dev-settings.el" user-emacs-directory))

38
org-bindings.el Normal file
View File

@@ -0,0 +1,38 @@
;;; org-bindings.el --- Standard Emacs keybindings for Org mode
;; Standard Emacs-style bindings for common Org commands
;; These replace the SPC-based leader key bindings
(with-eval-after-load 'org
;; Org agenda and capture
(global-set-key (kbd "C-c o a") 'org-agenda)
(global-set-key (kbd "C-c o c") 'org-capture)
;; Link commands
(define-key org-mode-map (kbd "C-c o l") 'org-store-link)
(define-key org-mode-map (kbd "C-c o i") 'org-insert-link)
;; TODO and scheduling
(define-key org-mode-map (kbd "C-c o t") 'org-todo)
(define-key org-mode-map (kbd "C-c o s") 'org-schedule)
(define-key org-mode-map (kbd "C-c o d") 'org-deadline)
(define-key org-mode-map (kbd "C-c o T") 'org-time-stamp)
(define-key org-mode-map (kbd "C-c o p") 'org-priority)
;; Checkboxes and lists
(define-key org-mode-map (kbd "C-c o x") 'org-toggle-checkbox)
(define-key org-mode-map (kbd "C-c o -") 'org-ctrl-c-minus)
;; Refile
(define-key org-mode-map (kbd "C-c o r") 'org-refile))
;; Theme selection
(global-set-key (kbd "C-c t t") 'consult-theme)
;; Text scaling with standard Emacs bindings
(global-set-key (kbd "C-x C-=") 'text-scale-increase)
(global-set-key (kbd "C-x C--") 'text-scale-decrease)
(global-set-key (kbd "C-x C-0") 'text-scale-adjust)
(provide 'org-bindings)
;;; org-bindings.el ends here

1
projectile-bookmarks.eld Normal file
View File

@@ -0,0 +1 @@
nil