Commit Graph

64 Commits

Author SHA1 Message Date
51451ecffd feat(language/ruby): enable formatting with syntax_tree/stree
Default on-save formatting is still done via lsp-format-buffer, but the
the C-c C-f manual formatting action is overridden to also include
stree-format-buffer.
2023-01-20 21:09:02 +00:00
9654403bee feat(editor): enable subword-word globally in all buffers 2022-12-04 01:14:57 +00:00
044c67d379 chore(tree-sitter): move setup to a central list of hooks 2022-12-03 23:34:52 +00:00
8d232d4b2b chore: use symbol instead of string for with-eval-after-load 2022-10-05 00:18:59 +01:00
0de0c4ca23 feat(text-editing): replace toggle-quotes with cycle-quotes package
It seems cycle-quotes does a better job than toggle-quotes. For example
it supports literal backtick strings in Go, which toggle-quotes does
not.
2022-07-20 22:02:12 +01:00
7c253d986c feat(editor): improve code folding with origami
Add and configure origami, and enable it for majro modes where it seems
to do a good job, and keep using hideshow for other major modes.
2022-07-20 22:02:12 +01:00
2b39d5b0d7 chore(use-package): use :preface in favor of :init when defining things 2022-04-22 23:25:56 +01:00
d86f6c4490 feat(language): enable tree-sitter for most languages that are supported 2022-04-19 01:12:42 +01:00
a8618938bf feat(core): use general.el for keybind definitions nearly everywhere
Primarily this replaces :bind with :general in all use-package calls.
2022-03-14 21:16:15 +00:00
4ea4f6dc95 chore(completion): remove needless company-mode references
Since we enable global-company-mode, explicitly enabling it in the setup
for various major modes does nothing. But it does tie the code to
company mode, making it harder to try alternatives like corfu.
2022-03-14 11:58:47 +00:00
8728d5da9e fix(lang): control Ruby formatting method on a per-project basis
Allow individual projects to override the default lsp-mode based
formatting method by setting rubocopfmt-on-save-use-lsp-format-buffer as
a dir-local variable.

This is useful for projects which require older versions of Ruby where
the latest Solargraph version is not supported, and formatting is better
handled by rubocop directly.
2021-04-12 10:05:22 +01:00
4e50263ded chore(lang): minor tweaks to ruby setup 2021-04-07 23:50:11 +01:00
f374dc4eab feat(lang): add rufo package for Ruby
As I'm not convinced formatting with rufo is good idea yet, this is
simply so I can play with it when I want to. It is not configured to
automatically format files on save.
2021-04-07 23:50:11 +01:00
dc24cd4f7f feat(lsp): create and use on-save minor modes for lsp-format-buffer and lsp-organize-imports commands 2021-04-07 22:45:59 +01:00
2d3c1b241c chore(lang): tweak ruby-mode format on save setup to use lsp-mode directly
Instead of executing lsp-format-buffer on save via the rubocopfmt
package, simply set it up as a buffer-local before-save-hook.

Also simplify the rubocopfmt package configuration, as I rarely use it
anymore, but would still want to be able to manually execute rubocopfmt.
2021-04-02 11:32:50 +01:00
4f1e68f33e fix(lang): correctly add rubocopfmt package vars to list of safe local vars 2021-01-21 10:34:05 +00:00
3f5b3ba9ca chore(lang): mark rubocopfmt-on-save-use-lsp-format-buffer as safe local variable 2021-01-15 02:11:20 +00:00
2438f0ab90 fix(lang): correctly set projectile igonore directories 2021-01-15 02:11:20 +00:00
996a5b8bf6 feat(lang): format ruby-mode buffers with language server 2021-01-15 02:11:19 +00:00
7917f6ac56 feat(debugging): add dap-mode with basic config for Go and Ruby 2020-11-11 10:51:08 +00:00
41f2d5c826 chore(lang): mark rubocopfmt-include-unsafe-cops var as safe local var 2020-11-11 10:47:05 +00:00
239dd32624 chore(lang): remove rbenv.el from ruby setup
I never used it, and doom-modeline does an excellent job of showing
active Ruby version, among other languages
2020-09-27 19:47:06 +01:00
1c81570ef7 fix(packages): update package definitions to be compatible with latest straight.el
A recent change (https://github.com/raxod502/straight.el/pull/558) to
straight.el's use-package integration led to some of my :straight
definitions throwing errors.

When overriding the package name, do not wrap the real name in parens,
for example:

    ;; bad (no longer works)
    (use-package helm-global-bindings
      :straight (helm))

    ;; good (worked before, still works)
    (use-package helm-global-bindings
      :straight helm)
2020-08-27 23:37:28 +01:00
098143191d fix(lang): Disable ruby-specific C-c C-b binding
C-C C-b is globally defined to run projectile-ibuffer.
2020-08-19 11:28:05 +01:00
4ba09d49b6 feat(lang): Remove robe package in favor of lsp-mode for Ruby 2020-08-11 13:47:20 +01:00
7d0ff606a3 feat(lang): Set new rubocopfmt-include-unsafe-cops option to t 2020-07-13 21:48:56 +01:00
9b5c22f9e2 feat(lang): Enable terminal-friendly quote toggle for ruby-mode 2020-06-27 14:20:23 +01:00
41d80de4fb chore(lang): Various minor improvements for ruby-mode 2020-05-30 16:48:36 +01:00
a3a8c575dc chore(lang): Disable solargraph's multi-root feature
This means that each project gets a separate solargraph server, rather
than one server handles all projects. This does mean more memory is
consumed, but it overall it makes lsp-mode perform much faster, and be
more stable.
2020-05-26 23:49:46 +01:00
aee6af6128 fix(lang): Switch back to formatting Ruby with rubocop-daemon
Using `lsp-format-buffer` is a little bit unreliable, and for some
reason it also skips some cops.
2020-05-24 00:23:18 +01:00
a71fc70e66 feat(lang): Format ruby files with lsp-format-buffer 2020-05-19 21:45:31 +01:00
764c4dae74 feat(lsp): Improve lsp-mode setup with a prefix key and company tweaks 2020-05-19 21:44:26 +01:00
25441f47d3 feat(lang): Use rubocop-daemon to format ruby files on save
On my 2016 MacBook Pro correction times are around 200ms with the
daemon, compared to around 3-4 seconds without.

There might be some issues if bundler depends heavily on gems included
in the project, but we'll see how that goes.
2020-05-19 11:10:19 +01:00
974a2b86ed refactor(text-editing): Improve string-inflection package setup 2020-05-07 19:14:28 +01:00
efecb5172c chore(startup): Make various modules more lazy-loaded
This should improve startup speed a little bit.
2020-03-15 02:44:46 +00:00
af7323061f chore(lang): Disable ruby-specific keybinding
I don't use inf-ruby that much, so I'm fine with using it via M-x when
needed. Specially as a bunch of it's keybindings overrides a few global
keybindings I have set.
2020-03-06 18:38:31 +00:00
937e61d482 chore(lang): Disable use of spring with rspec-mode
Spring has changed and is no longer compatible with the way that
rspec-mode implements spring support. Hence we need to disable
rspec-mode's support and attempts at using Spring the wrong way.

Once rspec-mode has been updated to support spring again, we can
re-enable this.
2020-02-22 23:52:20 +00:00
951a40346e chore(packages): Disable packages I don't use 2020-02-04 10:08:41 +00:00
b13ca362cb feat(packages): Replace package.el with straight.el 2020-02-04 10:08:37 +00:00
46dac06dd8 chore(lsp): Use lsp-mode in ruby-mode 2020-01-27 01:20:08 +00:00
abff344eb2 refactor(folding): Improve siren-folding module
- Add a siren-folding function which enables all folding-related modes,
  and change other modules to use this new function.
2020-01-26 21:39:46 +00:00
290ba13b1c chore: Improve loading of prog-mode features into non-prog-mode modes
There are a few major modes which are not based on prog-mode, that I
want to behave like prog-mode. Previously each did nearly all the same
setup that's done via the prog-mode hooks. Now instead let's actually
run runs the hooks for prog-mode.
2020-01-26 20:25:49 +00:00
8ed4a4e6f5 refactor: Visual indentation guides
- Switch from highlight-indentation package to highlight-indent-guides.
- Activate visual indentation in a prog-mode hook, rather than doing
  within each individual major mode. It was already done within all
  major modes based on prog-mode anyway.
- Add new siren-display-indetation module and function as a central way
  to enable visual indetation guides. This makes switching the
  underlying package at some point in the future much easier.
2020-01-26 18:53:44 +00:00
54cf0b51f8 Refactor rspec-mode setup 2019-11-01 16:50:36 +00:00
358624f5aa Stop using lsp-mode for Ruby
It's just way too slow to use with Ruby.
2019-11-01 16:50:36 +00:00
e7d55655d7 Improve lsp-mode keybindings 2019-08-14 12:57:35 +01:00
ecd8b75e2c Add rbenv package to siren-ruby module 2019-06-18 10:38:58 +01:00
57f670088d Use use-package's :custom and :custom-face options everywhere 2019-06-10 19:29:58 +01:00
c774b3ce5f Remove company-dabbrev-code stuff causing errors 2019-06-03 16:54:34 +01:00
7a83561c0e Add lsp-mode keybindings to ruby-mode 2019-01-28 11:38:29 +00:00