Commit Graph

73 Commits

Author SHA1 Message Date
c1b96508a0 chore(language/go): add doc string for siren-define-golines-format-mode 2023-01-20 21:05:47 +00:00
bc5d60c07c fix(language/go): add-on lsp servers do not need to be registered anymore
In fact, registering them, will override existing servers. When
registering the golangci-lint server, it prevents the regular gopls
server from being used.
2023-01-20 21:03:45 +00:00
63f9ef2ebb chore(lsp): tweak naming of manual formatting functions/settings 2023-01-20 21:02:45 +00:00
09aa5cb1c6 feat(language/go): make go-playground nicer to use with extra keybindings 2023-01-15 20:57:29 +00:00
9654403bee feat(editor): enable subword-word globally in all buffers 2022-12-04 01:14:57 +00:00
63d0345b21 chore(editor/origami): move setup to a central list of hooks 2022-12-04 00:27:38 +00:00
044c67d379 chore(tree-sitter): move setup to a central list of hooks 2022-12-03 23:34:52 +00:00
2e1a66580c chore(language/go): add extra flag for golangci-lint langserver 2022-10-19 23:22:02 +01:00
8d232d4b2b chore: use symbol instead of string for with-eval-after-load 2022-10-05 00:18:59 +01:00
6bf20de60e fix(language/go): attach go-playground setup function correct hook 2022-10-05 00:16:15 +01:00
6d4665f3dd fix(language/go): add tree-sitter query for highlighting struct properties
The field_identifier type was recently removed from tree-sitter-go here:
https://github.com/tree-sitter/tree-sitter-go/pull/71

This means that struct keys are no longer syntax highlighted as
properties, which I dislike. Hence this new query targets the first
element of a key/value pair, and marks the first element as a @property
if it contains an identifier.

I'm not sure if this undoes the goal of removing the field_identifier,
but for now, it resolves my personal annoyance of struct keys not be
highlighted as properties when creating a new instance of the struct.
2022-10-05 00:11:46 +01:00
3b280e2d4c chore(language/go): move custom tree-sitter query to golang module
Instead of keeping the custom Go specific tree-sitter query in the
tree-sitter module, move it the golang module.
2022-10-05 00:11:33 +01:00
efccea6cbd feat(language/go): improve setup of go-playground 2022-08-25 22:52:21 +01:00
43d9d309da feat(language/go): configure modes for go.mod and go.work files 2022-08-20 00:36:06 +01:00
1883ba6972 chore: minor cleanup of reformatter lighter strings 2022-07-30 22:01:26 +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
b411cc7856 chore(editor): improve setup of indentation highlight guides 2022-07-15 22:44:24 +01:00
daefce3143 style(language): replace tab indentation with spaces 2022-06-18 00:48:01 +01:00
7ecfb8fd86 feat(editor): switch indent guide style to a thin line
As I'm no longer using whitespace-mode in prog-mode derived modes, the
cursor movement bug affecting highlight-indent-guides when
whitespace-mode is enabled is no longer an issue for me.

Further details about the highlight-indent-guides conflict with
whitespace-mode is available in this issue:
https://github.com/DarthFennec/highlight-indent-guides/issues/107
2022-06-18 00:48:00 +01:00
25b6493530 fix(completion/copilot): disable whitespace-mode to fix cursor placement issue
When whitespace-mode is enabled, single-line copilot completions makes
the cursor look like it's at the end of the completion rather than in
it's real position.

Issue with gifs showing the behavior is here:
https://github.com/zerolfx/copilot.el/issues/28

For the most part I should be able to live without whitespace-mode in
day to day use, and improvements to the highlight-indent-guides setup
should help.

And worst case, whitespace-mode can always be toggled easily enough.
2022-06-18 00:48:00 +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
7da944b04d feat(language/go): add -race flag to gotest invocations 2022-03-14 11:58:47 +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
92c16d4dcb feat(language/go): use tree-sitter-mode and tree-sitter-hl-mode 2022-03-10 21:11:26 +00:00
2554669fea feat(language/go): improve and fix usage of gotest package
- Fix issue where gotest could not be used from non-test files in Emacs
  28.x or later.
- Bind "C-c , t" to ff-find-other-file to mimic behavior in Ruby via
  rspec-mode.
- Configure gotest to always run tests with "-count=1" to avoid cached
  results, so it's easier to notice and handle flickering tests.
2022-02-23 12:11:17 +00:00
f79cb11fa2 chore(language/go): update lsp-mode setup for gopls 2022-02-07 10:44:17 +00:00
0ac1c86102 feat(lang/go): add custom lsp-client for golangci-lint-langserver 2021-11-26 21:20:01 +00:00
5849a7b522 feat(lang): enable a few gopls analyzers which are disabled by default 2021-10-06 04:37:19 +01:00
32f23ea33b fix(lang): tweak golines arguments to not use deprecated gofumports 2021-09-15 12:28:41 +01:00
14f394c7ca feat(lsp): allow C-c C-f to perform extra formatting not done by on-save hook 2021-06-29 00:36:36 +01:00
4b228ae317 chore(lang): tweak company-mode idle-delay for Go 2021-06-17 20:49:26 +01:00
b772a6a61d chore(formatting): expand reformatter macro on first use rather than init 2021-05-22 14:34:18 +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
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
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
f41a9daff1 fix(lang): debug current go test now works in non-root module packages 2021-02-14 22:24:47 +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
b784fccb40 chore(lang): set golang lsp config to include placeholders 2020-11-09 10:47:40 +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
9d45b1a908 fix(lang): ensure golang setup works with goenv 2020-10-09 10:23:27 +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