-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit_python.el
More file actions
104 lines (84 loc) · 3.06 KB
/
init_python.el
File metadata and controls
104 lines (84 loc) · 3.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
(setq python-shell-interpreter "ipython"
python-shell-interpreter-args "-i --simple-prompt")
;; (add-hook 'inferior-python-mode-hook
;; (lambda ()
;; (setq company-mode nil)))
;; ;; jedi - python completion
;; (add-hook 'python-mode-hook 'jedi:setup)
;; ;; (setq jedi:complete-on-dot t)
;; ;; (setq python-shell-interpreter "ipython")
;; (add-hook 'python-mode-hook
;; (lambda () (progn
;; (jedi:setup)
;; (setq jedi:complete-on-dot t)
;; (setq python-indent-offset 4))))
;;
;; really didn't like using company for python completion
;;
;; (use-package company
;; :ensure t
;; :config
;; (setq company-frontends nil)
;; (add-hook 'after-init-hook 'global-company-mode))
;; (use-package helm-company
;; :init (progn
;; (defun my:code::helm-company-complete ()
;; (interactive)
;; (when (company-complete) (helm-company)))
;; (add-to-list 'completion-at-point-functions
;; #'comint-dynamic-complete-filename))
;; :general (general-def
;; :keymaps '(company-mode-map company-active-map)
;; "TAB" #'helm-company
;; "<tab>" #'helm-company))
;; (use-package helm-company
;; :ensure t)
;; (use-package company-jedi
;; :ensure t
;; :config
;; (add-to-list 'company-backends 'company-jedi)
;; (setq jedi:complete-on-dot t))
;;(if (version< emacs-version "26.3")
;; (progn
;; ;; jedi - python completion
;; (add-hook 'python-mode-hook 'jedi:setup)
;; ;; (setq jedi:complete-on-dot t)
;; ;; (setq python-shell-interpreter "ipython")
;; (add-hook 'python-mode-hook
;; (lambda () (progn
;; (jedi:setup)
;; (setq jedi:complete-on-dot t)
;; (setq python-indent-offset 4))))
;; (progn
;; (use-package company
;; :ensure t
;; :config
;; (add-hook 'after-init-hook 'global-company-mode))
;; (use-package helm-company
;; :ensure t
;; :init (progn
;; (defun my:code::helm-company-complete ()
;; (interactive)
;; (when (company-complete) (helm-company)))
;; (add-to-list 'completion-at-point-functions
;; #'comint-dynamic-complete-filename))
;; :general (general-def
;; :keymaps '(company-mode-map company-active-map)
;; "TAB" #'helm-company
;; "<tab>" #'helm-company))
;; (use-package company-jedi
;; :ensure t
;; :config
;; (add-to-list 'company-backends 'company-jedi)
;; (setq jedi:complete-on-dot t))))
;; ELPY doesn't work with linum mode???
;; (use-package elpy
;; :ensure t
;; :config
;; (elpy-enable))))
;; NOTE: if python gives "error in process sentinel..." run M-x elpy-rpc-reinstall-virtualenv
(use-package elpy
:ensure t
:defer t
:init
(advice-add 'python-mode :before 'elpy-enable))