diff --git a/.gitignore b/.gitignore index a8c748f..b4344e3 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,4 @@ speed-type/ var/ .dap-breakpoints eclipse.jdt.ls/ -workspace/ \ No newline at end of file +workspace/ diff --git a/configs/base-ctags.el b/configs/base-ctags.el index 280aeb0..0b438b8 100644 --- a/configs/base-ctags.el +++ b/configs/base-ctags.el @@ -24,6 +24,12 @@ (setq citre-auto-enable-citre-mode-modes '(prog-mode)) :config (with-no-warnings + (setq citre-readtags-program "/usr/bin/readtags" + citre-ctags-program "/usr/bin/ctags" + citre-default-create-tags-file-location 'global-cache + citre-use-project-root-when-creating-tags t + citre-prompt-language-for-ctags-command t) + (with-eval-after-load 'projectile (setq citre-project-root-function #'projectile-project-root)) @@ -41,13 +47,8 @@ (defun lsp-citre-capf-function () "A capf backend that tries lsp first, then Citre." - (let ((lsp-result (pcase centaur-lsp - ('lsp-mode - (and (fboundp #'lsp-completion-at-point) - (lsp-completion-at-point))) - ('eglot - (and (fboundp #'eglot-completion-at-point) - (eglot-completion-at-point)))))) + (let ((lsp-result (if (bound-and-true-p lsp-mode) + (lsp-completion-at-point)))) (if (and lsp-result (try-completion (buffer-substring (nth 0 lsp-result) @@ -60,7 +61,8 @@ "Enable the lsp + Citre capf backend in current buffer." (add-hook 'completion-at-point-functions #'lsp-citre-capf-function nil t)) - (add-hook 'citre-mode-hook #'enable-lsp-citre-capf-backend))) + (add-hook 'citre-mode-hook #'enable-lsp-citre-capf-backend) + )) (provide 'base-ctags) ;;; base-ctags.el ends here