Advertisement
Rid1-fz-06

company-mode.el

Dec 1st, 2024
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 1.43 KB | Source Code | 0 0
  1. (use-package company
  2.   :ensure t
  3.  
  4.   :hook
  5.   ((prog-mode . global-company-mode)
  6.    (text-mode . global-company-mode))
  7.  
  8.   :bind
  9.   (:map company-active-map
  10.     ("TAB" . company-select-next)
  11.     ("<tab>" . company-select-next)
  12.     ("RET" . (lambda ()
  13.            (interactive)
  14.            (if (company-explicit-action-p)
  15.                (company-complete)
  16.              (newline-and-indent))))
  17.     ("<return>" . (lambda ()
  18.             (interactive)
  19.             (if (company-explicit-action-p)
  20.                 (company-complete)
  21.               (newline-and-indent)))))
  22.  
  23.   :init
  24.   (setq company-selection-default nil)
  25.  
  26.   :custom
  27.   (company-minimum-prefix-length 1)
  28.   (company-idle-delay 0.0)
  29.   (company-insertion-triggers nil)
  30.   (company-format-margin-function #'company-vscode-dark-icons-margin)
  31.   (company-frontends
  32.     '(company-pseudo-tooltip-frontend
  33.       company-echo-metadata-frontend))
  34.   (company-backends
  35.    '((company-bbdb :with company-yasnippet)
  36.          (company-semantic :with company-yasnippet)
  37.          (company-cmake :with company-yasnippet)
  38.          (company-capf :with company-yasnippet )
  39.          (company-clang :with company-yasnippet)
  40.          (company-files :with company-yasnippet)
  41.          (company-dabbrev-code :with company-yasnippet)
  42.      (company-gtags :with company-yasnippet)
  43.      (company-etags :with company-yasnippet)
  44.      (company-keywords :with company-yasnippet)
  45.          (company-dabbrev :with company-yasnippet)))
  46.  
  47.   :config
  48.   (require 'yasnippet)
  49.   (yas-global-mode 1))
  50.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement