Commit graph

14 commits

Author SHA1 Message Date
Henrik Lissner
94b16cba6c
Standardize REPL commands & improve SPC o r
- SPC o r now prompts for a REPL to open when none was found for the
  current buffer.
- REPL handlers must now follow the naming convention "*/open*-repl".
  e.g. +python/open-ipython-repl, +emacs-lisp/open-repl, etc.
- +eval/open-repl has been split in two:
  - +eval/open-repl-other-window
  - +eval/open-repl-same-window
2019-02-18 01:59:56 -05:00
Henrik Lissner
4455dc8baa
Extract ipython/jupyter arglist to variables
Also fixes #1022 by removing default --pylab arg from
+python/open-ipython-repl.
2018-12-05 14:31:02 -05:00
Henrik Lissner
ba93402dcc
lang/python: fix typo in +python-version
Thanks to @ztlevi
2018-10-07 00:46:50 -04:00
Henrik Lissner
9185da824c
lang/python: remove +ipython flag
+ Replace +ipython functionality with +python/open-ipython-repl command.
+ Use python-shell-interpreter for eval handlers, repl and python
  version detection.
+ Removed various python-shell-* variables for ipython; they are already
  supported upstream.
2018-10-06 20:44:25 -04:00
Henrik Lissner
7c6e2e705f
lang/python: add Ipython/Jupyter REPL commands 2018-10-06 20:44:25 -04:00
Henrik Lissner
63b195b133
lang/python: fix stringp errors when opening REPL
Caused my misuse of if-let* to let-bind dynamic variables. The expanded
code doesn't quite work out the way I expected, causing
python-shell-interpreter to be nil regardless of which side of the
if-else statement ran.
2018-10-02 23:52:29 -04:00
Henrik Lissner
53fe7a1f04 Refactor Project API to reflect changes upstream
projectile-project-root no longer returns `default-directory` if not in
a project (it returns nil). As such, doom-project-* functions (and their
uses) have been refactored.

+ doom-project-p & doom-project-root are aliases for
  projectile-project-p & projectile-project-root.
+ doom-project-{p,root,name,expand} now has a DIR argument (for
  consistency, since projectile-project-name and
  projectile-project-expand do not).
+ The nocache parameter is no longer necessary, as projectile's caching
  behavior is now more sane.
+ Removed some projectile advice/hacks that are no longer necessary.
+ Updated unit tests
2018-09-28 21:13:27 -04:00
Henrik Lissner
da55ee2af2
lang/python: fix pipenv support for +python/repl 2018-09-26 20:37:35 -04:00
Henrik Lissner
68699c3d5b
lang/python: make repl/eval handlers respect pipenv 2018-09-26 12:28:32 -04:00
Henrik Lissner
4e0a4e1b51
lang/{ruby,python}: Fix advice arguments errors 2018-09-26 09:57:10 -04:00
Henrik Lissner
b91a8f0d2f
lang/python: rewrite modeline version segment
+ Add $PYENV_ROOT/shims was added to exec-path, so pyenv python version
  is picked up on.
+ Fixes out-of-date python version in the modeline of other buffers
  after switching pyenv/pyvenv/conda envs.
+ The pipenv version and regular python display have been merged.
2018-09-25 22:17:41 -04:00
Henrik Lissner
ccaa642d98
lang/python: fix pipenv creating Pipfiles in pwd #888
`pipenv run ...` searches for a Pipfile itself, but doesn't search far
enough, creating a Pipfile in the current directory. Instead, we run the
command from the pipenv project root so it doesn't have to search.
2018-09-21 13:33:19 -04:00
Henrik Lissner
560d16d651
lang/python: add support for more env managers
+ Rewritten +conda support
+ Adds +pyenv and +pyvenv flags with support.
+ New +ipython flag to enable ipython REPL support
+ Added pipenv support. This is the new default, instead of pyenv, and
  isn't hidden behind a module flag because it is officially endorsed by
  python.

Addresses #736
2018-07-31 15:51:25 +02:00
Henrik Lissner
bb1171b64b
lang/python/autoload.el -> autoload/python.el 2018-07-17 20:57:32 +02:00
Renamed from modules/lang/python/autoload.el (Browse further)