diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2019-12-28 17:06:20 +0000 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2019-12-28 17:06:20 +0000 |
commit | 8a218c7508c19f4dfaafd63ebabd05e0a24242ce (patch) | |
tree | aa2ac94bc3c52f0b731b9c0161c522fbef20a109 | |
parent | 0a96e32b6bbc50cc8e84f4f29cbe0f5c5794240d (diff) |
Added company-irony and configged company a bit
In line with https://youtu.be/XeWZfruRu6k
Diffstat (limited to '')
-rw-r--r-- | custom-settings.el | 2 | ||||
-rw-r--r-- | init.el | 18 |
2 files changed, 16 insertions, 4 deletions
diff --git a/custom-settings.el b/custom-settings.el index a49508a..8cbb376 100644 --- a/custom-settings.el +++ b/custom-settings.el @@ -72,7 +72,7 @@ '(org-sort-agenda-notime-is-late nil) '(package-selected-packages (quote - (beacon-mode python-pytest password-store csv-mode expand-region org-gcal lsp-python-ms ace-window discover-my-major popup-kill-ring amx gnu-elpa-keyring-update auto-package-update monokai-theme color-theme-monokai color-theme-sanityinc-tomorrow dracula-theme evil-mode yasnippet-snippets highlight-symbol rainbow-delimiters git-gutter Ivy org-caldav which-key-mode org-plus-contrib use-package ac-cider magit blacken py-autopep8 flycheck elpy yasnippet company-lsp company lsp-ui go-autocomplete lsp-mode go-mode markdown-mode gruvbox-theme helm org cider slime evil))) + (company-irony beacon-mode python-pytest password-store csv-mode expand-region org-gcal lsp-python-ms ace-window discover-my-major popup-kill-ring amx gnu-elpa-keyring-update auto-package-update monokai-theme color-theme-monokai color-theme-sanityinc-tomorrow dracula-theme evil-mode yasnippet-snippets highlight-symbol rainbow-delimiters git-gutter Ivy org-caldav which-key-mode org-plus-contrib use-package ac-cider magit blacken py-autopep8 flycheck elpy yasnippet company-lsp company lsp-ui go-autocomplete lsp-mode go-mode markdown-mode gruvbox-theme helm org cider slime evil))) '(pdf-view-midnight-colors (quote ("#fdf4c1" . "#282828"))) '(pos-tip-background-color "#36473A") '(pos-tip-foreground-color "#FFFFC8") @@ -816,8 +816,7 @@ ([tab] . smarter-yas-expand-next-field-complete) ("TAB" . smarter-yas-expand-next-field-complete)) :custom - (company-minimum-prefix-length 1) - (company-tooltip-align-annotations t) + (company-tooltip-align-annotations t) (company-begin-commands '(self-insert-command)) (company-require-match 'never) ;; Don't use company in the following modes @@ -829,7 +828,9 @@ :config ;; clangd variable not present which was a problem ;; (unless *clangd* (delete 'company-clang company-backends)) - (global-company-mode 1) +;; (global-company-mode 1) + (setq company-idle-delay 0) + (setq company-minimum-prefix-length 3) (defun smarter-yas-expand-next-field-complete () "Try to `yas-expand' and `yas-next-field' at current cursor position. @@ -847,6 +848,17 @@ If failed try to complete the common part with `company-complete-common'" (company-complete-common)))) (company-complete-common)))) +;; this stuff from https://youtu.be/XeWZfruRu6k +;; for c programming mainly +(use-package company-irony + :config + (require 'company) + (add-to-list 'company-backends 'company-irony)) + +(use-package irony + :config + (add-hook 'c-mode-hook 'irony-mode) + (add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options)) (setq lsp-gopls-staticcheck t) (setq lsp-eldoc-render-all t) |