Added: win32 install function & project arguments
This commit is contained in:
parent
d7a1224578
commit
1a5c11dec0
|
|
@ -1,4 +1,3 @@
|
|||
;; rhjr/paths
|
||||
(defconst rhjr/base-config-dir
|
||||
(if (eq system-type 'windows-nt)
|
||||
"C:\\Users\\Rhjr\\AppData\\Roaming\\.emacs.d\\"
|
||||
|
|
@ -137,6 +136,10 @@
|
|||
("C-f" . consult-find)
|
||||
("C-s" . consult-ripgrep))
|
||||
|
||||
:config
|
||||
(setq consult-find-args
|
||||
"find . -not -path \"*/.git/*\"")
|
||||
|
||||
:init
|
||||
;; use consult to select xref locations with preview.
|
||||
(setq xref-show-xrefs-function #'consult-xref
|
||||
|
|
@ -260,6 +263,15 @@
|
|||
;;rhjr/comp
|
||||
(setq compilation-directory-locked nil)
|
||||
|
||||
(defvar project-command-arg nil
|
||||
"Stored argument used by project commands.")
|
||||
|
||||
(defun set-project-command-arg (arg)
|
||||
"Set and remember ARG for project commands."
|
||||
(interactive "sSet project argument: ")
|
||||
(setq project-command-arg arg)
|
||||
(message "Project argument set to: %s" project-command-arg))
|
||||
|
||||
(defun find-project-directory-recursive (command)
|
||||
"Recursively search upward until COMMAND exists."
|
||||
(if (file-exists-p command)
|
||||
|
|
@ -289,32 +301,41 @@
|
|||
(setq last-compilation-directory default-directory))))
|
||||
|
||||
(defun run-project-command (command)
|
||||
"Run COMMAND from the project root without prompting."
|
||||
"Run COMMAND from the project root using stored argument."
|
||||
(interactive)
|
||||
(find-project-directory command)
|
||||
(compile command)
|
||||
(compile
|
||||
(if project-command-arg
|
||||
(concat command " " project-command-arg)
|
||||
command))
|
||||
(other-window 1))
|
||||
|
||||
(global-set-key [f1] (lambda () (interactive)
|
||||
(run-project-command "./build.sh")))
|
||||
(run-project-command "build.bat")))
|
||||
|
||||
(global-set-key [f2] (lambda () (interactive)
|
||||
(run-project-command "./start.sh")))
|
||||
(run-project-command "start.bat")))
|
||||
|
||||
(global-set-key [f3] #'set-project-command-arg)
|
||||
|
||||
;;rhjr/fix
|
||||
(setq minibuffer-prompt-properties ;; cursor in minibuffer-prompt
|
||||
'(read-only t cursor-intangible t face minibuffer-prompt))
|
||||
(add-hook 'minibuffer-setup-hook #'cursor-intangible-mode)
|
||||
|
||||
;;;rhjr/styling
|
||||
(set-face-attribute 'default nil
|
||||
:family "Consolas"
|
||||
:height 150
|
||||
:weight 'normal)
|
||||
|
||||
(custom-set-variables
|
||||
;; custom-set-variables was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(package-selected-packages
|
||||
'(cape consult corfu corfu-candidate-overlay gruber-darker-theme
|
||||
highlight-parentheses magit orderless vertico)))
|
||||
'(cape consult corfu corfu-candidate-overlay gruber-darker-theme highlight-parentheses magit orderless vertico)))
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
@echo off
|
||||
set SOURCE=%USERPROFILE%\AppData\Roaming\dotfiles\.config\emacs
|
||||
set DEST=%USERPROFILE%\Appdata\Roaming\.emacs.d
|
||||
|
||||
if not exist "%SOURCE%" (
|
||||
echo Source directory does not exist: %SOURCE%
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if not exist "%DEST%" (
|
||||
mkdir "%DEST%"
|
||||
)
|
||||
|
||||
xcopy "%SOURCE%\*" "%DEST%\" /E /I /Y /H
|
||||
|
||||
echo Copy completed.
|
||||
Loading…
Reference in New Issue
Block a user