redguardtoo / company-ctags

Fastest Emacs auto-completion using Company and Ctags
GNU General Public License v3.0
57 stars 3 forks source link

doom-Emacs #11

Open OrionRandD opened 3 years ago

OrionRandD commented 3 years ago

Could you make a doom-Emacs recipe for this installation? Thx

redguardtoo commented 3 years ago

What's doom recipe?

OrionRandD commented 3 years ago

@redguardtoo I have set up it in doom like this:

In my config.el

;; company-ctags ;; https://github.com/redguardtoo/company-ctags ;; https://github.com/dan-t/rusty-tags

;; Step 1, create tags file in project root, ;; find . -name "*.[ch]" | ctags -e -L -

(use-package! company-ctags :config (with-eval-after-load 'company (company-ctags-auto-setup)) ;; (setq company-ctags-extra-tags-files '("$HOME/TAGS" "/usr/include/TAGS")) )

;; (require 'counsel) (defun my-counsel-company () "Input code from company backend using fuzzy matching." (interactive) (company-abort) (let* ((company-backends '(company-ctags)) (company-ctags-fuzzy-match-p t)) (counsel-company)))

And in my packages.el

(package! company-ctags)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

It loads with no error :)

But,

find . -name "*.[ch]" | ctags -e -L -

Creates an empty file:

CTAGS

Is this file supposed to be empty?

:(

redguardtoo commented 3 years ago

Make sure you've installed universal-ctags or exuberant-ctags?

image

I guess doom-mode is using https://github.com/jwiegley/use-package ("Similarly, :config can be used to execute code after a package is loaded"),

So the only setup you need,

(use-package! company-ctags :config (company-ctags-auto-setup))
OrionRandD commented 3 years ago

@redguardtoo I have ctags installed, And did As you told me up. But CTAGS is still generated empty :(

redguardtoo commented 3 years ago

os? ctags version? minimum example?