Commit graph

182 commits

Author SHA1 Message Date
Lin Sun
37cdd5069f layers/+lang/python/packages.el: Fix the invalid 'args' in the condition 2022-12-28 14:43:11 +01:00
Lin Sun
3afc9afa4c *layers/+lang/python: enahnce the virtual environment detection 2022-12-22 08:42:11 +01:00
Rodrigo Kassick
58c56f8066 fix: fix code-cells-mode setup to avoid undefined symbol errors on define-key
Commit 54f12b66f correctly moved code-cells setup to use-package's :init to
ensure that python-mode had a hook for code-cells-mode -- otherwise, code-cells
would never be loaded automatically with python major mode.

A side-effect of this change was that now there was a minor mode keymap for
`code-cells-mode` , which may not have been loaded unless emacs has already
opened a python file.

When calling `describe-key` , the function `help--binding-locus` would iterate
over `minor-mode-map-alist` and, when it reached the entry for code-cells-mode,
a call to `(symbol-value 'code-cells-mode)` would fail with a `void-variable`
error. Despite `code-cells-mode` being an auto-loadeable symbol, `symbol-balue` would not trigger the autoload.

The solution (as pointed by @sunlin7) was to call `add-hook` on `:init` and
`spacemacs/set-leader-keys-for-minor-mode` on `:config`
2022-09-23 15:26:58 +02:00
Maxi Wolff
54f12b66f0
Revise latest code-cells-mode fix
Reaction to comment on e74610ddb5
2022-09-15 17:39:00 +02:00
Lin Sun
e74610ddb5 [python] fix config issue for native-comp 2022-06-20 13:14:01 +02:00
Arif Er
00f9ab19ac chore: update copyright headers to 2022
The script used to identify and update the change is added into the GitHub
workflows script directory. A workflow action can be created to trigger the
script to update the headers on the first of every new year. Possibly a task for
a consequent PR.
2022-06-03 17:32:20 +02:00
Thanh Vuong
b8f471dc1c
[core] new recipe :fetcher local
with this curent (package :location local) can be replaced with (package
:location (recipe :fetcher local)) then quelpa will install local pacakge. We
have the benefit of bytecompile and autoload

[packages] use new fetcher for local
2022-05-29 15:58:19 +02:00
Daniel Nicolai
f4b04bcf22 Add obsoletion notification evilified-state-evilify 2022-05-29 14:05:07 +02:00
Rathur421
895deed51a Add support for code-cells in python layer 2022-05-11 19:15:31 +02:00
Maxi Wolff
d7a0492ac7
[python] Remove comments and fix new commands 2021-09-29 21:28:50 +02:00
Daniel Nicolai
071b48ba32 Add pydoc to python layer for better python doc functionality
Currently the python layer (without anaconda backend) provides only helm-pydoc
or pylookup-lookup-at-point functionality. Both these functions are cumbersome.
`pydoc-at-point-no-jedi` adds simpler doc functionality, therefore this commit
adds this command as a third option. It places it under `SPC m h p` because `SPC
m h h` is already taken by the anaconda doc functionality (it could be placed on
`h h` if anaconda is not available, but I did not bother to implement it)
2021-09-29 21:18:00 +02:00
Daniel Nicolai
cc8f3a3a32 Add python-send-shell-with-output command
Currently when using any python-send-shell command, the output of the evaluation
is not shown in the comint shell (see Emacs bug#49822).
This commit adds a simple function to send input and get the output printed in
the comint process buffer.
2021-08-02 22:16:37 +02:00
Sylvain Benner
4a1f0ae49f [python] Fix directory specific python-backend
With this fix it is now possible to select different backends in
different project using the directory variables mechanism of Emacs
(the file .dir-local.el)
2021-04-18 08:56:04 +02:00
Lucius Hu
26eb3df294 python: refactor
- Moved backend determination to `config.el`
- Replaced unnecessary backquote construct with simple quotation
- Replaced `pcase` form with only one-arm with `when` or `unless` form
- Replaccd `(cond ((eq foo) bar))` form with `(pcase (foo bar))`
2021-04-04 12:48:21 +02:00
syl20bnr
97cd83e169 Apply GPLv3 terms explicitly to all elisp files 2021-03-25 22:59:32 -04:00
syl20bnr
d55a9e2e67 Update header for year 2021 2021-03-25 22:59:32 -04:00
Maximilian Wolff
6d40ee8e10 Revert "python: replaced local package pylookup with the one on github"
This reverts commit 6e0f650101.
The reason for this is not that the dynamically build pylookup.py
is not found by emacs, this I have already solved locally by checking
the quelpa build directory.

However the issue is that the library is not compatible with python 3
the local version however is.

So this is effectively a fork and must be kept till python 3
compatibility for pylookup has been achieved.

Should fix #14544
2021-03-21 09:53:13 +00:00
Maximilian Wolff
a9d5c5ed25
[python] Fix invalid recipe declaration for nose.el 2021-03-20 00:24:59 +01:00
Lucius Hu
fb16fa95cb
python: replaced local package nose with syl20bnr/nose.el 2021-03-20 00:24:28 +01:00
Maximilian Wolff
e0a94825fe
[python] Fix broken fetcher declaration for pylookup 2021-03-20 00:11:38 +01:00
Lucius Hu
6e0f650101 python: replaced local package pylookup with the one on github 2021-03-19 23:54:13 +01:00
Maximilian Wolff
6018580958 Make layers activate/deactivate the right version of smartparens
Before layers were sometimes only activating the non strict
version of smartparens. Also some were only disabling
the non-strict version leaving some of the smartparens
advices intact.

With this PR, all layers set the right version of smartparens.
Also if the layer is trying to disable it a standard function
will now take care to disable all versions of smartparens.
2021-03-16 17:47:15 +00:00
Maximilian Wolff
7b7076d4ba [python] Define purposes for specialised buffers 2021-01-02 20:30:45 +00:00
Peter Kuchar
638bbb0c38
[+lang/python] Poetry integration for python layer
Adding Poetry integration (tool for managing virtual environments in Python)
2020-12-30 21:53:27 +01:00
Martin Račák
9c31d4f953 Hide sphinx-doc-mode lighter 2020-10-22 22:53:05 +02:00
Stefan Ruschke
00b1f419a5 [python] Add sphinx-doc support 2020-10-01 13:23:47 +02:00
Maximilian Wolff
a55d6287b1
[python] Fix small unintentional change from copyright date update 2020-09-23 21:26:07 +02:00
Robert O'Connor
82ba73a1c0
update copyright to 2020 2020-09-23 21:25:01 +02:00
sunlin
8d204c78b4
Add `spacemacs/python-shell-send-statement' for sending statement (#13945) 2020-09-18 21:15:53 +02:00
Daniel Nicolai
1147e758bd Implement pyvenv-tracking-mode
The pyvenv-tracking-mode changes the virtual environment on changing focus
between buffers.
2020-09-14 18:53:19 +02:00
beyondpie
8da6653d2b
[Python] Add python-shell-send-line function (#13942) 2020-09-14 18:32:23 +02:00
Ayush Goyal
96cc779cbe Support pyright language server for python layer
Microsoft has released pyright language server for python. It boasts better
performance than the old Microsoft language server for python. This commit adds
supports for pyright language server in python layer
2020-09-04 18:25:21 +02:00
Jaakko Luttinen
3834bb1151 [python] Support --last-failed for pytest. Fixes #12023 2020-07-28 14:19:44 +02:00
Maximilian Wolff
1fd90fc1dc
Update instructions for dap integration and update existing layers
The previous way of adding dap to a layer did add the mode
unconditionally to `spacemacs--dap-supported-modes` causing
dap bindings to be added also when no lsp backend was used.
2020-05-16 23:40:38 +02:00
Jee L
36ad2b28d2
[Python][LSP] Change mspyls publish directory according to system type 2020-02-10 19:45:46 +00:00
Maximilian Wolff
23056c9882
Revert "Revise python layer"
Removing the getter function for python-backend had
unintended side effects. This should restore the old
behaviour.
2020-01-23 23:15:28 +01:00
Maximilian Wolff
9720127282
Revise python layer
Make LSP be used as default backend
Request DAP layer when LSP is used as backend
Update README.org with latest pyls package dependencies
Remove obsolete getter functions
2019-12-15 14:29:33 +01:00
lin.sun
7f6b4205cb
Automatically choose the `lsp' as python-formatter backend when lsp-layer is enabled. 2019-12-15 14:29:33 +01:00
chysi
fe028e9887
Update hy layer to new hy/python modes
Replace old "hy-shall-start-or-switch-to-shell" with "run-hy"
Expand pipenv to hy-mode
2019-11-23 21:20:16 +01:00
Martin Račák
1fec4ec135 Fix conditional backend setup
* Use spacemacs//python-backend to check which backend is being used
* Set leader keys for anaconda in :config to avoid overwriting by tags layer
2019-10-12 15:21:40 +02:00
Martin Račák
c95534ace5 Revert "Use anaconda-mode-find-definition for SPC-m-g-g"
This reverts commit 9bafd3f561.
2019-10-12 15:21:40 +02:00
Rakan Alhneiti
9bafd3f561 Use anaconda-mode-find-definition for SPC-m-g-g 2019-10-11 22:03:59 +02:00
syl20bnr
9606dd344e [dap] Refactor configuration dap config in layers
* use local-vars-hook coupled to setup function for dap
* define new private layer variable `spacemacs--dap-supported-modes` to
  configure key bindings. This allows to move the key bindings definition from
  `funcs.el` to `packages.el`
* remove duplication of DAP key bindings in READMEs by pointing to the dap layer
  documentation
* alphabetically sort package configuration
2019-09-30 00:34:26 -04:00
torstein
909d755667 Do not use tabs in inferior python mode 2019-09-22 19:05:14 +02:00
yqu212
9f72af3b73 Add lazy loading of lsp-python-ms 2019-09-10 21:15:59 +02:00
Trapez Breen
9dbc0b9d0c Fix failing lsp-python-ms setup
Configuring lsp-python-ms variables properly.
2019-07-07 11:26:26 +02:00
cormacc
00b2db982d Added support for Microsoft Python Language Server
<<26/04/2019>>
Incorporated feedback from robbyoconnor and yyoncho.
Rebased.

<<08/04/2019>>
Rebased on develop tip

<<17/04/2019>>
Rebased

<<02/06/2019>>
Rebased. Incorporated feedback from duianto.
2019-06-02 21:14:50 +02:00
Mike Macpherson
c339656172 python: Add support for black formatter 2019-04-18 18:34:09 +02:00
Trapez Breen
d25b329c17 Shadow python-mode-hook during python-send-shell-* 2019-04-18 17:56:47 +02:00
Loys Ollivier
7667df6319 python: add diminish for importmagic
importmangic does not have a diminish character.
Add diminish characters to make the modeline nice(r).

Signed-off-by: Loys Ollivier <loys.ollivier@gmail.com>
2019-04-04 12:33:57 +02:00