Delete ctags
This commit is contained in:
parent
5a7c64ec04
commit
183e7d3919
8 changed files with 4 additions and 72 deletions
56
pkg/ctags.el
56
pkg/ctags.el
|
|
@ -1,56 +0,0 @@
|
|||
;;; pkg/ctags -- summary -*- lexical-binding: t; -*-
|
||||
;;; Commentary:
|
||||
;;; Old and rudimental completion framework.
|
||||
;;; Code:
|
||||
(require '+custom-pkg-projectile "$HOME/.emacs.d/pkg/projectile.el")
|
||||
|
||||
(setq tags-add-tables nil)
|
||||
|
||||
(defvar ctags/refresh-command
|
||||
(format "ctags -e -R -f %sTAGS %s."
|
||||
default-directory default-directory))
|
||||
|
||||
;; Sentinel function for capturing ctags
|
||||
(defun ctags/process-callback (process event)
|
||||
"Show status of asynchronous ctags PROCESS after it send finished EVENT."
|
||||
(cond
|
||||
((string-equal event "finished\n")
|
||||
(message "Creating tag files...completed")
|
||||
(kill-buffer (get-buffer "*ctags*"))
|
||||
(visit-tags-table (format "%sTAGS" (projectile-project-root))))
|
||||
(t
|
||||
(message "Creating tags file...failed")
|
||||
(pop-to-buffer (get-buffer "*ctags*"))
|
||||
)))
|
||||
|
||||
(cl-defun ctags/refresh-ctags (&key silent)
|
||||
"Refresh ctags according to currently set command. With SILENT you can make it, uhh... silent."
|
||||
(interactive)
|
||||
|
||||
;; Print message if not silent
|
||||
(when (not silent) (message "Starting ctags process..."))
|
||||
|
||||
;; Return if a version of the process is already running
|
||||
(when (not (get-process "ctags"))
|
||||
(start-process-shell-command "ctags" "*ctags*" ctags/refresh-command)
|
||||
(set-process-sentinel (get-process "ctags") 'ctags/process-callback)))
|
||||
|
||||
;; Ctags bindings
|
||||
(define-key prog-mode-map (kbd "C-c E") 'ctags/refresh-ctags)
|
||||
|
||||
;; Automatically update tags on save, but be silent about it.
|
||||
(defvar ctags/major-modes-to-update-on-save '())
|
||||
(defun ctags/update-tags-on-save ()
|
||||
"Update tags if current major mode is part of the list."
|
||||
(interactive)
|
||||
(when (member major-mode ctags/major-modes-to-update-on-save)
|
||||
(ctags/refresh-ctags :silent t)))
|
||||
|
||||
(defun ctags/update-this-mode-on-save (mode)
|
||||
"Update MODE on save."
|
||||
(add-to-list (make-local-variable 'ctags/major-modes-to-update-on-save) mode))
|
||||
|
||||
(add-hook 'after-save-hook 'ctags/update-tags-on-save)
|
||||
|
||||
(provide '+custom-pkg-ctags)
|
||||
;;; ctags.el ends here
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
;;; pkg/ispell -- summary -*- lexical-binding: t; -*-
|
||||
;;; Commentary:
|
||||
;;; Highlight misspelled words
|
||||
;;; Code:
|
||||
|
||||
(use-package ispell
|
||||
:straight t
|
||||
:config (setq ispell-program-name "aspell")
|
||||
(setq ispell-extra-args
|
||||
'("--run-together" "--run-together-limit=5" "--run-together-min=2"))
|
||||
:hook ((prog-mode text-mode markdown-mode) . flyspell-mode))
|
||||
|
||||
(add-hook 'flyspell-mode-hook (lambda ()
|
||||
(unbind-key "C-," flyspell-mode-map)
|
||||
(unbind-key "C-." flyspell-mode-map)
|
||||
(unbind-key "C-;" flyspell-mode-map)
|
||||
(unbind-key "C-c $" flyspell-mode-map)
|
||||
(unbind-key "C-M-i" flyspell-mode-map)))
|
||||
|
||||
(use-package flyspell-correct :straight t :after flyspell :defer t)
|
||||
(use-package flyspell-correct-ivy :straight :after flyspell-correct :defer t)
|
||||
|
||||
(provide '+custom-pkg-ispell)
|
||||
;;; ispell.el ends here
|
||||
Loading…
Add table
Add a link
Reference in a new issue