Commit graph

2292 commits

Author SHA1 Message Date
syl20bnr 74fdbb6795 Refactor and simplify company backends declaration
Enabling a company backend for a specific mode was a tedious tasks with code
scattered at different locations, one for local variable definitions, one for
company hook function definitions and another where the backends were pushed to
the local variables (which was problematic, since we ended up pushing the same
backends over and over again with `SPC f e R`, pushes have been replaced by
add-to-list calls in the new macro).

All these steps are now put together at one place with the new macro
spacemacs|add-company-backends, check its docstring for more info on its
arguments.

This macro also allows to define arbitrary buffer local variables to tune
company for specific modes (similar to layer variables via a keyword :variables)

The code related to company backends management has been moved to the
auto-completion layer in the funcs.el file. A nice side effect of this move is
that it enforces correct encapsulation of company backends related code. We can
now easily detect if there is some configuration leakage when the
auto-completion layer is not used. But we loose macro expansion at file loading
time (not sue it is a big concern though).

The function spacemacs|enable-auto-complete was never used so it has been
deleted which led to the deletion of the now empty file core-auto-completion.el.

The example in LAYERS.org regarding auto-completion is now out of date and has
been deleted. An example to setup auto-completion is provided in the README.org
file of the auto-completion layer.
2017-01-02 00:39:04 -05:00
syl20bnr bdd4e6c23f typescript: move eldoc config to init function 2017-01-02 00:12:51 -05:00
syl20bnr c725823e73 javascript and react: reformat code and move funcs to funcs.el
Some conventional cleanup.
Note that the function `spacemacs/js2-refactor-set-key-bindings` has been
removed since it is not used anywhere.
2017-01-01 22:45:23 -05:00
syl20bnr ab34cc2d9d html: set company min. prefix length to 0 for company-web backend
for more info: https://github.com/osv/company-web/issues/4
2016-12-31 00:14:30 -05:00
syl20bnr e1efeea5d6 html: fix addition of company backends
Move add-company-hook calls to correct init functions (only css backend is from
company package, the others are from company-web).

Correctly add company backends for jade and slim. Jade has been renamed to
Pug , there is no guarantee at all that jade references still work. To check.
2016-12-31 00:01:58 -05:00
ralesi 81b782e5df company-web: defer company-web loading 2016-12-30 23:23:43 -05:00
Nir Friedman 946f14e0d3
Overhaul buffer transient state
- add new bindings to move and swap buffers, and switch active window,
   by number
 - change kill buffer shortcut to d for consistency
 - Change docs appropriately
2016-12-28 21:56:18 +02:00
d12frosted d76c5a75d5
repalce fill-or-unfill with unfill package 2016-12-27 09:57:49 +02:00
Koray Al aaefaa3573
Added auto load virtualenv support via .venv file
The `pyvenv-mode` doesn't provide a list of available virtual
environments. So it's not currently possible to check if the
provided virtualenv name is available
2016-12-27 09:55:28 +02:00
duianto 7021490b61
update select-current-block, reduce code
Removed the variable p2, it was defined and assigned, but never used.
Removed two progn expressions that wasn't needed.

Implemented bmag's suggestions:
Changed "if" to "when", and removed a superflous p1 assignment.
2016-12-27 09:52:24 +02:00
Adel Qalieh 8e7fe6e1f2
Add keybinding for spacemacs/alternate-window
spacemacs/alternate-window was suggested to switch between the last selected
window, or the window-analog of SPC TAB (spacemacs/alternate-buffer). This is
part of a larger family of functions, such as spacemacs/jump-to-last-layout on
SPC l TAB and eyebrowse-last-window-config on SPC l w TAB.

Resolves #7845
2016-12-27 09:50:10 +02:00
ralesi 703733b46b Speedup: defer loading of helm-purpose. Requires all of purpose. 2016-12-24 21:03:52 +02:00
duianto f5cfa4ad17 replace 9 buffer-to-window entries with one 1..9
Resolves #8038
This replaces the <kbd>SPC b</kbd> buffer-to-window 1 to 9 entries, with just one 1..9 > buffer to window 1..9.
2016-12-24 21:02:53 +02:00
smile13241324 2b8db7c3ad Add evil keybinding "i a" for org-attach 2016-12-24 21:01:43 +02:00
Liu Xiang 8a68ae1d80 Use raw prefix argument instead numeric prefix argument 2016-12-24 20:54:42 +02:00
syl20bnr a5c87776d1 emacs-lisp: fix eval-last-sexp and add SPC m e C
Important evil advices for eval-last-sexp were removed for smartparens users,
it made eval-last-sexp not working correctly in normal state by evaluating the
sexp before the evil cursor and it was impossible to evaluate an sexp when the
cursor was on the last character of a line.

Also add SPC m e C which will execute the first defun or setq sexp encountered
before point.
2016-12-24 12:06:17 -05:00
Michal Muskala 831b01fd8e
Prevent from inserting too many "end"s in Elixir
Closes #8030
2016-12-23 14:02:52 +02:00
Nir Friedman bca0e4b6f6
Use helm ag file with interactive input 2016-12-22 17:47:58 +02:00
d12frosted 3e60792136
ivy delete file with confirmation 2016-12-22 15:53:28 +02:00
ralesi 1c8cb4a58c
Delete alternate actions is too invasive 2016-12-22 15:52:57 +02:00
d12frosted d3fd067a3d
defer flyspell-correct packages loading 2016-12-22 15:35:13 +02:00
ralesi 29925a0b94
Defer loading of flyspell-correct-helm, otherwise it just requires helm 2016-12-22 15:33:41 +02:00
Francesc Elies Henar 67dda61031
adds evilified-state-evilify-map binding <gf> 2016-12-21 22:24:24 +02:00
Francesc Elies Henar b87e6edf34
adds revert buffer binding 2016-12-21 22:20:37 +02:00
syl20bnr 5d73a500c0 markdown: hide MMM linter in mode-line 2016-12-19 10:50:14 -05:00
syl20bnr cb98c42ed8 markdown: correctly enable mmm-mode and add support for ini files 2016-12-19 10:46:46 -05:00
Alex Palaistras a9dd47691e
dumb-jump: Specify selector from completion framework used
This commit adds a conditional which allows `dumb-jump` to use a selector
matching the current completion framework used (`ivy` or `helm`), instead
of the default popup. This relates to work done for adding Helm support
to `dumb-jump` here: https://github.com/jacktasia/dumb-jump/pull/96

The motivation behind this is two-fold: the fact that popups are known
to be broken when used with conflicting packages, such as `fci-mode` for
showing a column marker, and the need for better completions with the
possiblity for fuzzy-matching. This should hopefully lead to a more
consistent experience as well.
2016-12-18 11:47:56 +02:00
duianto b3abf4269d
add function comment, evil goto next line indent
`spacemacs/evil-goto-next-line-and-indent` doesn't have a function comment, this corrects that.
2016-12-18 11:45:02 +02:00
Corey Grunewald b67118c8ca
Mark tern command as async. Fixes #7591. 2016-12-18 11:44:32 +02:00
syl20bnr 533b80fecf ansible: temporary hack to fix modified buffer on decryption 2016-12-16 09:17:05 -05:00
syl20bnr 590f229854 restclient: fix overriding of SPC j i
Scope `j i` key binding under major-mode specific leader key.
2016-12-16 08:57:45 -05:00
syl20bnr 679da2436a core: scope minor-mode specific key bindigns under major-mode leader
Also remove unnecessary bindings for org-edit-src-exit
2016-12-16 08:57:45 -05:00
syl20bnr 7b9143832d ansible: add support for company-ansible and ansible-vault
New key bindings to encrypt decrypt ansible-vault encrypted files.
New layer variable ansible-auto-encrypt-descrypt to control seamless edition
of encrypted files.
2016-12-16 08:57:45 -05:00
d12frosted 628562f0f7
add glsl-company to shaders layer 2016-12-14 20:21:28 +02:00
d12frosted 0477040f7e
expose org-journal binded functions as commands
And also fix indentation.

This is to complete #7060
2016-12-14 20:06:24 +02:00
Nick Anderson c37f4212e3
Add: org-journal support 2016-12-14 19:55:37 +02:00
Danny Navarro 6288b28bb0
Remove sbt-hydra rename wrapper
It has been already renamed as expected upstream.
2016-12-12 08:56:06 -03:00
Justin Burkett afa2226051 which-key: Fix transient state descriptions 2016-12-09 19:24:45 -05:00
Justin Burkett c69c3b7684 which-key: Implement combined select window keys
This is @deb0ch's idea and uses the new which-key interface
2016-12-09 19:24:45 -05:00
Joe Lane 43e199b6a5 add copy key to neotree
CHANGES
-------
Add new keybinding to neotree to allow the copying of nodes from the neotree
buffer. Update documentation as well.

WHY
-------
There appear to be all other common file operations bound to the neotree buffer,
however copying of a node is not.
2016-12-09 18:19:52 +02:00
Swaroop C H a0aad96050 Add key binding to run current Rust file
Meant for a quick-prototype flow only - use `spacemacs/open-junk-file' to
open a junk Rust file, type in some code and quickly run it.
2016-12-09 18:14:22 +02:00
d12frosted 20741006b3
add missing header in lua/packages.el file 2016-12-02 20:42:11 +02:00
Kristoffer Haugsbakk 4289a496de mu4e: use proper markup on keybindings
Also fill in missing table borders while I’m here.
2016-11-25 22:44:54 +02:00
bmag 471cabdfb8 Add missing parens in last commit 2016-11-25 20:12:48 +02:00
Justin Burkett 7bf00ad878 which-key: Update usage of replacement alists
See 19186917eb
2016-11-25 12:32:10 +02:00
Kristoffer Haugsbakk 3a61f8e6de Add verbatim markup to paths
By convention, filepaths are marked up with `=`.  Also add this markup to the
string `ViewLogMode`.
2016-11-25 12:23:39 +02:00
syl20bnr a1516a6003 Fix SPC b C-d and SPC b C-D conflict
Fixes #7814
2016-11-23 16:44:13 -05:00
syl20bnr e699f1816a core: wrap Emacs custom in a dotfile new function
New function `dotspacmacs/emacs-custom-settings` wrapping Emacs
custom settings sexps.
`dotspacemacs/emacs-custom-settings` is called just after the user
configuration (`dotspacemacs/user-config`)

Customize cannot write its auto-generated sexps inside a function, to
accomplish this we trick Emacs by setting the custom file to a file
in `.cache` directory, the path to this file is defined by the variable
`spacemacs--custom-file`. At the startup of Emacs we read this file
to insert its content inside the function
`dotspacemacs/emacs-custom-settings` in the dotfile, this is done in the
function `spacemacs/write-custom-settings-to-dotfile`.

I don't think we need to write the custom settings to the dotfile when
exiting Emacs as well, since we do it at startup at the very beginning
(i.e. before actually loading the dotfile) we should be OK.

Fixes #5170
2016-11-22 22:55:36 -05:00
Cadel Watson 0f01b0fb59 Change default fringe color for centered-buffer-mode.
The current default color is "black", which creates ugly bars for many
themes on both sides of the centered buffer. This change sets the fringe
color to the buffer's background color, which blends in nicely.
2016-11-22 20:41:45 -05:00
zhexuany 19592f0ad5 fixed syntax highloght in README 2016-11-22 20:41:45 -05:00