first commit
This commit is contained in:
commit
24d307ae8e
49 changed files with 705 additions and 0 deletions
4
src/modules/built-in/eglot.el
Normal file
4
src/modules/built-in/eglot.el
Normal file
|
@ -0,0 +1,4 @@
|
|||
(use-package eglot
|
||||
:config
|
||||
(add-to-list 'eglot-server-programs
|
||||
'(php-ts-mode . ("phpactor" "language-server"))))
|
6
src/modules/built-in/eglot.org
Normal file
6
src/modules/built-in/eglot.org
Normal file
|
@ -0,0 +1,6 @@
|
|||
#+begin_src elisp
|
||||
(use-package eglot
|
||||
:config
|
||||
(add-to-list 'eglot-server-programs
|
||||
'(php-ts-mode . ("phpactor" "language-server"))))
|
||||
#+end_src
|
56
src/modules/built-in/emacs.el
Normal file
56
src/modules/built-in/emacs.el
Normal file
|
@ -0,0 +1,56 @@
|
|||
(use-package emacs
|
||||
:bind
|
||||
(("C-c f f" . toggle-frame-fullscreen))
|
||||
:config
|
||||
;; Disable tool-bar
|
||||
(tool-bar-mode -1)
|
||||
|
||||
;; Enable horizontal mouse scroll
|
||||
(setq mouse-wheel-tilt-scroll t)
|
||||
|
||||
;; Enable electric indent mode
|
||||
(electric-pair-mode t)
|
||||
|
||||
;; Switch meta command key
|
||||
(setq mac-command-modifier 'meta)
|
||||
|
||||
;; Enable which-key
|
||||
(which-key-mode)
|
||||
|
||||
;; Enable completion preview
|
||||
;;(global-completion-preview-mode)
|
||||
|
||||
;; Set font
|
||||
(set-face-attribute 'default t :font "JetBrains Mono" :height 120)
|
||||
|
||||
;; Fontify code blocks in markdown mode
|
||||
;;(setq markdown-fontify-code-blocks-natively t)
|
||||
|
||||
;; Enable SPC option in minibuffer
|
||||
;;(define-key minibuffer-local-completion-map (kbd "SPC") 'self-insert-command)
|
||||
|
||||
;; Disable native comp warnings
|
||||
(setq native-comp-async-report-warnings-errors 'silent)
|
||||
|
||||
;; Save history of minibuffer
|
||||
(savehist-mode)
|
||||
|
||||
;; Set cursor type
|
||||
(setq-default cursor-type 'bar)
|
||||
|
||||
;; Automatically reread from disk if the underlying file changes
|
||||
(setq auto-revert-interval 1)
|
||||
(setq auto-revert-check-vc-info t)
|
||||
(global-auto-revert-mode)
|
||||
|
||||
;; Don't litter file system with *~ backup files; put them all inside
|
||||
(defun my--backup-file-name (fpath)
|
||||
"Return a new file path of a given file path. If the new path's directories does not exist, create them."
|
||||
(let* ((backupRootDir "~/.config/emacs/emacs-backup/")
|
||||
(filePath (replace-regexp-in-string "[A-Za-z]:" "" fpath )) ; remove Windows driver letter in path
|
||||
(backupFilePath (replace-regexp-in-string "//" "/" (concat backupRootDir filePath "~") )))
|
||||
(make-directory (file-name-directory backupFilePath) (file-name-directory backupFilePath))
|
||||
backupFilePath))
|
||||
(setq make-backup-file-name-function 'my--backup-file-name)
|
||||
|
||||
)
|
58
src/modules/built-in/emacs.org
Normal file
58
src/modules/built-in/emacs.org
Normal file
|
@ -0,0 +1,58 @@
|
|||
#+begin_src elisp
|
||||
(use-package emacs
|
||||
:bind
|
||||
(("C-c f f" . toggle-frame-fullscreen))
|
||||
:config
|
||||
;; Disable tool-bar
|
||||
(tool-bar-mode -1)
|
||||
|
||||
;; Enable horizontal mouse scroll
|
||||
(setq mouse-wheel-tilt-scroll t)
|
||||
|
||||
;; Enable electric indent mode
|
||||
(electric-pair-mode t)
|
||||
|
||||
;; Switch meta command key
|
||||
(setq mac-command-modifier 'meta)
|
||||
|
||||
;; Enable which-key
|
||||
(which-key-mode)
|
||||
|
||||
;; Enable completion preview
|
||||
;;(global-completion-preview-mode)
|
||||
|
||||
;; Set font
|
||||
(set-face-attribute 'default t :font "JetBrains Mono" :height 120)
|
||||
|
||||
;; Fontify code blocks in markdown mode
|
||||
;;(setq markdown-fontify-code-blocks-natively t)
|
||||
|
||||
;; Enable SPC option in minibuffer
|
||||
;;(define-key minibuffer-local-completion-map (kbd "SPC") 'self-insert-command)
|
||||
|
||||
;; Disable native comp warnings
|
||||
(setq native-comp-async-report-warnings-errors 'silent)
|
||||
|
||||
;; Save history of minibuffer
|
||||
(savehist-mode)
|
||||
|
||||
;; Set cursor type
|
||||
(setq-default cursor-type 'bar)
|
||||
|
||||
;; Automatically reread from disk if the underlying file changes
|
||||
(setq auto-revert-interval 1)
|
||||
(setq auto-revert-check-vc-info t)
|
||||
(global-auto-revert-mode)
|
||||
|
||||
;; Don't litter file system with *~ backup files; put them all inside
|
||||
(defun my--backup-file-name (fpath)
|
||||
"Return a new file path of a given file path. If the new path's directories does not exist, create them."
|
||||
(let* ((backupRootDir "~/.config/emacs/emacs-backup/")
|
||||
(filePath (replace-regexp-in-string "[A-Za-z]:" "" fpath )) ; remove Windows driver letter in path
|
||||
(backupFilePath (replace-regexp-in-string "//" "/" (concat backupRootDir filePath "~") )))
|
||||
(make-directory (file-name-directory backupFilePath) (file-name-directory backupFilePath))
|
||||
backupFilePath))
|
||||
(setq make-backup-file-name-function 'my--backup-file-name)
|
||||
|
||||
)
|
||||
#+end_src
|
5
src/modules/built-in/hyperbole.el
Normal file
5
src/modules/built-in/hyperbole.el
Normal file
|
@ -0,0 +1,5 @@
|
|||
(use-package hyperbole
|
||||
:ensure t
|
||||
:defer t
|
||||
:config
|
||||
(hyperbole-mode 1))
|
8
src/modules/built-in/hyperbole.org
Normal file
8
src/modules/built-in/hyperbole.org
Normal file
|
@ -0,0 +1,8 @@
|
|||
#+begin_src elisp
|
||||
(use-package hyperbole
|
||||
:ensure t
|
||||
:defer t
|
||||
:config
|
||||
(hyperbole-mode 1))
|
||||
|
||||
#+end_src
|
34
src/modules/built-in/org.el
Normal file
34
src/modules/built-in/org.el
Normal file
|
@ -0,0 +1,34 @@
|
|||
(use-package org-contrib
|
||||
:ensure t)
|
||||
|
||||
(use-package ob-php
|
||||
:ensure t)
|
||||
|
||||
(use-package org
|
||||
:config
|
||||
|
||||
(require 'org-tempo)
|
||||
(setq org-src-preserve-indentation nil
|
||||
org-edit-src-content-indentation 0)
|
||||
|
||||
;; active Babel languages
|
||||
(org-babel-do-load-languages
|
||||
'org-babel-load-languages
|
||||
'((php . t)
|
||||
(scheme . t)))
|
||||
;;(verb . t)))
|
||||
|
||||
(add-to-list 'org-src-lang-modes '("php" . php-ts))
|
||||
|
||||
(setq org-src-fontify-natively t
|
||||
;;org-src-tab-acts-natively t
|
||||
org-confirm-babel-evaluate nil
|
||||
;;org-edit-src-content-indentation 0
|
||||
)
|
||||
(setq org-agenda-files (directory-files-recursively "/Users/cnelson/.org" "\\.org$"))
|
||||
(eval-after-load "org"
|
||||
'(require 'ox-md nil t))
|
||||
)
|
||||
|
||||
(use-package htmlize
|
||||
:ensure t)
|
45
src/modules/built-in/org.org
Normal file
45
src/modules/built-in/org.org
Normal file
|
@ -0,0 +1,45 @@
|
|||
#+begin_src elisp
|
||||
(use-package org-contrib
|
||||
:ensure t)
|
||||
#+end_src
|
||||
|
||||
#+begin_src elisp
|
||||
(use-package ob-php
|
||||
:ensure t)
|
||||
#+end_src
|
||||
|
||||
|
||||
#+begin_src elisp
|
||||
(use-package org
|
||||
:config
|
||||
|
||||
(require 'org-tempo)
|
||||
(setq org-src-preserve-indentation nil
|
||||
org-edit-src-content-indentation 0)
|
||||
|
||||
;; active Babel languages
|
||||
(org-babel-do-load-languages
|
||||
'org-babel-load-languages
|
||||
'((php . t)
|
||||
(scheme . t)))
|
||||
;;(verb . t)))
|
||||
|
||||
(add-to-list 'org-src-lang-modes '("php" . php-ts))
|
||||
|
||||
(setq org-src-fontify-natively t
|
||||
;;org-src-tab-acts-natively t
|
||||
org-confirm-babel-evaluate nil
|
||||
;;org-edit-src-content-indentation 0
|
||||
)
|
||||
(setq org-agenda-files (directory-files-recursively "/Users/cnelson/.org" "\\.org$"))
|
||||
(eval-after-load "org"
|
||||
'(require 'ox-md nil t))
|
||||
)
|
||||
|
||||
#+end_src
|
||||
|
||||
#+begin_src elisp
|
||||
(use-package htmlize
|
||||
:ensure t)
|
||||
|
||||
#+end_src
|
6
src/modules/built-in/tree-sitter.el
Normal file
6
src/modules/built-in/tree-sitter.el
Normal file
|
@ -0,0 +1,6 @@
|
|||
(use-package treesit
|
||||
:config
|
||||
(setq treesit-language-source-alist
|
||||
'(;;(php "https://github.com/tree-sitter/tree-sitter-php" "master" "php/src")
|
||||
;;(dockerfile "https://github.com/camdencheek/tree-sitter-dockerfile" "main" "src")
|
||||
(yaml "https://github.com/ikatyang/tree-sitter-yaml" "master" "src"))))
|
8
src/modules/built-in/tree-sitter.org
Normal file
8
src/modules/built-in/tree-sitter.org
Normal file
|
@ -0,0 +1,8 @@
|
|||
#+BEGIN_SRC elisp
|
||||
(use-package treesit
|
||||
:config
|
||||
(setq treesit-language-source-alist
|
||||
'(;;(php "https://github.com/tree-sitter/tree-sitter-php" "master" "php/src")
|
||||
;;(dockerfile "https://github.com/camdencheek/tree-sitter-dockerfile" "main" "src")
|
||||
(yaml "https://github.com/ikatyang/tree-sitter-yaml" "master" "src"))))
|
||||
#+END_SRC
|
Loading…
Add table
Add a link
Reference in a new issue