Commit Graph

101 Commits

Author SHA1 Message Date
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
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
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 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
Maximilian Wolff 500e58341c
Defer loading of lsp servers up to when the buffer is visible 2021-06-06 22:26:31 +02:00
Daniel Nicolai f8301056c9
Update python layer to use pylsp (new maintained fork of pyls) (#14772) 2021-05-13 18:30:32 -04:00
Lucius Hu bc27203615
Removed legacy codes for emacs-version < 25.1 (#14497) 2021-04-28 05:04:53 +00:00
Benjamin Sorenson d2b7399958 Fix bug in `spacemacs//python-setup-backend ()` 2021-04-09 21:39:07 +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
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
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
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
Hans Jang 39f774f70b
[Python] Reflect upstream pytest update to python-test-last
This is a squash commit, it contains:
* Reflect upstream pytest update to python-test-last
* Update CHANGELOG.develop
2020-04-16 23:37:25 +02:00
Ivan Yonchovski c3f13d0391 Removed company-lsp in favour of company-capf
- Also removed some cquery artifacts which accidentally ended up in this PR
instead of in https://github.com/syl20bnr/spacemacs/pull/13446
2020-04-04 08:24:44 +02: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
James Gough e6997638e7
Set VIRTUAL_ENV environment variable when switching to new pyenv
This environment variable is used by python LSP to determine
the pyenv virtual environment to use. When switching to a different
project using projectile 'switch-to-project', it should only be
necessary to restart the LSP server but a restart will only
work if this VIRTUAL_ENV changes value too.
2019-12-03 20:37:43 +00:00
Nam Nguyen 729ad60b28 Support relative virtualenv path in .venv file for Python layer 2019-11-08 23:28:30 +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
syl20bnr ac30247811 [lsp] When used, make LSP the default backend for all supported lang
* Added a new function to each language to select the backend
* Use these new functions in all `pcase`.
2019-09-30 00:49:44 -04: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
Danny KB 901b1ad6e4 [python] fix IPython shell setup on windows path with whitespaces
On systems where IPython executable path contains whitespace
(e.g, if IPython is under Local Appdata and your Windows username has
whitespace), the shell command was invalid, quoting the executable is required.
2019-09-22 18:53:44 +02:00
lsp 054856be3d Don't start the lsp server until after mspyls is optionally required
Otherwise, lsp will attempt to use pyls when the user wanted to use mspyls
2019-09-18 19:26:12 +02:00
yqu212 9f72af3b73 Add lazy loading of lsp-python-ms 2019-09-10 21:15:59 +02:00
smile13241324 53553e2307 [python] Add lsp as possible python formatter 2019-08-31 23:21:03 +02:00
smile13241324 290cacf2a9 [python] Bind formatter to == only for LSP backend 2019-08-31 22:55:34 +02:00
cormacc c4a05f7ebf Corrected keybinding collision (format-buffer)
`spacemacs/python-format-buffer` was bound to '='.
Subsequently clobbered by lsp layer declaration of '=' as prefix with subsidiary
keybindings.
Resolved by moving `spacemacs/python-format-buffer` binding to '=='.
Updated README accordingly.

Opportunistically added 'mspyls' dir to .gitignore
2019-08-31 22:19:53 +02:00
Vikash Balasubramanian 3ed24436cd Enables eldoc for anaconda-mode 2019-07-07 09:07:17 +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
Bet4 bb86989775 semantic: enable company and disable idle summary when gtags is enabled 2019-05-04 17:18:28 +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
Ivan Yonchovski 59c4f1f283 Use dap mode layer for python debugging
- I had to remove the "db" keybinding manually before setting the dap bindings.
  An alternative approach is to use a different binding for it.
2019-04-15 20:56:27 +02:00
rgb-24bit c2a351cac7 Fix conflict between pipenv directory .venv and pyvenv file .venv 2019-01-20 17:28:43 +02:00
cormacc c375bc428f Flattened some cquery/ccls configuration
c-c++-lsp-initialization-options:
-> ccls-initialization-options
-> cquery-extra-init-params (cacheFormat set to "msgpack" by default)

c-c++-lsp-args:
-> ccls-args
-> cquery-extra-args

c-c++-lsp-cache-dir:
-> ccls: Appended to initialization-options
-> cquery-cache-dir

<<Amendment 1 21/12/18>>
Removing 'clangd' from list of lsp clients to squash per-file prompt for
language client.
Updated lsp/packages.el to reflect upstream lsp-mode function name changes.
Python layer -- added if guards to prevent anaconda package loading / keyboard
shortcut config when lsp backend selected.
2018-12-22 12:51:17 +02:00