adding dev environment stuff

This commit is contained in:
2025-11-25 11:22:55 -05:00
parent 69aeca9282
commit 7ea4b2fe8b
3 changed files with 319 additions and 1 deletions

133
dev-settings-work.el Normal file
View File

@@ -0,0 +1,133 @@
;;; dev-settings-work.el --- Work-specific development configuration (Windows)
;;; C# Configuration
(use-package csharp-mode
:hook (csharp-mode . lsp-deferred)
:config
(setq lsp-csharp-server-path nil) ; Use omnisharp from PATH
;; Configure for .NET development
(add-to-list 'auto-mode-alist '("\\.cs\\'" . csharp-mode)))
;; OmniSharp for C# LSP
;; Install via: dotnet tool install --global csharp-ls
;; Or use omnisharp-roslyn: choco install omnisharp
(use-package lsp-mode
:config
(setq lsp-csharp-server-path "csharp-ls")) ; or "omnisharp"
;; DAP for .NET debugging (uses vsdbg from VS Code)
(use-package dap-mode
:config
(require 'dap-netcore)
(setq dap-netcore-install-dir (expand-file-name "~/.emacs.d/.extension/vscode/ms-dotnettools.csharp"))
;; This uses the netcoredbg that comes with VS Code C# extension
;; You may need to adjust the path based on your VS Code installation
)
;;; Python Configuration
(use-package python-mode
:hook (python-mode . lsp-deferred)
:config
(setq python-shell-interpreter "python3"))
;; Python LSP server (install: pip install python-lsp-server)
(use-package lsp-pyright
:hook (python-mode . (lambda ()
(require 'lsp-pyright)
(lsp-deferred))))
;; Python debugging
(use-package dap-mode
:config
(require 'dap-python)
;; Assumes debugpy is installed: pip install debugpy
(setq dap-python-debugger 'debugpy))
;; Python virtual environment support
(use-package pyvenv
:config
(pyvenv-mode 1))
;;; JavaScript/TypeScript Configuration
(use-package js2-mode
:mode "\\.js\\'"
:hook (js2-mode . lsp-deferred)
:config
(setq js2-basic-offset 2
js2-bounce-indent-p nil))
(use-package typescript-mode
:mode "\\.ts\\'"
:hook (typescript-mode . lsp-deferred)
:config
(setq typescript-indent-level 2))
;; TSX support
(use-package typescript-mode
:mode "\\.tsx\\'"
:config
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-mode)))
;; Enhanced JavaScript/TypeScript editing
(use-package tide
:after (typescript-mode company flycheck)
:hook ((typescript-mode . tide-setup)
(typescript-mode . tide-hl-identifier-mode)
(js2-mode . tide-setup)
(js2-mode . tide-hl-identifier-mode)))
;;; Node.js Configuration
;; NPM package management
(use-package npm-mode
:hook (js2-mode typescript-mode))
;; Node.js REPL
(use-package nodejs-repl
:bind (:map js2-mode-map
("C-c C-z" . nodejs-repl)
:map typescript-mode-map
("C-c C-z" . nodejs-repl)))
;; JSON support (common in Node.js projects)
(use-package json-mode
:mode "\\.json\\'")
;;; Additional Web Development Tools
;; Web mode for HTML/JSX/template files
(use-package web-mode
:mode ("\\.html\\'"
"\\.jsx\\'"
"\\.vue\\'")
:config
(setq web-mode-markup-indent-offset 2
web-mode-css-indent-offset 2
web-mode-code-indent-offset 2))
;; CSS/SCSS
(use-package css-mode
:ensure nil
:mode "\\.css\\'"
:config
(setq css-indent-offset 2))
(use-package scss-mode
:mode "\\.scss\\'"
:config
(setq scss-compile-at-save nil))
;; REST client for API testing
(use-package restclient
:mode ("\\.http\\'" . restclient-mode))
;;; LSP Configuration for Windows paths
(when (eq system-type 'windows-nt)
(setq lsp-javascript-typescript-server "typescript-language-server"
lsp-clients-typescript-server-args '("--stdio")))
(provide 'dev-settings-work)
;;; dev-settings-work.el ends here