Fix org-mode shift-arrow keys and add cmake support.
This commit is contained in:
parent
515e910487
commit
d9150880d3
@ -51,6 +51,7 @@
|
||||
;; Persist history over Emacs restarts. Vertico sorts by history position.
|
||||
(use-package savehist
|
||||
;; This is an emacs built-in but we're pulling the latest version
|
||||
:pin gnu
|
||||
:config
|
||||
(savehist-mode))
|
||||
|
||||
@ -60,8 +61,16 @@
|
||||
(which-key-mode))
|
||||
|
||||
(use-package windmove
|
||||
:config
|
||||
(windmove-default-keybindings))
|
||||
;; This is an emacs built-in but we're pulling the latest version
|
||||
:pin gnu
|
||||
:bind
|
||||
(
|
||||
("S-<up>" . windmove-up)
|
||||
("S-<right>" . windmove-right)
|
||||
("S-<down>" . windmove-down)
|
||||
("S-<left>" . windmove-left)
|
||||
)
|
||||
)
|
||||
|
||||
(setq tramp-default-method "ssh")
|
||||
|
||||
|
18
ansible/roles/emacs/files/elisp/lang-cmake.el
Normal file
18
ansible/roles/emacs/files/elisp/lang-cmake.el
Normal file
@ -0,0 +1,18 @@
|
||||
(require 'common-lsp)
|
||||
|
||||
(use-package cmake-mode
|
||||
:commands cmake-mode
|
||||
:hook (
|
||||
(cmake-mode . (lambda ()
|
||||
(eglot-ensure)
|
||||
(defclass my/eglot-cmake (eglot-lsp-server) ()
|
||||
:documentation
|
||||
"Own eglot server class.")
|
||||
|
||||
(add-to-list 'eglot-server-programs
|
||||
'(cmake-mode . (my/eglot-cmake "cmake-language-server")))
|
||||
))
|
||||
)
|
||||
)
|
||||
|
||||
(provide 'lang-cmake)
|
@ -7,15 +7,15 @@
|
||||
:commands nix-mode
|
||||
:hook (
|
||||
(nix-mode . (lambda ()
|
||||
;; (eglot-ensure)
|
||||
;; (defclass my/eglot-nix (eglot-lsp-server) ()
|
||||
;; :documentation
|
||||
;; "Own eglot server class.")
|
||||
(eglot-ensure)
|
||||
(defclass my/eglot-nix (eglot-lsp-server) ()
|
||||
:documentation
|
||||
"Own eglot server class.")
|
||||
|
||||
;; (add-to-list 'eglot-server-programs
|
||||
;; '(nix-mode . (my/eglot-nix "nixd")))
|
||||
;; (add-hook 'before-save-hook 'eglot-format-buffer nil 'local)
|
||||
))
|
||||
(add-to-list 'eglot-server-programs
|
||||
'(nix-mode . (my/eglot-nix "nixd")))
|
||||
(add-hook 'before-save-hook 'eglot-format-buffer nil 'local)
|
||||
))
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -1,16 +1,23 @@
|
||||
(use-package org
|
||||
:ensure nil
|
||||
:commands org-mode
|
||||
:bind (
|
||||
:bind (:map org-mode-map
|
||||
("C-c l" . org-store-link)
|
||||
("C-c a" . org-agenda)
|
||||
("C--" . org-timestamp-down)
|
||||
("C-=" . org-timestamp-up)
|
||||
("S-<up>" . org-shiftup)
|
||||
("S-<right>" . org-shiftright)
|
||||
("S-<down>" . org-shiftdown)
|
||||
("S-<left>" . org-shiftleft)
|
||||
)
|
||||
:hook (
|
||||
(org-mode . (lambda ()
|
||||
(org-indent-mode +1)
|
||||
))
|
||||
))
|
||||
;; Make windmove work in Org mode:
|
||||
(org-shiftup-final . windmove-up)
|
||||
(org-shiftleft-final . windmove-left)
|
||||
(org-shiftdown-final . windmove-down)
|
||||
(org-shiftright-final . windmove-right)
|
||||
)
|
||||
:config
|
||||
(require 'org-tempo)
|
||||
@ -38,6 +45,8 @@
|
||||
|
||||
;; TODO: There is an option to set the compiler, could be better than manually doing this here https://orgmode.org/manual/LaTeX_002fPDF-export-commands.html
|
||||
;; (setq org-latex-compiler "lualatex")
|
||||
;; TODO: nixos latex page recommends this line, figure out what it does / why its needed:
|
||||
;; (setq org-preview-latex-default-process 'dvisvgm)
|
||||
(setq org-latex-pdf-process
|
||||
'("lualatex -shell-escape -interaction nonstopmode -output-directory %o %f"
|
||||
"lualatex -shell-escape -interaction nonstopmode -output-directory %o %f"
|
||||
|
@ -38,4 +38,6 @@
|
||||
|
||||
(require 'lang-nix)
|
||||
|
||||
(require 'lang-cmake)
|
||||
|
||||
(load-directory autoload-directory)
|
||||
|
Loading…
x
Reference in New Issue
Block a user