Commit graph

140 commits

Author SHA1 Message Date
Maximilian Wolff
500e58341c
Defer loading of lsp servers up to when the buffer is visible 2021-06-06 22:26:31 +02:00
Lucius Hu
652de66ab2 ruby: 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
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
Sid Raval
9b6a49d6c0
Support prettier formatter for Ruby layer (#14252)
* First working pass

- Runs prettier on save when in ruby-mode.
- Adds `node_modules/.bin/` to local `exec-path`
  - This means project-local `prettier` executables are preferred

* Making ruby layer prettier formatting configurable

- Adds a variable to control whether prettier is used to format-on-save.
- Documents use, configuration, and keybindings in the README

* Add to CHANGELOG.develop

* Delete spurious comment

* Use prettier as a dependency only when config variable is present
2021-01-09 08:34:04 +01:00
Robert O'Connor
82ba73a1c0
update copyright to 2020 2020-09-23 21:25:01 +02:00
Codruț Constantin Gușoi
b3bbbd229d Update changelog with most important changes 2020-07-17 21:02:28 +01:00
Codruț Constantin Gușoi
698a981e8c Adds text insertion functinos and keys 2020-07-17 21:02:28 +01:00
Codruț Constantin Gușoi
69078f8d9b Disable the magic comment insertion by default 2020-07-17 21:02:28 +01:00
Codruț Constantin Gușoi
f4f9f74075 Use refactor prefix for the quote and block toggles 2020-07-17 21:02:28 +01:00
Codruț Constantin Gușoi
ecb06efbb4 Fix ruby mode handling for special files 2020-07-17 21:02:28 +01:00
Maximilian Wolff
b82bc40b3c
Fix ignored popwin declarations
Popwin automatically configures pupo purposes
if properly configured. While I was checking
the existing configs I have found that the
settings will be ignored if the config is not
done via a post-config hook.

A quick search revealed a lot of popwin configs
which never had any effect.

This commit fixes these and with this also
restores the missing pupo configs.
2020-07-03 21:51:33 +02:00
Maximilian Wolff
1fd90fc1dc
Update instructions for dap integration and update existing layers
The previous way of adding dap to a layer did add the mode
unconditionally to `spacemacs--dap-supported-modes` causing
dap bindings to be added also when no lsp backend was used.
2020-05-16 23:40:38 +02:00
emacspace
7dd2091738 documentation formatting: Fri May 8 22:03:52 UTC 2020 2020-05-09 00:11:48 +02:00
Xiang Ji
ae2efb50e0 [ruby] Add instruction on disabling the automatic insertion of encoding comment 2020-05-08 22:55:29 +02:00
Maximilian Wolff
0c774416d7
Make ruby layer load dap layer when lsp is used as backend
Before the ruby layer was only requiring standalone lsp layer,
however with the latest changes dap support has been added
therefore I have updated the layer file to require the full
dap layer instead which in turn requires the lsp layer.
2019-12-21 23:51:13 +01:00
Seong Yong-ju
82d4df4b0f
Fix key bindings in Ruby layer 2019-12-21 23:36:36 +01:00
syl20bnr
584392bd92 [core] Fix layer dependencies based on layer variables
There was a edge case with the declaration of the `lsp` layer in `layers.el`
files.
The `hy` layer depends on the `python` layer which in turn depends on the `lsp`
layer if and only if the `python-backend` layer variable is set to `lsp`.
When the `hy` layer was declared first then it declares the `python` layer
without its layer variables, thus the `lsp` layer was not declared because the
`python-backend` variable was not set.

The fix is to gather all the layer dependencies and resolve them only after all
the used layers have been declared.

* new function `configuration-layer/declare-layer-dependencies`
* replace all calls to `configuration-layer/declare-layer` by the new function
  except for distribution layers (we declare layer dependencies right away in
  distribution layers)
2019-09-30 02:00:48 -04: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
Michael Hauser-Raspe
3df5b43d28 Remove stray ruby file. 2019-08-10 11:32:20 +02:00
Michael Franz Aigner
ddf7459a02 Fix lazy-loading of ruby-test-mode
This change fixes a syntax mistake in the use-package declaration of
ruby-test-mode that causes the package to be loaded immediately, instead of
deferring the load until the first ruby file is visited, as is intended.
2019-06-12 19:37:26 +02:00
Seong Yong-ju
80ff9053a3 Add rubocopfmt to format Ruby buffers 2019-05-31 16:58:57 +02:00
emacspace
2aa62bb5ed documentation formatting: Tue May 28 14:41:10 UTC 2019 2019-05-28 17:43:54 +03:00
Billy Kaplan
5a0ab04653 Adding Ruby LSP Backend and DAP support 2019-05-27 22:09:31 +02:00
emacspace
c7c348a676 documentation formatting: Sun May 26 20:58:52 UTC 2019 2019-05-27 01:23:35 +03:00
Anton-Latukha
f6660f82d4
Switch to the new layers generator 2019-05-15 21:08:21 +03:00
Anton-Latukha
ba074bc908 layers: lang: new structure: general: add pure, multi-paradigm (&js) 2019-05-15 21:04:48 +03:00
JAremko
77c680160e Add placeholder tags 2019-05-05 20:40:47 +03:00
emacspace
45276bd96f documentation formatting: Wed Dec 5 03:03:03 UTC 2018 2018-12-04 22:06:14 -05:00
emacspace
901f35849a documentation fixes: Tue Oct 23 14:18:21 UTC 2018 2018-10-23 23:38:16 +03:00
JAremko
cd39f80c24 Reformat documentation 2018-10-11 00:13:43 +03:00
Seong Yong-ju
de346e33c6 Fix issues in ruby layer
Add a prefix for rake and refactor/RuboCop/robe commands. Add test and toggle
prefix for enh-ruby-mode. Use enh-ruby-toggle-block in enh-ruby-mode, instead of
ruby-toggle-block. Remove the prefix in prefixes "ruby/".
2018-09-03 20:17:30 +01:00
Codruț Constantin Gușoi
6a724e416d Fixes formatting on ruby readme 2018-08-11 13:13:22 +03:00
Brandon Conway
6302748f99 Add seeing is believing 2018-08-11 12:53:50 +03:00
p-sdk
e090ffbd2d ruby: add popwin config for bundler, projectile-rails and rubocop 2018-07-10 00:36:10 +03:00
Codruț Constantin Gușoi
3de1d09a42 Formats the ruby key bindings table 2018-07-10 00:32:00 +03:00
Codruț Constantin Gușoi
8ebe9f5093 Removes duplicates from ruby documentation 2018-07-10 00:11:45 +03:00
Codruț Constantin Gușoi
12f537a0db Adds ruby toggles documentation 2018-07-09 23:59:05 +03:00
Codruț Constantin Gușoi
05f27afa56 Creates a toggle prefix for ruby 2018-07-09 23:50:41 +03:00
Codruț Constantin Gușoi
f715c1f12e Revert "Remove duplicate robe keybinding"
This reverts commit 7d63001515.
2018-07-09 23:48:05 +03:00
Codruț Constantin Gușoi
7d63001515 Remove duplicate robe keybinding
Robe had 2 keybindings for starting a server: `SPC m ,` and `SPC m s s`
but the first one was already defined for another purpose so it overwrote
it.
2018-07-09 23:43:17 +03:00
Miciah Masters
e0b751bee3 Avoid non-idempotent use of push in init code
Replace push with add-to-list in layer init functions and related code.

Modify spacemacs|add-toggle to check for and update an existing toggle in
spacemacs-toggles and only create a new toggle if none already existed.

Replace a conditional push onto erc-packages with use of :toggle.

When initializing which-key, set which-key-replacement-alist to its default
or customized setting before adding all the Spacemacs replacements.  We
want to keep the stock replacements but avoid adding duplicates of the
Spacemacs replacements.

Replace the emacs-lisp-mode-hook lambda with a named function to avoid
adding duplicate hooks (which can add duplicate definitions of the
evil-surround pair).
2018-06-05 22:17:13 -04:00
p-sdk
4e3990ce52 ruby: add key bindings for ruby-send-{buffer,line}-and-go 2018-05-31 01:09:50 +03:00
p-sdk
000e5022c9 ruby: add key binding for ruby-send-line 2018-05-20 00:01:29 -04:00
syl20bnr
ebe4c60264 Revert "Defer packages by default using use-package-always-defer"
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.
2018-03-03 23:40:10 -05:00
syl20bnr
29c78ce841 Defer packages by default using use-package-always-defer
Warning now `:defer t` is implied, to force a package to load `:demand t` is
now necessary.
2018-02-27 23:32:52 -05:00
Alejandro Arrufat
f93fb228ce Feature: Add "send to buffer" leader key in ruby layer
Currently ruby-send-to-buffer function is not assigned to any key
it is useful to be able to send the the buffer directly to the ruby
console.

It assigns SPC-msb to ruby-send-to-buffer function
2018-02-24 19:49:39 -05:00
David Balatero
2b3d83ccf6 Add gtags to enh-ruby-mode as well as ruby-mode 2018-01-22 23:14:40 -05:00
Paul
03f79d0aa6 ruby: add ruby-hash-syntax
Add a command to toggle between old and new hash syntax in the active region.
2018-01-18 00:15:16 -05:00