aboutsummaryrefslogtreecommitdiff
path: root/.emacs.d/rul-init.d/company.el
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/rul-init.d/company.el')
-rw-r--r--.emacs.d/rul-init.d/company.el42
1 files changed, 42 insertions, 0 deletions
diff --git a/.emacs.d/rul-init.d/company.el b/.emacs.d/rul-init.d/company.el
new file mode 100644
index 0000000..d52000e
--- /dev/null
+++ b/.emacs.d/rul-init.d/company.el
@@ -0,0 +1,42 @@
+(use-package company
+ :ensure t
+ :defer t
+ :init (global-company-mode)
+ :config
+ (progn
+ ;; Use Company for completion
+ (bind-key [remap completion-at-point] #'company-complete company-mode-map)
+
+ (setq company-tooltip-align-annotations t
+ ;; Easy navigation to candidates with M-<n>
+ company-show-numbers t)
+ (setq company-dabbrev-downcase nil))
+
+ (setq company-idle-delay 0)
+ (setq company-minimum-prefix-length 1)
+ :diminish company-mode)
+
+(use-package company-quickhelp ; Documentation popups for Company
+ :ensure t
+ :defer t
+ :init (add-hook 'global-company-mode-hook #'company-quickhelp-mode))
+
+(use-package company-go
+ :ensure t
+ :defer t
+ :init
+ (with-eval-after-load 'company
+ (add-to-list 'company-backends 'company-go)))
+
+(use-package company-lsp
+ :ensure t
+ :commands company-lsp)
+
+(use-package yasnippet
+ :ensure t
+ :config
+ (yas-global-mode 1)
+ (global-set-key (kbd "C-c y") 'company-yasnippet))
+
+(use-package yasnippet-snippets
+ :ensure t)
nihil fit ex nihilo