Commit Graph

146 Commits

Author SHA1 Message Date
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
7de79dd704 fix(formatting): specify parser for prettier-js to avoid errors
Some buffers which use markdown-mode or yaml mode yield errors when
using the prettier-js package to format them, as it looks at the file
extension by default to figure out what parser to use.

Some temporary files that use these modes don't have the correct file
extension, so prettier-js yields an error. My manually specifying the
correct "--parser" option for each major-mode, this is no longer an
issue.
2021-04-07 22:49:58 +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
009c3dc4b1 feat(lang): handle additional file patterns with sh-mode 2021-03-23 11:34:00 +00:00
06f0db1035 feat(lang): use reformatter to enable golines formatting
This is much cleaner than hacking go-mode's gofmt function to run
golines. Instead there's a `golines` command, and `golines-on-save-mode`
available.
2021-03-22 11:06:06 +00:00
43ce3f6f73 fix(lang): populate auto-mode-alist with correct sh-mode function 2021-03-22 11:04:38 +00:00
da5ecfffcd feat(lang): enable manual formatting of go-mode buffers with golines 2021-03-15 23:12:10 +00:00
bc4328c6d5 fix(lang): disable duplicate before-save hooks for go-mode
Those hooks are already defined in the setup for lsp-go.
2021-03-15 23:12:10 +00:00
e74800b5cb fix(lang): ensure Go related env vars are correctly loaded 2021-02-27 23:33:00 +00:00
395ad7ccac fix(startup): correctly setup deferred loading for various packages
This just ensures that various packages that can defer loading actually
does defer until they're first used.
2021-02-17 01:52:59 +00:00
147e9ed1d3 fix(lang): prevent dockerfile-mode wrongfully activating certain files
This is a temporary workaround until this pull request is accepted and
merged: https://github.com/spotify/dockerfile-mode/pull/63
2021-02-17 01:52:58 +00:00
1ff9e880ba feat(lang): enable lsp-mode for sql-mode via sqls language server 2021-02-14 22:26:07 +00:00
dd4c77ad24 fix(lang): for formatting of *.sql files with pgformatter 2021-02-14 22:25:48 +00:00
f41a9daff1 fix(lang): debug current go test now works in non-root module packages 2021-02-14 22:24:47 +00: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
c1865ad309 fix(lang): correctly load dap-mode for go-mode 2021-01-15 02:11:19 +00:00
672d6d819c feat(lang): enable debugging current test in go-mode via dap-mode
Adds a function and keybinding to lookup name of current test via
a gotest.el helper function, and runs dap-mode with relevant config to
debug the specific test name found.
2021-01-04 00:20:09 +00:00
b31b35edee feat(lang): allow gopls language server to modify go.mod
This ensures that the language server can download and use new
packages. Instead of blowing up with errors.
2020-12-25 13:27:18 +00:00
aaf5eddecf chore(lsp): improve lsp setup for golang 2020-12-01 11:06:30 +00:00
9a51b31c9e feat(lang): expand golang-related env vars which are imported 2020-11-15 17:13: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
3adfd0c0eb feat(lang): enable terraform-ls language server support in terraform-mode 2020-11-09 10:47:40 +00:00
b784fccb40 chore(lang): set golang lsp config to include placeholders 2020-11-09 10:47:40 +00:00
12517bf9e3 chore(lsp): use lsp-deferred instead of lsp everywhere
Ensure language servers only start when a buffer is visible. This helps
with desktop restore speed, as various language servers do not start all
at the same time.
2020-11-09 10:47:39 +00:00
7ca255db9c feat(lang): format go-mode buffers on save with gofumpt via lsp-mode
Also tweak a couple of other gopls settings, and set a others to their
defaults for the purpose of ensuring they stay that way, and also to
make it more obvious within emacs what options are available.
2020-10-29 13:12:01 +00:00
192499a67b fix(lang): disable indentation highlights for Makefiles
The highlight-indent-guides package seems to have a cursor movement bug
with some modes, and makefile-mode is one of them.

Also Makefiles are tab indented, and the indentation highlight replaces
the tab character symbol, making it difficult to properly understand the
indentation level.
2020-10-27 13:13:15 +00:00
9d45b1a908 fix(lang): ensure golang setup works with goenv 2020-10-09 10:23:27 +01: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
5937589cc5 feat(lang): add jsonnet-mode 2020-09-27 19:46:27 +01:00
298587d35d fix(lang): resolve json-snatcher issue by overriding it with a fork 2020-09-10 20:22:42 +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
00823307ac fix(lang): fix issue with json-mode when native-comp is used
It seems when native-comp is used, the kill-buffer-hook in json-snatcher
is registered, even though the library itself isn't registered. And the
`jsons-remove-buffer` function does not have a autoload declaration.

Hence we use use-package to manually create a autoload for the function.
2020-08-19 11:23:04 +01:00
e533a3b6d5 fix(lang): remove poly-markdown as it was glitchy 2020-08-19 00:39:59 +01:00
7ed3e92dbb feat(core): use buffer local hl-line-mode instead of global-hl-line-mode
This allows specific major-modes to disable hl-line-mode, which is
desired some terminal/shell modes like vterm where the hl-line flickers
constantly while typing.
2020-08-16 14:21:00 +01:00
d1f4e13886 feat(lang): add vue-mode for working with .vue files 2020-08-11 13:47:21 +01:00
d1e1f3f81c chore(lang): Cleaner lsp-mode setup for golang 2020-08-11 13:47:21 +01:00
4ba09d49b6 feat(lang): Remove robe package in favor of lsp-mode for Ruby 2020-08-11 13:47:20 +01:00
8376b71b7c feat(lang): Improve markdown formatting on save
Add additional CLI flags for prettier that so formatted markdown is
wrapped to 80 columns.
2020-07-21 18:27:55 +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
e586192a92 chore(lang): Add missing require to siren-terraform module 2020-06-07 15:55:46 +01:00
84bdd610ca feat(lang): Add jinja2-mode for Jinja2 templates 2020-06-07 15:55:00 +01:00
1ef8570f05 fix(lang): Work around for whitespace-mode issue with caddyfile-mode 2020-06-07 15:54:26 +01:00