<commit_before>;;; core-completion.el --- auto completion backend (Company-mode)

(use-package company
  :init
  (setq company-idle-delay nil
        company-minimum-prefix-length 2
        company-tooltip-limit 10
        company-dabbrev-downcase nil
        company-dabbrev-ignore-case nil
        company-dabbrev-code-other-buffers t
        company-tooltip-align-annotations t
        company-require-match 'never
        company-global-modes '(not eshell-mode comint-mode erc-mode message-mode help-mode)
        company-frontends '(company-pseudo-tooltip-frontend
                            company-echo-metadata-frontend)
        company-backends '((company-capf
                            company-yasnippet
                            company-dabbrev-code)
                           company-dabbrev)
        company-statistics-file (concat narf-temp-dir "/company-stats-cache.el")
        company-quickhelp-delay nil)

  :config
  ;; NOTE: pos-tip.el in Emacs 25+ does not work
  (use-package company-quickhelp
    :config (company-quickhelp-mode +1))

  ;; Rewrites evil-complete to use company-dabbrev
  (setq evil-complete-next-func      'narf/company-evil-complete-next
        evil-complete-previous-func  'narf/company-evil-complete-previous)

  (add-to-list 'company-transformers 'company-sort-by-occurrence)
  (setq-default company-backends (append '(company-keywords) company-backends))

  (define-company-backend! nxml-mode       (nxml yasnippet))
  (define-company-backend! emacs-lisp-mode (elisp yasnippet))

  (define-key company-active-map "\C-w" nil)

  (global-company-mode +1)

  (require 'company-statistics)
  (company-statistics-mode +1))

(use-package company-dict :defer t
  :config (setq company-dict-dir (concat narf-private-dir "/dict")))

(provide 'core-completion)
;;; core-completion.el ends here
<commit_msg>company: remove yasnippet from default backends<commit_after>;;; core-completion.el --- auto completion backend (Company-mode)

(use-package company
  :init
  (setq company-idle-delay nil
        company-minimum-prefix-length 2
        company-tooltip-limit 10
        company-dabbrev-downcase nil
        company-dabbrev-ignore-case nil
        company-dabbrev-code-other-buffers t
        company-tooltip-align-annotations t
        company-require-match 'never
        company-global-modes '(not eshell-mode comint-mode erc-mode message-mode help-mode)
        company-frontends '(company-pseudo-tooltip-frontend
                            company-echo-metadata-frontend)
        company-backends '((company-capf
                            company-dabbrev-code)
                           company-dabbrev)
        company-statistics-file (concat narf-temp-dir "/company-stats-cache.el")
        company-quickhelp-delay nil)

  :config
  ;; NOTE: pos-tip.el in Emacs 25+ does not work
  (use-package company-quickhelp
    :config (company-quickhelp-mode +1))

  ;; Rewrites evil-complete to use company-dabbrev
  (setq evil-complete-next-func      'narf/company-evil-complete-next
        evil-complete-previous-func  'narf/company-evil-complete-previous)

  (add-to-list 'company-transformers 'company-sort-by-occurrence)
  (setq-default company-backends (append '(company-keywords) company-backends))

  (define-company-backend! nxml-mode       (nxml yasnippet))
  (define-company-backend! emacs-lisp-mode (elisp yasnippet))

  (define-key company-active-map "\C-w" nil)

  (global-company-mode +1)

  (require 'company-statistics)
  (company-statistics-mode +1))

(use-package company-dict :defer t
  :config (setq company-dict-dir (concat narf-private-dir "/dict")))

(provide 'core-completion)
;;; core-completion.el ends here

{'fraction_non_alphanumeric': 0.11563517915309446, 'fraction_numerical': 0.004343105320304018, 'mean_word_length': 2.729757085020243, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5594547', 'n_tokens_mistral': 1188, 'n_tokens_neox': 1127, 'n_words': 228}