Commit Graph

323 Commits

Author SHA1 Message Date
Derek 2c54914370
layers/+lang/python/funcs.el: Fix typo in flag (#15905) 2023-01-26 04:03:47 -05:00
lin.sun d10056b2d1
fix(python/autoflake): deal with non-zero exit, and better docs
Co-authored-by: Lucius Hu <lebensterben@users.noreply.github.com>
2023-01-09 22:33:42 -05:00
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 fd749704ff Fix the #15852 Wrong type argument 2022-12-26 23:06:26 +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
jgart 1fde8719e9 python: Fix broken link 2022-05-12 17:20:28 +02:00
Rathur421 895deed51a Add support for code-cells in python layer 2022-05-11 19:15:31 +02:00
Harold Cooper b3e67aafe2
fix typo (#15470) 2022-04-14 13:56:58 -04:00
shdennlin 8cbcc9f085 Fix #14162, python-execute-file not using in virtual environment 2022-01-01 15:55:17 +01:00
Maxi Wolff 1c0d7be28b
[python] Fix broken link 2021-11-02 23:00:02 +01:00
Lucius Hu 7d39d7363b python: Update README.org
It turns out that we've already migrated to pylsp from pyls a while ago, except that README.org is not updated.
closes https://github.com/syl20bnr/spacemacs/issues/15036
2021-11-02 22:23:24 +01: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
Maxi Wolff d5cee22116
[python] Make ipython version detection more robust
The version string may return an empty string in that
case we treat this like a legacy version.
2021-09-29 21:08:51 +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
Борис Верховский e2aff2c915 use new breakpoint() for more Python versions
follow up to #11490
2021-08-02 12:32:02 +02:00
Arif Er 9bde46ee57
[python] Fix keybinding in README (#14851) 2021-06-16 16:14:01 +00:00
Maximilian Wolff 500e58341c
Defer loading of lsp servers up to when the buffer is visible 2021-06-06 22:26:31 +02:00
Maximilian Wolff 80e2fd4279 [python] Add instruction to install pyls-memestra
for detecting of deprecated apis
2021-05-14 17:37:17 +00:00
emacspace 5c214e5160
documentation formatting: Thu May 13 22:33:42 UTC 2021 (#14773) 2021-05-13 18:51:36 -04:00
Daniel Nicolai f8301056c9
Update python layer to use pylsp (new maintained fork of pyls) (#14772) 2021-05-13 18:30:32 -04:00
Zach Pearson d2e9730acb
Update pyls install command to use quotes (#14741) 2021-05-05 13:28:52 -04:00
Lucius Hu bc27203615
Removed legacy codes for emacs-version < 25.1 (#14497) 2021-04-28 05:04:53 +00: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
emacspace 95a703b684 documentation formatting: Fri Apr 9 11:56:19 UTC 2021 2021-04-09 21:41:03 +02:00
Benjamin Sorenson d2b7399958 Fix bug in `spacemacs//python-setup-backend ()` 2021-04-09 21:39:07 +02:00
Julien Debon e817e0faae
[Python layer] Add links to the LSP implementations (#14562)
* [Python layer] Document Nix + Microsoft LSP

* Document how to make Nix + Microsoft LSP work
* Add links to Microsoft LSP and Pyright repos

* Remove nix part
2021-04-08 22:10:33 +02:00
Lucius Hu f7c2ce8fb6 fixup! python: refactor 2021-04-04 21:23:01 +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
Corentin 4409d39bec Fixes error if parsing ipython dev version 2021-03-13 23:40:53 +01:00
duianto 9375d6f54d Add missing space before defun args parens 2021-02-10 08:51:55 +01:00
Maximilian Wolff 7b7076d4ba [python] Define purposes for specialised buffers 2021-01-02 20:30:45 +00:00
emacspace d545dcbdbe documentation formatting: Wed Dec 30 21:04:48 UTC 2020 2020-12-30 23:41:14 +01:00
Maximilian Wolff 08355b0b6f
[python] Fix one small issue in latest doc additions 2020-12-30 21:55:27 +01: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