Commit graph

267 commits

Author SHA1 Message Date
Benoit Coste
262c8ee7b0 Add defun spacemacs/python-test-last
It is a wrapper around the nosetests-again defun.
It will call the latest called nosetest function.
2018-02-24 19:49:39 -05:00
syl20bnr
81a931f48b python: add support for Language Server Protocol 2018-02-19 00:08:27 -05:00
JAremko
d2c3b847d8 doc fmt 2018-01-27 16:57:39 +02:00
Shitikanth Kashyap
6e0d38f3ea pylookup: Clear self.tag on endtag 2018-01-17 23:23:59 -05:00
Shitikanth Kashyap
480c8531b3 pylookup: Add "/genindex/" to potential_urls
Used in online documentation of libraries Flask and Requests.

http://flask.pocoo.org/docs/0.12/genindex/
docs.python-requests.org/en/master/genindex/
2018-01-17 23:23:47 -05:00
Shitikanth Kashyap
23e582d121 pylookup: Switch to using urllib2 on Python 2
Fixes bug: pylookup fails silently on 404. For instance, on
`./pylookup -u https://matplotlib.org/` it first looks up
'https://matplotlib.org/genindex-all.html', gets a 404 response,
but instead of moving to the next candidate url, it builds an empty
index.

Cause of bug: urllib.urlopen doesn't give an error on 404.
2018-01-17 23:23:25 -05:00
Shitikanth Kashyap
48032ca787 pylookup: Use generic tags to detect list levels.
This fixes bug #9866.

Tested to work with documentation of Python 2.6, Python 2.7, Python 3.4,
Python 3.5, Python 3.6, and latest stable releases for SciPy, NumPy,
Matplotlib, and Flask.
2018-01-17 23:23:14 -05:00
Shitikanth Kashyap
a3d8df9244 pylookup: Set one_entry to false after each element
Fix for bug: extraneous links registered for last entry
in index. For instance, for python documentation index,
all links in footer would get attached to `zlib`.
2018-01-17 23:23:04 -05:00
Shitikanth Kashyap
01e588c5f0 pylookup: Remove unused field do_entry 2018-01-17 23:22:52 -05:00
Shitikanth Kashyap
86f7213b65 pylookup: Handle end tag logic in handle_endtag
Doing it handle_data was a bug because `self.tag`
would contain the most recent opened tag, not the tag
currently being closed. This meant, for instance, that
the elements were not being generated correctly and
"./pylook.py --cache" was broken.
2018-01-17 23:22:39 -05:00
Shitikanth Kashyap
dbe5bb4893 pylookup: Use HTMLParser instead of htmllib
htmllib has been deprecated since PEP 3108.
2018-01-17 23:22:19 -05:00
syl20bnr
2c16d19ab7 semantic: make it possible to exclude stickyfunc 2018-01-17 23:03:33 -05:00
Hans Jang
d35268a1d6 Fix the broken python repl invocation through SPC a '
Without this chage, it ends up with the following error:
  'Wrong type argument: commandp, python-start-or-switch-repl'
2018-01-06 00:59:29 -05:00
syl20bnr
eee2b4b89c python: document pippel and set key binding to SPC m P 2018-01-05 22:15:50 -05:00
James Wang
0a4f257da0 Add pippel for python package management 2018-01-05 21:54:41 -05:00
Christoph Paulik
17d350b585 Python: Fix pyenv-executable-find in presence of pyenv-which-ext. 2018-01-05 21:48:04 -05:00
Shane Pearlman
2f2ed06b0e Use python-mode for SCons script files 2018-01-05 21:46:52 -05:00
syl20bnr
302d272ae3 python: sort key bindings in doc and package config 2018-01-05 21:45:57 -05:00
Volodymyr Vitvitskyi
b63039a6a4 Support importmagic in the Python layer
Problem
-------
If the symbol is not resolved due to a missing import there is no automatic way
in the Python layer to import it.

Solution
--------
Use 'importmagic' package.

Pressing `SPC m r f` at point that requires an import will suggest a list of
possible options.
2018-01-05 21:44:11 -05:00
syl20bnr
6a345b86a0 python: document python-save-before-test 2018-01-05 21:41:26 -05:00
Benoit Coste
3f01fd5fed Add defvar python-save-before-test
If true, buffer is automatically saved when calling
python-test-* functions
2018-01-05 21:38:28 -05:00
lostmarble
572820e618 Update funcs.el
fix python/:init: Invalid version syntax: '5.1.0^M' bug, for "ipython --version" will return '5.1.0\r\n' on windows with Anaconda3
2018-01-05 21:37:08 -05:00
Muneeb Shaikh
ef36bdfb06 python: update anaconda-mode view mode variable names
Fix #10047
2018-01-05 21:37:03 -05:00
Muneeb Shaikh
3289e0d114 python: update invalid cython mode keybindings 2018-01-05 21:35:58 -05:00
syl20bnr
326965d4ce Happy New Year 2018! 2018-01-04 02:00:25 -05:00
Robbert van der Helm
c61ae1a1c1 Add ivy support to the gtags layer
It would be much better to have a single function for each layer that
initializes ggtags, helm-gtags and counsel-gtags for a mode.
2017-12-17 22:03:01 -05:00
wizmer
2531012319 Make nose fail compilation when tests fail
Using nose.main instead of nose.run returns the result of the tests
so the status of the *compilation* buffer can be modified accordingly
2017-10-15 11:08:01 -04:00
CeleritasCelery
e32acfbf3b Fixed feature header 2017-08-29 20:00:44 +03:00
syl20bnr
2e8412323c python: move functions to funcs.el 2017-08-28 10:44:58 -04:00
JAremko
06301b2212 Improve exporting/testing 2017-08-18 20:50:21 +03:00
Eivind Fonn
f4b53d2a4f Rename :depends to :requires 2017-07-03 09:54:53 +02:00
syl20bnr
e2e532bb49 core: change <function>p to <function>-p suffixes for consistency
Also defined aliases for backward compatibility with `usedp` functions.
2017-07-02 10:09:39 -04:00
Eivind Fonn
08561d8631 core: implement :depends for package declarations
This replaces the older pattern
:toggle (configuration-layer/package-usedp ..)

This implementation ensures that :disabled-for honors dependent packages, i.e.
if package a depends on package b, which is owned by layer c, and layer c is
disabled for layer d, then neither package a nor b will be configured for layer
d. Previously, this was only true for package a, but not b.

This commit also fixes:

- configuration-layer/describe-package now shows which post-init and pre-init
  functions are disabled, if any
- Does not recreate all layer objects unconditionally when calling
  configuration-layer/discover-layers. Previously, this led to all layers being
  recreated after e.g. `SPC h SPC`, without any of the dotfile information.
  Since this information is now necessary for
  configuration-layer/describe-package, it’s important that we don’t clear the
  indexed layers when invoking this function.
2017-06-22 11:53:05 +02:00
Eivind Fonn
bcb597a329 python doc: Reformulate jedi warning 2017-06-12 12:38:27 +02:00
davidpham87
f6b2c90260 Autocompletion debug
Autcompletion does not handle request properly with jedi 1.0. Until the bug is corrected, one should keep the 0.9 version.
2017-06-12 12:37:04 +02:00
Danny Freeman
6bf310f572 Updated hy-mode lisp eval keys to match spacemacs conventions
Updated to match the conventions listed here:
https://github.com/syl20bnr/spacemacs/blob/develop/doc/CONVENTIONS.org#evaluation

Now functions related to lisp evaluation start with 'SPC m e' and functions
related to the hy repl start with 'SPC m e'.
2017-06-08 09:14:02 +02:00
Eivind Fonn
55ceef53a5 bugfix: arguments to python-setup-hy 2017-06-07 16:28:03 +02:00
Eivind Fonn
ed90f2b4ff Bugfixes
- Set hy-mode-inferior-lisp-command globally
- Function names
2017-06-07 12:43:58 +02:00
Eivind Fonn
16f25488a9 Clean up python/hy pyenv/pyvenv integration
- Move find-hy-executable to funcs.el and rename
- Don’t set hy-executable (not needed by anything)
- Setup hy only once at startup (allow user to override settings, see #5988)
- Use setup-hy in advice instead of post-activate-hook (works with many more
  commands)
- Setup checkers pyenv change, too
- Guard checker setup function for possibly missing flycheck
- Combine all setup functions into one
2017-06-07 12:40:30 +02:00
Danny Freeman
5a7019427e Fixed bug so hy command work when hy is installed on a virtualenv
Hy is typically installed on a python virtual environment, not globally. When
that is the case, init-hy-mode doesn't set any leader keys for hy since it
can't find the hy executable on the path. When a virtual environment is
activated, init-hy-mode is run again to see if it can find a hy executable
and setup the leader keys for hy.
2017-06-07 12:28:48 +02:00
Swaroop C H
a2f1bfa8a4 [python] Prefer virtualenv python to compile file 2017-05-29 10:12:20 -07:00
Eivind Fonn
97862af26c Trim output from pyenv command
Trailing newlines will cause errors
2017-05-28 14:59:34 +02:00
Muneeb Shaikh
47cb3e01e0 python: fixes for anaconda-mode-view-mode
* layers/+lang/python/funcs.el (spacemacs/anaconda-view-forward-and-push):
  Added helper function to go forward and hit RET
* layers/+lang/python/packages.el (python/init-anaconda-mode):
   - use new evilification macro
   - use helper function to go ahead and push button when hitting `RET`
   - Add `C-j`, `C-k` for easy navigation in anaconda-view-mode when multiple
   references are displayed. Doesn't conflict with normal `hjkl` navigation in
   other views of `anaconda-view-mode`

Fix #7538
Fix #5737
2017-05-24 13:58:23 +02:00
Swaroop C H
ea54e6863e Make python-execute-file use python-shell-interpreter
So that we can customize to use `python3` instead of `python`
2017-05-24 13:41:12 +02:00
Alexey Kotlyarov
f27568d8f9 Python: Highlight wdb breakpoints as well as pdb/ipdb/pudb 2017-05-24 12:44:57 +02:00
Alexey Kotlyarov
dc3f16b840 Python: search for Pylint and Flake8 in the virtualenvs 2017-05-24 12:44:19 +02:00
Kristoffer Haugsbakk
79ed1a6b4b Use proper markup for code in readmes
By convention, code markup (`~`) is reserved for keybindings in Org-based
documentation in Spacemacs.  Verbatim markup (`=`) is reserved for code and
other code-like things.  So change several readmes to reflect this convention.

Use verbatim markup for things like (non-exhaustive list):

- Emacs Lisp functions, modes, buffers, etc.
- Environment variables
- Directory paths
- Code in general
2017-05-24 11:57:17 +02:00
Rand01ph
c71d482012 fix python layers anaconda-mode requirements 404
the anaconda-mode requirements has change to wiki
2017-05-24 10:04:33 +02:00
JAremko
6c5a0b2b14 update docs to the new toc-org format 2017-05-22 18:35:37 +03:00
Wieland Hoffmann
4c009f4721 Use verbatim markup for the flake8 package name 2017-05-14 22:07:21 -04:00
JAremko
f805d0ebd9 Fix spacefmt test on deleted files
Also fix some links
[ci skip]
2017-04-28 23:29:43 -04:00
Pedro Algarvio
9c226d8201 .python-version can contain more than one version specified.
https://github.com/yyuu/pyenv/blob/master/COMMANDS.md#pyenv-local-advanced
2017-04-17 22:31:50 -04:00
syl20bnr
184a530596 python: hide YAPF lighter in modeline
Circled lighters in modeline are reserved for toggles under SPC t and SPC T
2017-04-12 23:18:42 -04:00
Robbert van der Helm
7af8321587 Diminish the YAPF minor mode indicator 2017-04-12 23:17:01 -04:00
ishestakov
86394d4af0 Fix IndexProcessor for compatibility with python3.
Replaced version check with try-except block.
Reformatted pylookup.py due to PEP8.
2017-04-09 22:51:36 -04:00
Robert O'Connor
e9ff9f09c6 Remove trailing whitespace from all files 2017-03-26 13:06:43 -04:00
magia
281410de11 Fix python-enable-yapf-format-on-save 2017-03-23 13:57:47 +02:00
syl20bnr
f45ce1a88e syntax-checking: rename function add-flycheck-hook to enable-flycheck
spacemacs/add-flycheck-hook was not really hooking anything, change the name
to better reflect what it does.
Also changed the push for a add-to-list to avoid duplicates.
2017-03-19 12:40:36 -04:00
syl20bnr
fb27ede558 Bump year in copyright headers
Happy New Year 2017!
2017-01-05 23:08:17 -05:00
zilongshanren
c22991d587
remove un-intended quote in company-anaconda 2017-01-05 08:58:01 +02:00
Brent Taylor
1ff7c10f19
Fix python path with virtualenv on Windows in Python nose package 2017-01-04 22:38:25 +02:00
syl20bnr
74fdbb6795 Refactor and simplify company backends declaration
Enabling a company backend for a specific mode was a tedious tasks with code
scattered at different locations, one for local variable definitions, one for
company hook function definitions and another where the backends were pushed to
the local variables (which was problematic, since we ended up pushing the same
backends over and over again with `SPC f e R`, pushes have been replaced by
add-to-list calls in the new macro).

All these steps are now put together at one place with the new macro
spacemacs|add-company-backends, check its docstring for more info on its
arguments.

This macro also allows to define arbitrary buffer local variables to tune
company for specific modes (similar to layer variables via a keyword :variables)

The code related to company backends management has been moved to the
auto-completion layer in the funcs.el file. A nice side effect of this move is
that it enforces correct encapsulation of company backends related code. We can
now easily detect if there is some configuration leakage when the
auto-completion layer is not used. But we loose macro expansion at file loading
time (not sue it is a big concern though).

The function spacemacs|enable-auto-complete was never used so it has been
deleted which led to the deletion of the now empty file core-auto-completion.el.

The example in LAYERS.org regarding auto-completion is now out of date and has
been deleted. An example to setup auto-completion is provided in the README.org
file of the auto-completion layer.
2017-01-02 00:39:04 -05:00
Koray Al
aaefaa3573
Added auto load virtualenv support via .venv file
The `pyvenv-mode` doesn't provide a list of available virtual
environments. So it's not currently possible to check if the
provided virtualenv name is available
2016-12-27 09:55:28 +02:00
ksjogo
12284e16b0 Removed deprecated insert-string and replace by insert 2016-11-11 15:23:49 +02:00
yangguang760
67ac25c80a fix debug string for python3
fix debug string for python3:
ipdb  ->  ipdb3
pudb  -> pudb3
2016-10-23 19:44:35 +02:00
Eivind Fonn
9c966a8d8f Simplify python test runner setup 2016-10-23 19:44:35 +02:00
bmag
699e78f38a python: really start REPL also in emacs 25.1
Make `python-start-or-switch-repl` start a REPL when necessery also in
Emacs 25.1. Previously in Emacs 25.1 it wouldn't do anything if the REPL
wasn't started already.
2016-10-17 14:12:46 +02:00
bmag
bbd812991a Refactor spacemacs/python-execute-file 2016-10-17 13:26:40 +02:00
bmag
6e896d3796 Restore fix for #2569 2016-10-17 13:19:46 +02:00
Alexey Kotlyarov
a7d8a4f3db Support wdb for debugging Python
wdb (https://github.com/Kozea/wdb) is a Web-based debugger
for Python. Use it if installed for python-toggle-breakpoint.
2016-10-17 13:15:54 +02:00
syl20bnr
d15050b512 python: update anaconda dependencies and reorganised the deps section 2016-10-16 23:05:56 -04:00
Eivind Fonn
200fb764aa Make python tab-width configurable 2016-10-11 20:01:24 +02:00
syl20bnr
9066d073b2 Fix (void-variable spacemacs-jump-handlers-....)
Move the variable definitions to config.el and eval-after-load the
key binding on SPC m g g.
2016-09-04 22:31:47 -04:00
syl20bnr
c6a6c41d92 Replace hooks by regular list for jump lists
Hook semantic is to be used with run-hooks API and run all hooks
sequentially, jump list semantic is different since the running
functions are not guaranteed to be executed so we prefer using regular
list API to manage jump-lists.
2016-09-04 12:28:40 -04:00
Christoph Paulik
4029679584 Fix Python jumping with async anaconda mode function.
Without this dumb-jump-go is often used if anaconda-mode-find-defintions
takes a little to return a result.

fix #6985
2016-09-03 12:04:31 +02:00
Christoph Paulik
28b8572eb0 Python: Fix link in layer Readme. 2016-08-30 16:11:57 +02:00
Eivind Fonn
5a869764dd Further improve gtags layer
- Add option to disable by default
- Use local-vars hook to allow per-project enable/disable
- Don’t enable helm-gtags-mode (no need)
- Move emacs bindings from helm-gtags-mode-map to ggtags-mode-map
2016-08-22 15:11:25 +02:00
Eivind Fonn
928983da47 Refactor jump to definition
This commit defines:

- spacemacs-default-jump-handlers: a list of functions that can jump to
  definition in ALL modes.

- spacemacs-jump-handlers-MODE: a list of functions that can jump to
  definition in MODE.

- spacemacs-jump-handlers: a buffer-local list of functions that can
  jump to definition. This is made up of the values of the two previous
  variables whenever a given major mode is activated.

- spacemacs/jump-to-definition: a function that tries each function in
  spacemacs-jump-handlers in order, and stops when one of them takes us
  somewhere new.

- spacemacs|define-jump-handlers: a macro that
  * defines spacemacs-jump-handlers-MODE, possibly filled with initial
    functions
  * defines a function that is added to the hook of the given MODE
  * binds “SPC m g g” of that MODE to spacemacs/jump-to-definition

This is an attempt to harmonize all the different approaches to jumping.
Specifically,

- Existing intelligent jump packages that work for only a single mode
  should go to the beginning of spacemacs-jump-handlers-MODE. E.g.
  anaconda for python, ensime for scala, etc.

- Packages like gtags that work for several modes (but potentially not
  all) and which is dumber than the intelligent jumpers should go the
  the END of spacemacs-jump-handlers-MODE.

- Packages like dumb-jump that work for all modes should go to
  spacemacs-default-jump-handlers.

In all cases the order of the jump handlers in each list should be from
most to least intelligent.

Fixes #6619
2016-08-22 15:08:25 +02:00
Eivind Fonn
d94d0d9f71 Some improvements to py-isort config
- Rename variable
- Wrap the save function to check condition variable at runtime
- Add keybinding
2016-08-21 17:49:20 +02:00
Swaroop C H
a2d7461bb1 [python] Add py-isort package
py-isort sorts the imports to keep it tidy.

Disabled by default.
2016-08-21 17:41:43 +02:00
Christoph Paulik
83ec3afc7e Fix Python layer loading on emacs master branch.
The member function works slightly different on the master branch of
emacs than in emacs 24.5 or emacs 25 release candidates. This might be a
bug in emacs but for now we can add a check if python-test-runner is a
list to work around that.

Fix #6246.
2016-08-21 15:16:56 +02:00
Christoph Paulik
6b41426d8d Python: Set breakpoints correctly when pyenv is used.
pyenv shims fool executable-find into thinking that ipdb is always
installed if it is installed in one environment.
2016-08-18 21:06:56 +02:00
Antonis Kalou
9bafae3f9c Added mention of PEP-8 syntax checkers to README 2016-08-16 21:06:45 +03:00
Eivind Fonn
3c18a4a6bb Tweak yapfify config
- No need to use :commands
- Remove SPC m y binding
2016-08-07 16:33:12 +02:00
Joris Engbers
e0aac5c170 Replace py-yapf with yapfify.
Yapfify uses project settings applicable to the file that yapf is called
on. Also it shows an error if yapf fails.
2016-08-07 16:31:50 +02:00
Christoph Paulik
ebbfbaf2d1 Use --simple-prompt for IPython 5 and set correctly on env switch.
IPython 5 does no longer use readline and so the emacs integration is
broken. See also
http://ipython.readthedocs.io/en/stable/whatsnew/version5.html#id1

Fix #6622 and related to #6580

This also works if different environments have different IPython
versions since the shell parameters are setup on every environment
switch.
2016-08-06 18:18:25 +02:00
Christian E. Hopps
b22702bc9e Expand gtags use to many more languages 2016-07-17 17:31:59 +02:00
syl20bnr
b093598e45 python: avoid code duplication with hy-mode 2016-07-05 00:23:16 -04:00
Danny Freeman
fa28afb02f Add keybindings for hy-mode in python layer
These changes will allow users to evaluate hy code in a repl using an
inferior-lisp process. It requires that users have hy installed via pip
in their local python enviornment.

Add smartparens-mode and documentation

I moved the add-hook for smartparens call to
python/post-init-smartparens. Keybindings were also updated to match
the ones for the Inferior REPL process for Python. Also added some
documentation for required hy pacakge, and the keybindings to
README.org.
2016-07-05 00:23:16 -04:00
km
d7820aafd6 Remove even more 24.3 related configuration
Helm-flx, which is included as a core package, requires a minimum Emacs
version of 24.4. As it stands attempting to install Spacemacs on Emacs
24.3 or below will break on helm-flx.
2016-06-20 22:26:53 -04:00
Wieland Hoffmann
78bfe65e62 Python: Don't remove ':' from electric-indent-chars in emacs >= 24.5
According to the conversation in [0] ':' is removed from
electric-indent-chars in python-mode because typing ':' in

> for i in range(10):
>    print(i)
> for i in range(10)_

with the point at _ indents the third line. This is not happening in
Emacs 24.5 anymore.

[0] aed0fc8ef8
2016-06-12 21:42:40 -04:00
syl20bnr
56ee037cd7 python: prefix functions with spacemacs 2016-06-05 21:53:14 -04:00
Christoph Paulik
9f28409b0c Allow multiple python test runners by using dispatch functions.
This allows python-test-runner to also be a list of either '(nose
pytest) or '(pytest nose) which then calls the correct test runner in
the dispatch functions.
2016-06-05 21:41:23 -04:00
syl20bnr
a2de9a63af Use :toggle keyword instead of when forms 2016-05-29 22:39:21 -04:00
sooheon
15e6290151 Make check for company-mode explicit, not implicit
People may have company-mode installed without necessarily using the
auto-completion layer.
2016-05-27 00:32:05 -04:00
syl20bnr
1f993bddf6 Rename spacemacs-helm and spacemacs-ivy layers to helm and ivy
For ivy users: be sure to update your dotfile by replacing spacemacs-ivy
by ivy
2016-05-15 22:24:27 -04:00
bmag
6edef36b17 Call python-setup-shell only once, not from hook 2016-05-06 12:59:51 +02:00
Xiao Hanyu
c93e47028c Set comment-inline-offset to 2 for python-mode.
Since python's PEP8 recommends two spaces for inline spaces.

Ref:
- https://www.python.org/dev/peps/pep-0008/#inline-comments
2016-04-21 22:26:18 -04:00
Christoph Paulik
643553a0fe Only disable semantic-idle-summary in python if anaconda-mode is used.
Some people have problems with anaconda mode and exclude it. This
enables them to at least have the semantic summary in their modeline.
2016-04-21 21:13:53 -04:00
Junhui
9d1b574554 Make pylookup.py compatible with Python 2 and 3 2016-04-21 21:08:31 -04:00
Eivind Fonn
7f95d250db python: Move smartparens config to correct place 2016-04-18 15:56:16 +02:00
syl20bnr
47776e8999 python: move semantic config and fix error with semantic-idle-summary-mode
Move all semantic related config to semantic post-init and correctly
fix the error with void function semantic-idle-summary-mode when
opening a python without the semantic layer enabled.
2016-04-17 00:37:47 -04:00
Neal D. Becker
4ca8b55819 set semantic-idle-summary-mode on hook 2016-04-17 00:37:47 -04:00
Christoph Paulik
a175de5b7a Use py-yapf from MELPA. 2016-04-12 22:58:41 -04:00
syl20bnr
6c2665e0f7 python: move disable semantic hook to anaconda init function 2016-04-12 22:38:48 -04:00
Junhui
95be4bce44 Fix 'makefile' for pylookup 2016-04-11 20:40:42 +02:00
Fabien Dubosson
ddc831e061 [python] Correct whitespaces in packages.el 2016-04-11 20:38:01 +02:00
Christoph Paulik
d38ce800bd Disable semantic-idle-summary in Python mode.
Anaconda provides more useful information but can not do it properly
when this mode is enabled since the minibuffer is cleared all the time.

Fix #5564
2016-04-11 20:35:40 +02:00
Joe Hillenbrand
d3922095e2 python: register python language for org-babel 2016-04-07 23:02:55 -04:00
Muneeb Shaikh
c9ef2f6f3c python: explicitly autoload py-yapf-buffer
Since it's a local package, there's no autoloads file. Adding it to
:commands to let use-package add autoload for it.
2016-04-04 21:46:23 -04:00
syl20bnr
e511a1211c python: lazy load py-yapf 2016-04-03 00:36:06 -04:00
syl20bnr
3b0c1fd93d Convert org doc files with doc-fmt 2016-03-30 22:59:55 -04:00
syl20bnr
5495c8dff2 python: correctly mark python package as built-in 2016-03-26 03:24:35 -04:00
syl20bnr
82fdd9a511 Use evil in holy-mode
Motivation

While disabling Evil in holy-mode makes its implementation shorter and
sounds elegant on the paper, in practice it puts a big burden on the
configuration parts which need to know if Evil is enable or not. This is
a bad separation of concerns and the bunch of fixes that we were forced
to do in the past weeks shows this issue. Those fixes were about
removing the knowledge of the activation of Evil by implementing new
dispatching functions to be used by layers, this is cumbersome and makes
Spacemacs layer configuration more subtle which is not good. There was
additional bad consequences of the removal of Evil state like the
impossibility to use Evil lisp state or iedit states, or we would have
been forced to implement a temporary activation of Evil which is
awkward.

Instead I reintroduce Evil as the central piece of Spacemacs design thus
Evil is now re-enabled in holy-mode. It provides the abstraction we need
to isolate editing styles and be able to grow the Spacemacs
configuration coverage sanely. Layers don't need to check whether the
holy mode is active or not and they don't need to know if Evil is
available (it is always available). We also don't need to write
additional dispatching functions, this is the job of Evil, and I think
it provides everything for this. Ideally configuration layer should be
implemented with only Evil in mind and the holy-mode (and hybrid-mode)
should magically make it work for Emacs style users, for instance we can
freely use `evil-insert-state` anywhere in the code without any guard.

Evil is now even more part of Spacemacs, we can really say that
Spacemacs is Emacs+Evil which is now an indivisible pair. Spacemacs
needed this stable API to continue on the right track.

While these changes should be rather transparent to the user, I'm sorry
for this experimental period, I failed to see all the implications of
such a change, I was just excited about the possibility to make Evil
optional. The reality is that Spacemacs has to embrace it and keep its
strong position on being Emacs+Evil at the core.

Implementation

- insert, motion and normal states are forced to emacs state using an
advice on `evil-insert-state`, `evil-motion-state` and
`evil-normal-state` respectively. These functions can be used freely in
the layer configuration.
- A new general hook `spacemacs-editing-style-hook` allow to hook any
code that need to be configured based on the editing style. Functions
hooked to this hook takes the current style as parameter, this
basically generalize the hook used to setup hjkl navigation bindings.
- ESC has been removed from the emacs state map.
- Revert unneeded changes
  - Revert "evil: enter insert-state only from normal-state"
    commit bdd702dfbe.
  - Revert "avoid being evil in deft with emacs editing style"
    commit f3a16f49ed.

Additional changes

All editing style packages have been moved to a layer called
`spacemacs-editing-styles`

Notes

I did not have time to attack hybrid mode, I should be able to do it
later.
2016-03-13 21:16:55 -04:00
Eivind Fonn
411be27ed1 Remove enable-semantic-mode function
- No reason to require semantic manually
- Don't set submodes in a hook function (hard to change for user)
2016-03-10 23:13:19 -05:00
Allen Li
974c92e758 Make pylookup use std completing-read function 2016-03-03 20:51:18 +01:00
justbur
39e06feba9 Use unless-debug version of condition-case
It's not possible to get full backtraces in these instances when an
error is signaled, and I think we should generate full backtraces when
debug-on-error is enabled as a general rule.

I had to make this change at one place to track down the root of problem
2 in #5200.
2016-03-03 20:30:30 +01:00
darkfeline
6d331bc5a4 Fix pylookup binding
Fix pylookup binding
2016-02-24 23:18:56 -08:00
justbur
e69d5500bc evil-jumps: Fix old function names
evil-jumper--push is now evil--jumps-push
2016-02-23 20:45:18 +01:00
Alejandro Catalina
bdd702dfbe evil: enter insert-state only from normal-state 2016-02-23 20:42:59 +01:00
Eivind Fonn
f3a15840b9 Add anaconda-eldoc-mode 2016-02-16 23:02:07 -05:00
justbur
aab007d225 evil-jumper: Remove obsolete package
The functionality is now incorporated into the evil core and this
package has been marked as obsolete.
2016-02-16 21:23:07 -05:00
Fabien Dubosson
06cb27e1dc [doc] Fix some additional SPC : to SPC SPC 2016-02-07 14:39:54 +01:00
Jaakko Luttinen
34df7b03b0 Add key binding for going back in anaconda mode
There are keybindings `C-o` and `M-*` to go back already, but it could
be a good idea to add an entry to `SPC m g` (or `, g`) menu where the
other movement commands are.
2016-02-02 21:23:17 +01:00
Eivind Fonn
e29ac21345 Register all REPLs and make SPC m ' bindings 2016-01-31 23:39:25 -05:00
Eivind Fonn
e9f8377b92 Tweak flycheck loading process 2016-01-31 23:04:48 -05:00
Fabien Dubosson
7f201b5b98 Fix parenthesis code style in Python packages 2016-01-31 21:48:52 +01:00
Christoph Paulik
0cd242315b Add live-python mode to python layer as extension 2016-01-31 21:47:18 +01:00
Christoph Paulik
f50859ab97 Revert "Set global pyenv version if no .python-version file exists"
This reverts commit bddf9de8f1.

When pyenv-auto-set-local-pyenv-version is set to 'on-visit then this
switched the python version when e.g. using jump to definition.
2016-01-26 01:21:02 -05:00
Christoph Paulik
0057df5cf5 Only load pyenv if it is installed
fix #4779
2016-01-24 14:42:59 +01:00
Christoph Paulik
bddf9de8f1 Set global pyenv version if no .python-version file exists 2016-01-23 17:09:52 +01:00
Eivind Fonn
0f5d576ada Re-add py-yapf 2016-01-23 15:00:23 +01:00
syl20bnr
33ead6fc42 Deprecation of extensions and <pkg>-excluded-packages variables
As announced in previous releases, see CHANGELOG.next for more info
in the Breaking Changes section.
2016-01-17 22:06:04 -05:00
syl20bnr
046d86800c Clean copyrights and update for year 2016 2016-01-11 21:42:17 -05:00
Fredrik Bergroth
c302ae4e67 Properly read version in .python-version
Fixes #4514
2016-01-11 01:13:09 -05:00
justbur
b0ee301845 layers: Conditionally load helm packages
Only use them when the spacemacs-helm layer is used.
2016-01-09 13:36:03 -05:00
syl20bnr
ae64d5b955 python: sort key bindings 2016-01-08 22:37:35 -05:00
Christoph Paulik
d4dfb385e7 Improve Python virtual environment docs and keybindings
Inspired by the discussion in
https://github.com/syl20bnr/spacemacs/issues/2841 I thought it was
useful to improve the Documentation and provide keybindings for all the
useful `pyvenv` functions.
2016-01-08 21:04:28 +01:00
syl20bnr
cddf18ff1e Update install layer section in REAMDE.org files 2016-01-06 00:21:55 -05:00
syl20bnr
db5901b3be python: Remove call to dash -when-let
Plus remove unnecessary defer t
2015-12-19 22:33:24 -05:00
Fredrik Bergroth
577e7b2d86 Auto-activate local pyenv version 2015-12-19 22:30:07 -05:00
Eivind Fonn
ac0ba50154 Make flycheck/flyspell hooks more explicit 2015-12-11 02:08:55 -05:00
hyh
979867447e Fix makefile for python version 2.7.10 2015-12-03 23:59:15 -05:00
Eivind Fonn
c893383fe4 Fix some documentation bugs
- CSS links
- GIFS in published version
- Unify layer doc titles
- Change emoji layer emojis to an image
2015-12-03 23:50:29 -05:00
Fabien Dubosson
3a5c375c6c Correct forgotten python major mode bindings 2015-11-22 18:45:12 +01:00
justbur
9befd20a1a layers: Transition to new key bindings functions
Removes dependence on evil-leader centralizing control over the method
of key binding in core-keybindings.el
2015-11-21 18:22:51 +01:00
Eivind Fonn
e7fbc84ff0 Remove package guards for evilified
See discussion in #3879
2015-11-21 11:07:14 +01:00
justbur
b294461957 evilified-state: Make into local package 2015-11-18 23:35:01 -05:00
Wieland Hoffmann
602a21beb9 python: list the correct keybindings for interacting with pyenv 2015-11-16 12:39:16 +01:00
Eivind Fonn
38e48aa95d Highlight TODO keywords in all prog modes
Also make the colon optional
2015-11-14 00:34:05 -05:00