refactor(emacs): remove ocamlconfig.el and pdfconfig.el
Signed-off-by: Lucas Sta Maria <lucas@priime.dev>
This commit is contained in:
parent
515953242d
commit
54f5683b3b
4 changed files with 33 additions and 46 deletions
|
@ -1,9 +0,0 @@
|
||||||
;;; ocamlconfig.el --- Configuration for OCaml and Tuareg
|
|
||||||
;;; Commentary:
|
|
||||||
;;; Code:
|
|
||||||
|
|
||||||
(add-hook 'tuareg-mode-hook #'flycheck-ocaml-setup)
|
|
||||||
(add-hook 'tuareg-mode-hook #'(lambda () (merlin-mode -1)))
|
|
||||||
(setq utop-command "opam exec -- dune utop . -- -emacs")
|
|
||||||
|
|
||||||
;;; ocamlconfig.el ends here
|
|
|
@ -1,35 +0,0 @@
|
||||||
;;; pdfconfig.el --- configuration for working with PDF files
|
|
||||||
;;; Commentary:
|
|
||||||
;; Configuration for working with PDF files.
|
|
||||||
;;; Code:
|
|
||||||
|
|
||||||
;; PDF Tools
|
|
||||||
(pdf-tools-install)
|
|
||||||
|
|
||||||
(setq doc-view-resolution 300)
|
|
||||||
|
|
||||||
(defun pdf-download-and-view (&optional url filename)
|
|
||||||
"Download and view the PDF given by its URL as FILENAME."
|
|
||||||
(interactive)
|
|
||||||
(let* ((url (or url
|
|
||||||
(read-string "Download URL: ")))
|
|
||||||
(default-filename (or filename
|
|
||||||
(car (last (split-string url "/" t)))))
|
|
||||||
(filename (or filename
|
|
||||||
(read-string (format "Filename (%s): " default-filename)
|
|
||||||
nil
|
|
||||||
nil
|
|
||||||
default-filename)))
|
|
||||||
(file-path (concat "/tmp/" filename))
|
|
||||||
(download-buffer (url-retrieve-synchronously url)))
|
|
||||||
(set-buffer download-buffer)
|
|
||||||
(goto-char (point-min))
|
|
||||||
(re-search-forward "^$" nil 'move)
|
|
||||||
(forward-char)
|
|
||||||
(delete-region (point-min) (point))
|
|
||||||
(write-file file-path)
|
|
||||||
(find-file (expand-file-name file-path))))
|
|
||||||
|
|
||||||
(setq pdf-view-continuous t)
|
|
||||||
|
|
||||||
;;; pdfconfig.el ends here
|
|
|
@ -4,6 +4,28 @@
|
||||||
;; development experience and productivity.
|
;; development experience and productivity.
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
|
(defun pdf-download-and-view (&optional url filename)
|
||||||
|
"Download and view the PDF given by its URL as FILENAME."
|
||||||
|
(interactive)
|
||||||
|
(let* ((url (or url
|
||||||
|
(read-string "Download URL: ")))
|
||||||
|
(default-filename (or filename
|
||||||
|
(car (last (split-string url "/" t)))))
|
||||||
|
(filename (or filename
|
||||||
|
(read-string (format "Filename (%s): " default-filename)
|
||||||
|
nil
|
||||||
|
nil
|
||||||
|
default-filename)))
|
||||||
|
(file-path (concat "/tmp/" filename))
|
||||||
|
(download-buffer (url-retrieve-synchronously url)))
|
||||||
|
(set-buffer download-buffer)
|
||||||
|
(goto-char (point-min))
|
||||||
|
(re-search-forward "^$" nil 'move)
|
||||||
|
(forward-char)
|
||||||
|
(delete-region (point-min) (point))
|
||||||
|
(write-file file-path)
|
||||||
|
(find-file (expand-file-name file-path))))
|
||||||
|
|
||||||
(use-package projectile :straight t
|
(use-package projectile :straight t
|
||||||
:custom
|
:custom
|
||||||
(projectile-completion-system 'auto)
|
(projectile-completion-system 'auto)
|
||||||
|
@ -31,7 +53,12 @@
|
||||||
(use-package pdf-tools
|
(use-package pdf-tools
|
||||||
:straight
|
:straight
|
||||||
'(pdf-tools :type git :host github
|
'(pdf-tools :type git :host github
|
||||||
:repo "vedang/pdf-tools"))
|
:repo "vedang/pdf-tools")
|
||||||
|
:custom
|
||||||
|
(doc-view-resolution 300)
|
||||||
|
(pdf-view-continuous t)
|
||||||
|
:init
|
||||||
|
(pdf-tools-install))
|
||||||
(use-package olivetti :straight t
|
(use-package olivetti :straight t
|
||||||
:hook (org-mode . olivetti-mode))
|
:hook (org-mode . olivetti-mode))
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,11 @@
|
||||||
'(llvm-mode :type git :host github
|
'(llvm-mode :type git :host github
|
||||||
:repo "nverno/llvm-mode"))
|
:repo "nverno/llvm-mode"))
|
||||||
(use-package clojure-mode :straight t)
|
(use-package clojure-mode :straight t)
|
||||||
(use-package tuareg :straight t)
|
(use-package tuareg :straight t
|
||||||
|
:custom
|
||||||
|
(utop-command "opam exec -- dune utop . -- -emacs")
|
||||||
|
:hook ((tuareg-mode . flycheck-ocaml-setup)
|
||||||
|
(tuareg-mode . merlin-mode)))
|
||||||
(use-package utop :straight t)
|
(use-package utop :straight t)
|
||||||
(use-package dune :straight t)
|
(use-package dune :straight t)
|
||||||
(use-package flycheck-ocaml :straight t)
|
(use-package flycheck-ocaml :straight t)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue