|
|
@ -114,12 +114,11 @@ |
|
|
|
|
|
|
|
* Visuals |
|
|
|
** Font |
|
|
|
|
|
|
|
Don't add the font in the work environment, which I am logged in as POH |
|
|
|
Don't add the font in the work environment, which I am logged in as POH |
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(pcase my/whoami |
|
|
|
("home" (set-face-attribute 'default nil :font "Hack-10")) |
|
|
|
("home" (set-face-attribute 'default nil :font "Hack-10")) |
|
|
|
("work_hyperv" (set-face-attribute 'default nil :font "Hack-12")) |
|
|
|
) |
|
|
|
#+END_SRC |
|
|
@ -1160,7 +1159,7 @@ It is only available for emacs 26 and higher. |
|
|
|
(defun company/python-mode-hook() |
|
|
|
(message "python-mode-hook activated") |
|
|
|
(set (make-local-variable 'company-backends) |
|
|
|
'((company-jedi))) |
|
|
|
'((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)) |
|
|
|
(company-mode t) |
|
|
@ -1402,6 +1401,23 @@ END_SRC |
|
|
|
Code checks need to be installed, too: |
|
|
|
- pip install flake8 |
|
|
|
|
|
|
|
If jedi doesn't work, it might be a problem with jediepcserver.py. |
|
|
|
See [[https://github.com/tkf/emacs-jedi/issues/293][here]] |
|
|
|
To fix it: |
|
|
|
- Figure out which jediepcserver is running (first guess is melpa/jedi-core../jediepcserver.py |
|
|
|
- Change some code: |
|
|
|
#+BEGIN_SRC python |
|
|
|
100 return dict( |
|
|
|
101 # p.get_code(False) should do the job. But jedi-vim use replace. |
|
|
|
102 # So follow what jedi.vim does... |
|
|
|
103 - params=[p.get_code().replace('\n', '') for p in call_def.params], |
|
|
|
103 + params=[p.name for p in call_def.params], |
|
|
|
104 index=call-def.index, |
|
|
|
105 - call_name=call_def.call_name, |
|
|
|
105 + call_name=call_def.name, |
|
|
|
106 ) |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(use-package company-jedi |
|
|
|
:defer t |
|
|
|