Compare commits
No commits in common. '503d0b38b026daca9003b843aaeaf04fafb35767' and '46141609acc161123edecc3e8f7b32da87b5f3a1' have entirely different histories.
503d0b38b0
...
46141609ac
@ -1,37 +0,0 @@
|
||||
;;; flycheck-nasm-mode.el --- flycheck checker for NASM -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2024 John Turner
|
||||
|
||||
;; Author: John Turner jturner.usa@gmail.com
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'flycheck)
|
||||
|
||||
(flycheck-def-option-var flycheck-nasm-format "elf64" nasm
|
||||
"NASM executable format."
|
||||
:type 'string)
|
||||
|
||||
(flycheck-define-checker nasm
|
||||
"Flycheck checker for NASM."
|
||||
:command ("nasm" "-o" "/dev/null" (option "-f" flycheck-nasm-format) source)
|
||||
:error-patterns ((error line-start (file-name) ":" line ":" space "error:" space (message) line-end)
|
||||
(warning line-start (file-name) ":" line ":" space "warning:" space (message) line-end))
|
||||
:modes (asm-mode nasm-mode))
|
||||
|
||||
(provide 'flycheck-nasm)
|
||||
;;; flycheck-nasm-mode.el ends here
|
@ -1,76 +0,0 @@
|
||||
;;; fmt.el --- -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2023 John Turner
|
||||
|
||||
;; Author: John Turner <notroot@gentoo-pc>
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
(defgroup fmt nil
|
||||
"Format buffers using external programs such as rustfmt.")
|
||||
|
||||
(defcustom fmt-executable nil
|
||||
"Formatter executable to use for formatting a buffer."
|
||||
:local t
|
||||
:type '(string)
|
||||
:group 'fmt)
|
||||
|
||||
(defcustom fmt-args nil
|
||||
"Args to use when running fmt-executable."
|
||||
:local t
|
||||
:type '(repeat string)
|
||||
:group 'fmt)
|
||||
|
||||
(defun fmt--init-output-buffer (name)
|
||||
(with-current-buffer (get-buffer-create name)
|
||||
(erase-buffer)
|
||||
(current-buffer)))
|
||||
|
||||
(defun fmt--wait-for-processes (processes)
|
||||
(cl-loop for process in processes
|
||||
do (cl-loop while (accept-process-output process))))
|
||||
|
||||
(defun fmt-process-current-buffer ()
|
||||
(let* ((stdout-buffer (fmt--init-output-buffer "*fmt stdout*"))
|
||||
(stderr-buffer (fmt--init-output-buffer "*fmt stderr*"))
|
||||
(stderr (make-pipe-process
|
||||
:name (format "%s stderr" fmt-executable)
|
||||
:buffer stderr-buffer
|
||||
:sentinel 'ignore
|
||||
:noquery t))
|
||||
(process (make-process
|
||||
:name fmt-executable
|
||||
:buffer stdout-buffer
|
||||
:command (cons fmt-executable fmt-args)
|
||||
:sentinel 'ignore
|
||||
:noquery t
|
||||
:connection-type 'pipe
|
||||
:stderr stderr)))
|
||||
(process-send-region process (point-min) (point-max))
|
||||
(process-send-eof process)
|
||||
(cons process stderr)))
|
||||
|
||||
(defun fmt-current-buffer ()
|
||||
(interactive)
|
||||
(pcase-let ((`(,process . ,stderr) (fmt-process-current-buffer)))
|
||||
(fmt--wait-for-processes (list process stderr))
|
||||
(if (zerop (process-exit-status process))
|
||||
(replace-buffer-contents (process-buffer process))
|
||||
(message "%s failed with exit status %s. See %s for output."
|
||||
fmt-executable
|
||||
(process-exit-status process)
|
||||
(process-buffer stderr)))))
|
||||
|
||||
(provide 'fmt)
|
||||
;;; fmt.el ends here
|
@ -1,4 +0,0 @@
|
||||
(use-package dired
|
||||
:custom
|
||||
(dired-listing-switches "-ahl --group-directories-first")
|
||||
(dired-kill-when-opening-new-dired-buffer t))
|
@ -1,9 +1,3 @@
|
||||
(use-package flycheck
|
||||
:hook
|
||||
(flycheck-error-list-mode . visual-line-mode)
|
||||
:custom
|
||||
(flycheck-python-mypy-cache-dir (file-name-concat (getenv "HOME") ".cache" "mypy"))
|
||||
:config
|
||||
(when (require 'best-side-window nil t)
|
||||
(add-to-list 'display-buffer-alist '((major-mode . flycheck-error-list-mode)
|
||||
best-side-window-display-buffer-in-best-side-window))))
|
||||
(flycheck-error-list-mode . visual-line-mode))
|
||||
|
@ -1,3 +0,0 @@
|
||||
(use-package image-dired
|
||||
:custom
|
||||
(image-dired-dir (file-name-concat (xdg-cache-home) "image-dired")))
|
@ -1 +0,0 @@
|
||||
(use-package nasm-mode)
|
@ -1,3 +0,0 @@
|
||||
(use-package recentf
|
||||
:custom
|
||||
(recentf-save-file (file-name-concat (xdg-state-home) "emacs/recentf")))
|
@ -1,4 +1,4 @@
|
||||
(use-package savehist
|
||||
:custom
|
||||
(savehist-file (file-name-concat (xdg-state-home) "emacs/savehist"))
|
||||
(savehist-file (file-name-concat user-emacs-directory "savehist"))
|
||||
(savehist-save-minibuffer-history t))
|
||||
|
@ -1,4 +0,0 @@
|
||||
(use-package saveplace
|
||||
:custom
|
||||
(save-place-file (file-name-concat (xdg-state-home) "saveplace/places"))
|
||||
(save-place-limit nil))
|
@ -1,8 +1,9 @@
|
||||
(use-package tramp
|
||||
:custom
|
||||
(tramp-password-cache nil)
|
||||
(tramp-persistency-file-name (file-name-concat (xdg-state-home) "emacs/tramp/persistency-file"))
|
||||
(tramp-persistency-file-name nil)
|
||||
:config
|
||||
(add-to-list 'tramp-connection-properties
|
||||
(list (regexp-quote (format "/sudo:root@%s:" system-name))
|
||||
"session-timeout" (* 60 60))))
|
||||
"session-timeout" (* 60 60)))
|
||||
(add-to-list 'tramp-remote-path "/root/bin"))
|
||||
|
@ -1,5 +0,0 @@
|
||||
(use-package transient
|
||||
:custom
|
||||
(transient-levels-file (file-name-concat (xdg-state-home) "emacs/transient/levels.el"))
|
||||
(transient-values-file (file-name-concat (xdg-state-home) "emacs/transient/values.el"))
|
||||
(transient-history-file (file-name-concat (xdg-state-home) "emacs/transient/history.el")))
|
Loading…
Reference in New Issue