<<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.
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>
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.
problem:
some layer packages lists have the open and closing parentheses on the same line
as the first and last listed package, but most seem to have them on a separate
lines.
solution:
put the open and close parentheses on separate lines, except for lists with only
a single package, they are written on the same line as the variable name and
parentheses.
fix the lists indentation
Using a conditional instead of removing entirely since anaconda-mode code has
been in some flux recently. If the keymap stays obsolete when the dust settles
we can remove this block.
The byte compiler doesn't know about `smartparens-strict-mode' because
smartparens is lazy loaded, so wrap the variable reference in `bound-and-true-p'
to silence a warning that appears on Spacemacs startup.
To reproduce:
1. Install a fresh Spacemacs from develop branch
2. Use spacemacs-base distribution
3. Select only these configuration layers: spacemacs-editing python
4. Restart Emacs to install packages
5. Restart Emacs again and observe warning:
Warning (bytecomp): reference to free variable 'smartparens-strict-mode'
This reverts commit 29c78ce841 and all other fixes
that have been made afterwards.
The motivation is that use-package is seen by many as a replacement for
`require`. Is use-package always defer the loading of packages then is breaks
this use case, this does not respect POLA so even if it was making Spacemacs
loading faster (up to 3s faster on some startup on my machine) we just cannot
use it, it would be irresponsible. Spacemacs should be easy to use, loading
performance will come with time but it is not a priority.
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.
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.
- 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
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.
* 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#7538Fix#5737