Browse Source

some python cleanup

master
Marc Pohling 6 years ago
parent
commit
2adbfe0fb2
1 changed files with 4 additions and 11 deletions
  1. 15
      config.org

15
config.org

@ -1103,8 +1103,9 @@ Common backends are:
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(defun company/python-mode-hook() (defun company/python-mode-hook()
(set (make-local-variable 'company-backends) (set (make-local-variable 'company-backends)
'((company-jedi :with company-dabbrev-code)))
; '((company-jedi company-dabbrev-code company-yasnippet) company-capf company-files)) ; '((company-jedi company-dabbrev-code company-yasnippet) company-capf company-files))
'((company-lsp company-yasnippet) company-capf company-dabbrev company-files))
; '((company-lsp company-yasnippet) company-capf company-dabbrev company-files))
(company-mode t) (company-mode t)
) )
#+END_SRC #+END_SRC
@ -1290,7 +1291,7 @@ Add some helpers to handle and understand macros
Source company-lsp: [[https://github.com/tigersoldier/company-lsp][Link]] Source company-lsp: [[https://github.com/tigersoldier/company-lsp][Link]]
Source lsp-ui: [[https://github.com/emacs-lsp/lsp-ui][Link]] Source lsp-ui: [[https://github.com/emacs-lsp/lsp-ui][Link]]
#+BEGIN_SRC emacs-lisp
BEGIN_SRC emacs-lisp
(use-package lsp-mode (use-package lsp-mode
:ensure t :ensure t
:defer t) :defer t)
@ -1317,7 +1318,7 @@ Add some helpers to handle and understand macros
(lsp-python-enable) (lsp-python-enable)
(flycheck-select-checker 'python-flake8)))) (flycheck-select-checker 'python-flake8))))
#+END_SRC
END_SRC
Jedi is a backend for python autocompletion and needs to be installed on the server: Jedi is a backend for python autocompletion and needs to be installed on the server:
@ -1363,14 +1364,6 @@ TODO: automatically start an inferior python process or switch to it if already
(jedi:setup) (jedi:setup)
(company/python-mode-hook) (company/python-mode-hook)
(setq jedi:server-args '("--log-traceback"))) (setq jedi:server-args '("--log-traceback")))
;; (add-to-list 'company-backends 'company-jedi)
;; (add-to-list 'company-backends 'company-anaconda)
;; (lambda ()
;; (set (make-local-variable 'company-backends)
;; '((company-jedi company-dabbrev) company-capf company-files)))
;; (setq flycheck-checker 'python-pylint))
;; (flycheck-select-checker 'python-pylint))
;; (setq flycheck-checker 'python-flake8)
(add-hook 'pyvenv-post-activate-hooks 'my/post-activate-hook) (add-hook 'pyvenv-post-activate-hooks 'my/post-activate-hook)
) )
#+END_SRC #+END_SRC

Loading…
Cancel
Save