Delete ctags
This commit is contained in:
parent
5a7c64ec04
commit
183e7d3919
8 changed files with 4 additions and 72 deletions
|
|
@ -3,7 +3,6 @@
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(require '+custom-pkg-projectile "$HOME/.emacs.d/pkg/projectile.el")
|
(require '+custom-pkg-projectile "$HOME/.emacs.d/pkg/projectile.el")
|
||||||
(require '+custom-pkg-ctags "$HOME/.emacs.d/pkg/ctags.el")
|
|
||||||
(require '+custom-pkg-prog-mode "$HOME/.emacs.d/pkg/prog-mode.el")
|
(require '+custom-pkg-prog-mode "$HOME/.emacs.d/pkg/prog-mode.el")
|
||||||
|
|
||||||
(defun +custom-lang-clang/activate-clang-mode ()
|
(defun +custom-lang-clang/activate-clang-mode ()
|
||||||
|
|
@ -22,13 +21,7 @@
|
||||||
(defvar c-default-style "bsd"))
|
(defvar c-default-style "bsd"))
|
||||||
|
|
||||||
(add-to-list (make-local-variable 'company-backends)
|
(add-to-list (make-local-variable 'company-backends)
|
||||||
'(company-etags company-yasnippet))
|
'(company-etags company-yasnippet)))
|
||||||
|
|
||||||
(setq-local
|
|
||||||
ctags/refresh-command
|
|
||||||
(format
|
|
||||||
"ctags -e -R --languages=C -f %sTAGS %s/*"
|
|
||||||
(projectile-project-root) (projectile-project-root))))
|
|
||||||
|
|
||||||
(add-hook 'c-mode-hook '+custom-lang-clang/activate-clang-mode)
|
(add-hook 'c-mode-hook '+custom-lang-clang/activate-clang-mode)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(require '+custom-pkg-ctags "$HOME/.emacs.d/pkg/ctags.el")
|
|
||||||
(require '+custom-pkg-prog-mode "$HOME/.emacs.d/pkg/prog-mode.el")
|
(require '+custom-pkg-prog-mode "$HOME/.emacs.d/pkg/prog-mode.el")
|
||||||
(require 'icejam-lsp)
|
(require 'icejam-lsp)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
(require '+custom-pkg-prog-mode "$HOME/.emacs.d/pkg/prog-mode.el")
|
(require '+custom-pkg-prog-mode "$HOME/.emacs.d/pkg/prog-mode.el")
|
||||||
(require '+custom-pkg-projectile "$HOME/.emacs.d/pkg/projectile.el")
|
(require '+custom-pkg-projectile "$HOME/.emacs.d/pkg/projectile.el")
|
||||||
(require '+custom-pkg-ctags "$HOME/.emacs.d/pkg/ctags.el")
|
|
||||||
|
|
||||||
(transient-define-prefix +custom-lang-python/transient-context-menu ()
|
(transient-define-prefix +custom-lang-python/transient-context-menu ()
|
||||||
"Python Buffer Commands"
|
"Python Buffer Commands"
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
(require '+custom-pkg-prog-mode "$HOME/.emacs.d/pkg/prog-mode.el")
|
(require '+custom-pkg-prog-mode "$HOME/.emacs.d/pkg/prog-mode.el")
|
||||||
(require '+custom-pkg-projectile "$HOME/.emacs.d/pkg/projectile.el")
|
(require '+custom-pkg-projectile "$HOME/.emacs.d/pkg/projectile.el")
|
||||||
(require '+custom-pkg-ctags "$HOME/.emacs.d/pkg/ctags.el")
|
|
||||||
|
|
||||||
(use-package rspec-mode :straight t :defer t)
|
(use-package rspec-mode :straight t :defer t)
|
||||||
(use-package ruby-end :straight t :defer t)
|
(use-package ruby-end :straight t :defer t)
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(require '+custom-pkg-projectile "$HOME/.emacs.d/pkg/projectile.el")
|
(require '+custom-pkg-projectile "$HOME/.emacs.d/pkg/projectile.el")
|
||||||
(require '+custom-pkg-ctags "$HOME/.emacs.d/pkg/ctags.el")
|
|
||||||
(require '+custom-pkg-prog-mode "$HOME/.emacs.d/pkg/prog-mode.el")
|
(require '+custom-pkg-prog-mode "$HOME/.emacs.d/pkg/prog-mode.el")
|
||||||
|
|
||||||
(use-package zig-mode :straight t :defer t :requires (lsp))
|
(use-package zig-mode :straight t :defer t :requires (lsp))
|
||||||
|
|
|
||||||
|
|
@ -43,8 +43,7 @@
|
||||||
(require '+custom-pkg-company-yasnippet "$HOME/.emacs.d/pkg/company-yasnippet.el")
|
(require '+custom-pkg-company-yasnippet "$HOME/.emacs.d/pkg/company-yasnippet.el")
|
||||||
(require '+custom-pkg-flycheck "$HOME/.emacs.d/pkg/flycheck.el")
|
(require '+custom-pkg-flycheck "$HOME/.emacs.d/pkg/flycheck.el")
|
||||||
(require '+custom-pkg-projectile "$HOME/.emacs.d/pkg/projectile.el")
|
(require '+custom-pkg-projectile "$HOME/.emacs.d/pkg/projectile.el")
|
||||||
(require '+custom-pkg-ctags "$HOME/.emacs.d/pkg/ctags.el")
|
(require 'icejam-ispell)
|
||||||
(require '+custom-pkg-ispell "$HOME/.emacs.d/pkg/ispell.el")
|
|
||||||
(require 'icejam-deft)
|
(require 'icejam-deft)
|
||||||
(require 'icejam-lsp)
|
(require 'icejam-lsp)
|
||||||
(require 'icejam-dashboard)
|
(require 'icejam-dashboard)
|
||||||
|
|
|
||||||
|
|
@ -20,5 +20,5 @@
|
||||||
(use-package flyspell-correct :straight t :after flyspell :defer t)
|
(use-package flyspell-correct :straight t :after flyspell :defer t)
|
||||||
(use-package flyspell-correct-ivy :straight :after flyspell-correct :defer t)
|
(use-package flyspell-correct-ivy :straight :after flyspell-correct :defer t)
|
||||||
|
|
||||||
(provide '+custom-pkg-ispell)
|
(provide 'icejam-ispell)
|
||||||
;;; ispell.el ends here
|
;;; icejam-ispell.el ends here
|
||||||
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
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue