Updated dotfiles
This commit is contained in:
parent
5af5ca7e8b
commit
2b67eaead4
1 changed files with 60 additions and 4 deletions
64
.emacs.el
64
.emacs.el
|
|
@ -1,6 +1,62 @@
|
|||
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes")
|
||||
(load-theme 'dracula t)
|
||||
(require 'package)
|
||||
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
|
||||
|
||||
(require 'ansi-color)
|
||||
(add-hook 'compilation-filter-hook 'ansi-color-compilation-filter)
|
||||
(use-package dracula-theme
|
||||
:ensure t
|
||||
:config (load-theme 'dracula t))
|
||||
|
||||
(use-package eglot-inactive-regions
|
||||
:ensure t)
|
||||
|
||||
(require 'eglot)
|
||||
(add-hook 'c-mode-hook 'eglot-ensure)
|
||||
|
||||
(custom-set-faces
|
||||
;; custom-set-faces 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.
|
||||
)
|
||||
|
||||
(defun open-init-file ()
|
||||
"Open the user's init file."
|
||||
(interactive)
|
||||
(find-file "~/.emacs.el"))
|
||||
|
||||
(global-set-key (kbd "C-c e") 'open-init-file)
|
||||
|
||||
|
||||
(defun open-test-file ()
|
||||
"Open the user's init file."
|
||||
(interactive)
|
||||
(find-file "~/programming/c-testing/emacstest.c"))
|
||||
|
||||
(global-set-key (kbd "C-c d") 'open-test-file)
|
||||
|
||||
|
||||
|
||||
(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 '(dracula-theme eglot eglot-inactive-regions)))
|
||||
|
||||
(global-set-key (kbd "C-c f") 'eglot-code-actions)
|
||||
|
||||
(global-set-key (kbd "C-c c") 'compile)
|
||||
|
||||
;; Ensure eldoc displays in a side window
|
||||
(setq eldoc-in-side-window-mode t)
|
||||
|
||||
;; Set up the display buffer alist to open new buffers in a vertical split
|
||||
(add-to-list 'display-buffer-alist
|
||||
'(.* "\\*eldoc\\*" (side . right) (slot . 0) (window-width . 0.3) (reusable-frames . nil)))
|
||||
|
||||
;; Ensure eldoc is triggered correctly
|
||||
(add-hook 'c-mode-hook 'eldoc-mode)
|
||||
(add-hook 'python-mode-hook 'eldoc-mode)
|
||||
|
||||
;; Function to ensure new windows are split vertically if possible, otherwise horizontally
|
||||
(setq split-height-threshold 0)
|
||||
(setq split-width-threshold (1- (window-width)))
|
||||
|
|
|
|||
Loading…
Reference in a new issue