Commit Graph

199 Commits

Author SHA1 Message Date
a70e634ebd refactor(:lang): move tree-sitter init
Moved add-hook calls (for tree-sitter initialization) into their
respective modes' config blocks, or nearby, to be consistent with how
other, similar tools (like lsp!) are initialized, and does so at
runtime, rather than at expansion/compile time, which eval-when! caused.
2022-07-25 17:34:44 +02:00
3b3857d57a fix(python): conflicting pyimport-remove-unused keybind
Binding for `pyimport-remove-unused` clashes with `py-isort-region`
2022-07-23 16:00:40 +02:00
773122f1ec fix(python): syntax highlighting in 28.1
Python syntax highlighting was broken in the 28.1 release.

Close: #6414
Co-authored-by: dani84bs <dani84bs@users.noreply.github.com>
2022-06-21 14:32:13 +02:00
7f814e5d99 refactor(:lang): redo tree-sitter hooks
- bind to major-mode-local-vars-hook instead of major mode hook
- bind the autodef tree-sitter! instead of the functions.
2022-05-22 21:26:08 +01:00
0c2f986708 feat(:lang): enable ts text objs in modes 2022-05-22 21:26:03 +01:00
06ed5ade3f refactor!(tree-sitter): add +tree-sitter flag
BREAKING CHANGE: break the global nature of the tree sitter
module by adding a +tree-sitter flag to every applicable module

In the background this hooks turn-on-tree-sitter-mode
to the major-mode-hook of the language.
This may also solve the eager loading of tree sitter
2022-05-22 21:26:00 +01:00
f51a2cdd3a fix(python): usage of obsolete alias letf
Amend: 04b76fd0ce
2022-04-18 18:14:16 +02:00
04b76fd0ce fix(python): HTTP request from pip-requirements-mode
pip-requirements-mode fetches the pypi.org package list via HTTP
request, which blocks. This can sometimes take unbearably long in cases
where the user has a slow or no internet connection.

This fix defers this behavior until the first time completion is
invoked.

Fix: #5998
2022-04-17 03:23:40 +02:00
6f8b83b884 refactor(default,python): move smartparens config
Ref: 41cbb1fe7b
2022-04-01 19:12:35 +02:00
ff31427687 tweak(python): use pyproject.toml as project file
With PEP 518, Python defined a general Python project configuration
format that is called pyproject.toml
2022-04-01 04:31:59 +02:00
41cbb1fe7b tweak(python): update smartparens config
- Automatically close f-strings
- Don't insert trailing colons in function definitions
2022-04-01 04:31:59 +02:00
d58d084774 tweak(:lang,:tools): start eglot/lsp-mode later
To ensure lsp/eglot settings have precedence over local servers (e.g.
cider and lookup handlers).

Ref: clojure-emacs/cider#3170
2022-03-30 17:32:47 +02:00
80ac69c14e fix(python): deprioritize ~/.conda detection
Since ~/.conda is always created, whether or not the other possibilities
exist, best we treat it as a last resort.

Fix: #6071
2022-02-01 18:56:16 +01:00
bcb29f7d17 feat(python): search for anaconda home in ~/.conda
What even are standards?
2022-01-27 18:18:52 +01:00
8b41f44882 refactor(python): remove redundant pyright+eglot config
joaotavora/eglot@fd27cdc8f9 adds Pyright support to Eglot, so these
lines can be removed.

Amend: 34cb632a61
Revert: #5355
Ref: joaotavora/eglot@fd27cdc8f9
Ref: joaotavora/eglot#742
2022-01-27 15:44:45 +01:00
1d0f4ca424 tweak(python): use python-shell repl handlers
Fix: #4375
2021-12-18 10:45:17 -05:00
c8b15fef73 feat(python): add miniforge support to conda.el
Look for "~/miniforge3" and "~/.miniforge3" as possible locations for
`conda-anaconda-home`.
2021-12-12 23:13:41 +01:00
c0490697c0 feat(python): add eglot support for +pyright (#5355) 2021-09-14 14:26:24 +02:00
40ef70d3ca Merge pull request #4855 from daanturo/python-repl-docsets
Extend Python's docsets to Python REPL
2021-04-15 00:27:16 -04:00
82dfa22e77 Merge pull request #4851 from daanturo/pyenv-fails-friendly
Active pyenv-mode only when pyenv exe is found
2021-04-14 12:46:43 -04:00
4af36e0dab Change poetry-tracking-strategy for performance. 2021-03-30 17:00:00 +07:00
7ae2bf962e Active pyenv-mode only when pyenv exe is found. 2021-03-27 16:24:40 +07:00
0e9fd716d2 Extend Python's docsets to Python REPL. 2021-03-19 20:41:20 +07:00
dad58cb31d Add "Pandas" to python-mode's docsets. 2021-03-13 22:41:48 +07:00
c8bfbda556 Make anaconda & pipenv integrations remote-aware
Resolve paths to pipenv and python-shell-interpreter on the remote if
over tramp.
2021-01-09 02:55:09 -05:00
fcdd238291 Merge pull request #4146 from sei40kr/python-poetry-tracking-mode
Enable poetry-tracking-mode
2020-11-01 16:25:38 -05:00
17b6129d34 Minor refactor 2020-10-31 16:18:15 +09:00
4f7d9f7171 Merge pull request #4144 from davidh38/config/add_testall_keybinding_pytest
Add keybinding for testing all project functions with pytest
2020-10-29 02:07:26 -04:00
9baf656ff9 Enable poetry-tracking-mode 2020-10-24 20:17:00 +09:00
3788fd2c44 Add Keybinding for testing all functions in the project with pytest 2020-10-24 01:29:44 +02:00
ff6699e79a Merge pull request #3716 from benbovy/fix-pytest-popup
Fix python-pytest-popup
2020-10-21 12:04:52 -04:00
93937ab14d Fix #3964: add ~/opt/miniconda3 to list of default paths 2020-10-13 22:52:10 -04:00
518c97a2ac Rename {if,when}! -> eval-{if,when}!
To better represent its purpose, as extensions to Emacs' eval-when*
API (for control flow at compile time).
2020-08-27 01:10:08 -04:00
d7055090fe autoload python-pytest-dispatch 2020-08-26 09:24:22 +02:00
1c99aed0c0 Add +python-{ipython,jupyter}-command vars for REPLs 2020-08-25 21:22:56 -04:00
f6f90c9791 Fix lsp packages failing to load
As of emacs-lsp/lsp-mode@b9b0f34 there is no more lsp-clients, so load
these lsp packages after lsp-mode instead.
2020-08-20 03:54:44 -04:00
dddfd9a7b1 Fix #3787: only inhibit some hooks for org-src ops
Inhibiting all MAJOR-MODE-hook functions (to fix #3660) would mean
inhibiting some useful functionality, like indentation or syntax
highlighting modes. We only want to inhibit expensive hooks. Since Doom
adds these to MAJOR-MODE-local-vars-hook by convention, we can
selectively inhibit those instead.
2020-08-20 02:30:06 -04:00
7081d833f6 Move :ui pretty-code to :ui ligatures
Includes a major refactor of the module.
2020-08-20 02:14:32 -04:00
529c047310 fix python-pytest-popup
It is now obsolete, it has been renamed in
ee61741d4e
2020-08-10 15:05:54 +02:00
d39bd90106 Bump :lang python
cython/cython@5d8527d -> cython/cython@0208bf2
emacs-lsp/lsp-pyright@f85ad03 -> emacs-lsp/lsp-pyright@3cf2e8f
emacs-lsp/lsp-python-ms@d42ffc2 -> emacs-lsp/lsp-python-ms@7a502e6
galaunay/poetry.el@d876522 -> galaunay/poetry.el@22a76cd
pythonic-emacs/anaconda-mode@6094ded -> pythonic-emacs/anaconda-mode@73266a4
wbolster/emacs-python-pytest@dd05959 -> wbolster/emacs-python-pytest@6a3b4e5
2020-08-07 19:10:06 -04:00
046dfb6475 lang/python: refactor lsp integration 2020-07-27 01:20:49 -04:00
e6ae1d295c Add support for pyright language server 2020-07-25 11:39:37 -07:00
f0ec335709 Merge pull request #3405 from ztlevi/conda-fix-path
python: fix conda path
2020-06-18 19:57:46 -04:00
751c5e795d python: fix path 2020-06-17 13:03:08 -07:00
121046359d Improve regexp for matching config files 2020-06-01 15:54:50 +03:00
1b86d37ba1 Add highlighting for Python-related config files 2020-05-31 22:55:25 +03:00
3e5b7cce3f [eglot] Add support for eglot lsp client in emacs
- Update README
- Add eglot-specifics to cc, rs, py, hs
  removing unused lsp-mode packages when eglot is active
- Add eglot-specific bindings
- Add doctor warnings for debugger +lsp and +peek
- Add eglot-backed lookup-handlers
- Add flycheck checker using eglot for :checkers
  syntax users (using flycheck/flycheck#1676 and
  flycheck/flycheck#1592 discussion).
  This implementation is based on @marsam code, and uses recent
  Flycheck development in order to make the code smaller and
  easier to maintain.
2020-05-28 09:34:10 +02:00
4891a7151f Add Poetry support 2020-04-22 20:51:30 +03:00
4eec1141c1 Ensure anaconda-mode attempts to activate after lsp 2020-01-18 22:02:17 -05:00
12094788d7 Fix references to :tools fly{spell,check} 2020-01-14 03:04:26 -05:00