diff --git a/config.org b/config.org index db1658c..4161c9d 100644 --- a/config.org +++ b/config.org @@ -1278,8 +1278,8 @@ Activate company and make it react nearly instantly company-tooltop-flip-when-above t company-show-numbers t company-idle-delay 0.1) -;; (define-key company-active-map (kbd "TAB") #'company-complete-selection) -;; (define-key company-active-map (kbd "RET") nil) +; (define-key company-active-map (kbd "TAB") #'company-complete-selection) +; (define-key company-active-map (kbd "RET") nil) (company-tng-configure-default) ) #+END_SRC @@ -1313,7 +1313,8 @@ It is only available for emacs 26 and higher. (defun company/python-mode-hook() (message "company/python-mode-hook activated") (set (make-local-variable 'company-backends) - '((company-ob-ipython company-lsp))) + '((company-jedi company-yasnippet))) +; '((company-ob-ipython company-lsp))) ; '((company-ob-ipython company-jedi))) ; '((company-jedi company-dabbrev-code company-yasnippet) company-capf company-files)) ; '((company-lsp company-yasnippet) company-capf company-dabbrev company-files)) @@ -1458,8 +1459,8 @@ Maybe add [[https://github.com/hlissner/emacs-company-dict][company-dict]]? It's (yas-global-mode t) (setq yas-snippet-dirs (concat PATH_USER_GLOBAL "snippets")) :mode ("\\.yasnippet" . snippet-mode) -; :config -; (yas-reload-all) ;; ensure snippets are updated and available, necessary when not using global-mode + :config + (yas-reload-all) ;; ensure snippets are updated and available, necessary when not using global-mode ) #+END_SRC ** Lisp @@ -1543,9 +1544,11 @@ Add some helpers to handle and understand macros :mode ("\\.py\\'" . python-mode) :interpreter ("python" . python-mode) :defer t + :after company-mode :init + (message "python mode init") (add-hook 'python-mode-hook (lambda () - 'company/python-mode-hook + (company/python-mode-hook) (semantic-mode t) (flycheck-select-checker 'python-pylint))) :config @@ -1576,7 +1579,7 @@ Add some helpers to handle and understand macros Source company-lsp: [[https://github.com/tigersoldier/company-lsp][Link]] Source lsp-ui: [[https://github.com/emacs-lsp/lsp-ui][Link]] -#+BEGIN_SRC emacs-lisp +BEGIN_SRC emacs-lisp (use-package lsp-mode :ensure t :config @@ -1620,7 +1623,7 @@ Add some helpers to handle and understand macros (add-hook 'lsp-after-initialize-hook 'lsp-set-cfg) ) -#+END_SRC +END_SRC BEGIN_SRC emacs-lisp (use-package lsp-mode :ensure t @@ -1674,7 +1677,7 @@ END_SRC 106 ) #+END_SRC -BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp (use-package company-jedi :defer t ;; :after company @@ -1687,7 +1690,7 @@ BEGIN_SRC emacs-lisp (setq jedi:use-shortcuts t) ;; (add-hook 'python-mode-hook 'company/python-mode-hook) ) -END_SRC +#+END_SRC *** Virtual Environments A wrapper to handle virtual environments.