135 lines
3.4 KiB
EmacsLisp
135 lines
3.4 KiB
EmacsLisp
;;; dev-settings-work.el --- Work-specific development configuration (Windows)
|
|
|
|
;;; C# Configuration
|
|
|
|
(use-package csharp-mode
|
|
:defer t
|
|
:hook (csharp-mode . lsp-deferred)
|
|
:config
|
|
;; C# LSP server configuration
|
|
;; Install via: dotnet tool install --global csharp-ls
|
|
;; Or use omnisharp-roslyn: choco install omnisharp
|
|
(setq lsp-csharp-server-path "csharp-ls") ; or "omnisharp" or nil to use from PATH
|
|
(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"))
|
|
;; 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
|
|
:defer t
|
|
:hook (python-mode . lsp-deferred)
|
|
:config
|
|
(setq python-shell-interpreter "python3"))
|
|
|
|
;; Python LSP server (install: pip install python-lsp-server)
|
|
(use-package lsp-pyright
|
|
:defer t
|
|
:hook (python-mode . (lambda ()
|
|
(require 'lsp-pyright)
|
|
(lsp-deferred))))
|
|
|
|
;; Python debugging configuration
|
|
(with-eval-after-load 'dap-mode
|
|
(require 'dap-python)
|
|
;; Assumes debugpy is installed: pip install debugpy
|
|
(setq dap-python-debugger 'debugpy))
|
|
|
|
;; Python virtual environment support
|
|
(use-package pyvenv
|
|
:defer t
|
|
:config
|
|
(pyvenv-mode 1))
|
|
|
|
;;; JavaScript/TypeScript Configuration
|
|
|
|
(use-package js2-mode
|
|
:defer t
|
|
:mode "\\.js\\'"
|
|
:hook (js2-mode . lsp-deferred)
|
|
:config
|
|
(setq js2-basic-offset 2
|
|
js2-bounce-indent-p nil))
|
|
|
|
(use-package typescript-mode
|
|
:defer t
|
|
:mode ("\\.ts\\'" "\\.tsx\\'")
|
|
:hook (typescript-mode . lsp-deferred)
|
|
:config
|
|
(setq typescript-indent-level 2))
|
|
|
|
;; Enhanced JavaScript/TypeScript editing
|
|
(use-package tide
|
|
:defer t
|
|
: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
|
|
:defer t
|
|
:hook (js2-mode typescript-mode))
|
|
|
|
;; Node.js REPL
|
|
(use-package nodejs-repl
|
|
:defer t
|
|
: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
|
|
:defer t
|
|
:mode "\\.json\\'")
|
|
|
|
;;; Additional Web Development Tools
|
|
|
|
;; Web mode for HTML/JSX/template files
|
|
(use-package web-mode
|
|
:defer t
|
|
: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
|
|
:defer t
|
|
:mode "\\.css\\'"
|
|
:config
|
|
(setq css-indent-offset 2))
|
|
|
|
(use-package scss-mode
|
|
:defer t
|
|
:mode "\\.scss\\'"
|
|
:config
|
|
(setq scss-compile-at-save nil))
|
|
|
|
;; REST client for API testing
|
|
(use-package restclient
|
|
:defer t
|
|
: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
|