emacs: org roam customizations
This commit is contained in:
parent
74ddb685f1
commit
06293fe85e
@ -112,6 +112,30 @@
|
||||
(map! :map org-mode-map :nvi "C-j" #'org-forward-element)
|
||||
(map! :map org-mode-map :nvi "C-h" #'org-up-element)
|
||||
(map! :map org-mode-map :nvi "C-l" #'org-down-element)
|
||||
|
||||
(map! :map org-mode-map :nvi "M-i" #'org-roam-node-insert)
|
||||
(map! :map doom-leader-notes-map "r r" #'org-roam-node-find)
|
||||
(map! :map doom-leader-notes-map "r t" #'org-roam-buffer-toggle)
|
||||
|
||||
(setq org-roam-preview-function #'fd-my-org-roam-preview-function)
|
||||
(defun fd-my-org-roam-preview-function ()
|
||||
"Return the preview content at point.
|
||||
|
||||
This function returns the all contents under the current
|
||||
headline, up to the next headline."
|
||||
(let ((beg (save-excursion
|
||||
(org-roam-end-of-meta-data t)
|
||||
(point)))
|
||||
(end (save-excursion
|
||||
(condition-case nil
|
||||
(progn
|
||||
(outline-forward-same-level)
|
||||
(backward-char)
|
||||
(point)
|
||||
)
|
||||
(error
|
||||
(point-max))))))
|
||||
(string-trim (buffer-substring-no-properties beg end))))
|
||||
#+end_src
|
||||
|
||||
** TeX
|
||||
@ -218,11 +242,23 @@ Return nil if on a link url, markup, html, or references."
|
||||
|
||||
** Matlab
|
||||
#+begin_src emacs-lisp :tangle yes
|
||||
(add-hook 'matlab-mode-hook (lambda () (add-to-list 'quickrun-file-alist '("\\.m\\'" . "octave"))))
|
||||
;; (assq-delete-all "objc" quickrun-file-alist)
|
||||
|
||||
(quickrun-add-command "matlab"
|
||||
'((:command . "octave"))
|
||||
:mode #'matlab-mode
|
||||
)
|
||||
|
||||
(quickrun-add-command "octave"
|
||||
'((:command . "octave"))
|
||||
:mode #'octave-mode
|
||||
)
|
||||
|
||||
;; (autoload 'matlab-mode "matlab" "Matlab Editing Mode" t)
|
||||
;; (add-to-list
|
||||
;; 'auto-mode-alist
|
||||
;; '("\\.m$" . matlab-mode))
|
||||
(add-to-list
|
||||
'auto-mode-alist
|
||||
'("\\.m$" . matlab-mode))
|
||||
;; (setq matlab-indent-function t)
|
||||
;; (setq matlab-shell-command "/urs/local/bin/matlab")
|
||||
#+end_src
|
||||
@ -264,10 +300,15 @@ Return nil if on a link url, markup, html, or references."
|
||||
#+begin_src emacs-lisp :tangle yes
|
||||
|
||||
;; Add company-quickhelp
|
||||
(company-quickhelp-mode)
|
||||
;; Now already included
|
||||
;; (company-quickhelp-mode)
|
||||
|
||||
(map! :map company-active-map "TAB" nil)
|
||||
(map! :map company-active-map "<tab>" nil)
|
||||
;; (map! :map company-active-map "TAB" nil)
|
||||
;; (map! :map company-active-map "<tab>" nil)
|
||||
#+end_src
|
||||
** Projectile
|
||||
#+begin_src emacs-lisp :tangle yes
|
||||
(map! :map 'doom-leader-project-map :desc "Repeat last command" "SPC" #'projectile-repeat-last-command)
|
||||
#+end_src
|
||||
|
||||
** More
|
||||
|
@ -21,8 +21,8 @@
|
||||
;;layout ; auie,ctsrnm is the superior home row
|
||||
|
||||
:completion
|
||||
company ; the ultimate code completion backend
|
||||
;;helm ; the *other* search engine for love and life
|
||||
( company +childframe ) ; the ultimate code completion backend
|
||||
;; helm ; the *other* search engine for love and life
|
||||
;;ido ; the other *other* search engine...
|
||||
;;ivy ; a search engine for love and life
|
||||
vertico ; the search engine of the future
|
||||
@ -44,11 +44,11 @@
|
||||
ophints ; highlight the region an operation acts on
|
||||
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
||||
;;tabs ; a tab bar for Emacs
|
||||
treemacs ; a project drawer, like neotree but cooler
|
||||
( treemacs +lsp ) ; a project drawer, like neotree but cooler
|
||||
;;unicode ; extended unicode support for various languages
|
||||
vc-gutter ; vcs diff in the fringe
|
||||
vi-tilde-fringe ; fringe tildes to mark beyond EOB
|
||||
;;window-select ; visually switch windows
|
||||
(window-select +numbers) ; visually switch windows
|
||||
workspaces ; tab emulation, persistence & separate workspaces
|
||||
;;zen ; distraction-free coding or writing
|
||||
|
||||
@ -61,7 +61,7 @@
|
||||
;; lispy ; vim for lisp, for people who don't like vim
|
||||
;;multiple-cursors ; editing in many places at once
|
||||
;;objed ; text object editing for the innocent
|
||||
parinfer ; turn lisp into python, sort of
|
||||
;; parinfer ; turn lisp into python, sort of
|
||||
;;rotate-text ; cycle region at point between text candidates
|
||||
snippets ; my elves. They type so I don't have to
|
||||
;;word-wrap ; soft wrapping with language-aware indent
|
||||
@ -145,7 +145,7 @@
|
||||
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
|
||||
(julia +lsp +tree-sitter) ; a better, faster MATLAB
|
||||
;;kotlin ; a better, slicker Java(Script)
|
||||
(latex +lsp) ; writing papers in Emacs has never been so fun
|
||||
(latex +lsp +latexmk) ; writing papers in Emacs has never been so fun
|
||||
;;lean ; for folks with too much to prove
|
||||
;;ledger ; be audit you can be
|
||||
;;lua ; one-based indices? one-based indices
|
||||
@ -186,7 +186,7 @@
|
||||
;;emms
|
||||
;;everywhere ; *leave* Emacs!? You must be joking
|
||||
;;irc ; how neckbeards socialize
|
||||
rss ; emacs as an RSS reader
|
||||
;; rss ; emacs as an RSS reader
|
||||
;;twitter ; twitter client https://twitter.com/vnought
|
||||
|
||||
:config
|
||||
|
Loading…
x
Reference in New Issue
Block a user