summaryrefslogtreecommitdiff
path: root/emacs/custom/my-prog.el (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-10-14ref: move flymake and eldoc configuration to their own librariesFranck Cuny1-11/+0
Change-Id: Ida9e0f7d6ee25cf5fe8e208d1ae5c77aa28cfe0f
2022-09-24fix(prog/lsp): apply a number of fixes related to LSPFranck Cuny1-45/+0
Now that I've switched back to LSP, there's some configuration to delete and some to update. The configuration related to rust is fixed (lsp-ui was not loading properly), and I'm also disabling the inlay hints (they are very intrusive, I'll need more tweaks to find something that works for me). For the LSP configuration itself, I'm tweaking a few more things, especially related to the UI. Finally, deleting configurations for eglot and go: eglot is replaced by lsp-mode, and go's configuration is in its own file. Change-Id: I73fb4b66c8816dd6e20efa358c81e3c306b8255f
2022-09-17ref(tree-sitter): move the configuration to its own fileFranck Cuny1-10/+0
Change-Id: I424e4d32e05d6bf21f6abb3cc68cad598af31708
2022-09-15fix(prog): set python indentation to 4 spacesFranck Cuny1-1/+1
That's what everyone use. Change-Id: I312dd88218e2d82be0aad8fd6377483ffb2c0390
2022-08-22feat(rust): add initial configuration for rustFranck Cuny1-1/+6
Use rustic and configure it to use eglot as the backend for LSP. Change-Id: I71bd51a863f1a03b0b3f2d218d970d5ea0867e9e
2022-06-27ref(prog): clean up comment settingsFranck Cuny1-2/+3
Change-Id: Ic3ec94047e39618d9d1bbc5aa9afce8565b87208 Reviewed-on: https://cl.fcuny.net/c/emacs.d/+/583 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
2022-06-26fix(prog): configure eglot for buffer formattingFranck Cuny1-12/+14
Load eglot when Emacs starts, and delegate buffer formatting for supported language to LSP. The LSP for nix is using `nixpkgs-fmt' already, so there's no need to configure this ourselves. Change-Id: I6ee4adcc34b30c75031974c10a47fd3f7d240bed
2022-06-26feat(prog): require go-modeFranck Cuny1-7/+5
Change-Id: I2b008d6039714475d7bbf487ac7674dd80b1bac4
2022-06-26feat(prog): enable tree-sitterFranck Cuny1-0/+9
tree-sitter is an incremental parsing system, and this change installs the binding for Emacs. It improves significantly the code highlighting system (as it does not rely on regex when the language is supported by tree-sitter) and improves performance in general. Change-Id: Ibc3d6c7133b323d6cc63ffb248cd83f71ac5c94a
2022-06-26fix(prog): simplify flymake's configuration to work with eglotFranck Cuny1-11/+7
I've been running into issues between flymake and eglot for a while now. After modifying the file, flymake would report errors on possible typo I made while editing, but once I've fixed them, the diagnostic would not be updated until I either restart eglot or kick another flymake run. After some debugging I'm pretty convinced this is due to the variable `flymake-no-changes-timeout`. I've been running for a few hours without it being set and I've not been able to reproduce the problem. The other variables are set to their default value, this is not needed. Change-Id: I770857a93b6d90193f39ee0dceaa19b0b928a3d8
2022-06-20fix(prog): use gofmt to format go codeFranck Cuny1-3/+4
When using LSP to format the code, I keep running into weird behavior with eglot. I think it's because the code is being formatted while flymake is running but I need more evidence.
2022-06-20feat(prog): use nixpkgs-fmt to format nix codeFranck Cuny1-0/+1
This is the tool recommend by the nix community to format nix code (see [1]). [1] https://github.com/nix-community/nixpkgs-fmt
2022-06-03feat(eglot): use LSP to format go buffers instead of gofmtFranck Cuny1-1/+3
Change-Id: Iccef9b065eb4bee917b0084fb0b34e76f09223f2
2022-05-31fix(prog): add support for workspace module to goplsFranck Cuny1-3/+5
I've multiple go modules inside a git repository. Without support for workspaces, gopls is confused and does not work correctly.
2022-04-29go: define command for compilingFranck Cuny1-1/+7
2022-04-29don't specify where to write Emacs filesFranck Cuny1-1/+0
We don't care, as long as these files are ignored in `.gitignore' it does not matter where we write them.
2022-04-27my-prog: enable electric-pair-modeFranck Cuny1-0/+4
2022-04-27my-prog: more simplificationFranck Cuny1-126/+97
2022-04-16emacs: where to save stateFranck Cuny1-0/+2
2022-04-14replace company with corfuFranck Cuny1-11/+1
2022-03-25prog: tweak configuration for goFranck Cuny1-1/+14
Add a few bindings to run the tests, and make the test output more verbose by default.
2022-03-23this should be the last mass refactorFranck Cuny1-1/+0
2022-03-23rename a few more librariesFranck Cuny1-4/+4
2022-03-22prog: format go buffer before savingFranck Cuny1-0/+1
2022-03-22prog: make flymake happyFranck Cuny1-33/+66
2022-03-20puppet: we don't need this anymore!Franck Cuny1-5/+0
2022-03-17eglot: replace lsp-mode with eglotFranck Cuny1-78/+7
2022-03-04prog: add support for nixFranck Cuny1-0/+7
Enable the LSP for nix, and also ensure we're formatting the buffer when saving a buffer.
2022-02-03python: no more aurora files :)Franck Cuny1-2/+1
2021-11-15emacs: configure how to handle man pagesFranck Cuny1-0/+4
2021-10-27emacs: add lispyFranck Cuny1-0/+6
2021-08-24emacs: move function for go-mode-compileFranck Cuny1-5/+6
The function needs to be defined before we use it in the `use-package` for go-mode.
2021-08-24emacs: fix hook syntax for lsp-modeFranck Cuny1-1/+1
2021-08-24emacs: add lsp-treemacsFranck Cuny1-0/+5
It's useful to show errors across a project
2021-04-30emacs: enable staticcheck with lspFranck Cuny1-0/+8
2021-04-04emacs: configure compile modeFranck Cuny1-0/+11
2021-04-04emacs: configure dap-mode and compile-modeFranck Cuny1-1/+34
Debug Adapter Protocol (DAP) is wire protocol to communicate between a client and debug server. This is similar to LSP, but for debuggers. This initial configuration focuses on enabling the mode and setting the layout for the various buffers (in this case I want the different buffers on the right screen and keep the main part focused on the code). I also disable some widget to use the debugger with hydra. There's still a number of things that are incomplete when it comes to integrate DAP and delve (the go debugger): there's no way to call functions, to have access to the variables, etc. But this is a good start though, to debug simple problems without relying on print statement. This also update the configuration for =go= so that =M-x compile=, when editing a go file, by default will use =go build=. This is not what I always need / want but this is a good default.
2021-01-13emacs: no snippetsFranck Cuny1-1/+1
2021-01-04emacs: rename the directoryFranck Cuny1-0/+0
2020-12-09emacs: add binding for lsp's imenuFranck Cuny1-0/+2
2020-12-07emacs: update configuration for LSPFranck Cuny1-5/+13
I want to remap the prefix for `lsp-mode` from `<s-l>` to `<C-c l>`, since I'm already using super for i3. Diminish the mode, there's no need to have this in the modeline. Update some of the variables (some were deprecated / replaced with different names).
2020-06-18emacs: update prog moduleFranck Cuny1-14/+8
clean up and drop what I don't need
2020-06-18emacs: move puppet config to progFranck Cuny1-0/+5
clean up init.el from files I'm not loading.
2020-06-04emacs: drop hydra for prog modeFranck Cuny1-41/+1
I can't bother learning / remembering to use it. I'm removing it again from this configuration, and will drop it completely. There's no need to pull / maintain another dependency which will break if I don't use it.
2020-05-10emacs: stuff for goFranck Cuny1-9/+11
2020-03-19emacs: merge configuration related to prog-modeFranck Cuny1-10/+84
For the various prog-mode, merge the configuration into a single file so that it's easier to maintain (I guess ?)
2020-02-09lsp: add peek definition to hydra.Franck Cuny1-0/+1
2020-01-13emacs/prog: more cleanup for lsp/go.Franck Cuny1-4/+18
A few changes to the configuration related to go, mostly to drop some code that is not needed anymore. Add a few more bindings for LSP. Add `company-posframe`, which is a nicer UI for company.
2020-01-13emacs/prog: switch to lsp-modeFranck Cuny1-5/+35
Previously I was using the package `eglot` to provide LSP functionality. However, the package uses flymake for it, while my setup in general uses flycheck. Since lsp-mode supports both, I'm switching to ls-mode. I'm moving the code for company to the 'prog' module, so that all things related to general programming is in one location. Since I'm switching to lsp-mode mode primarily for go, I can also delete a bunch of extra functionality that is now provided by lsp-mode.
2019-12-23emacs: use eglot for LSPFranck Cuny1-0/+9
I'm giving LSP a try with go, and I've decided to go with eglot for now, instead of lsp-mode. I gave a try to lsp-mode and the configuration was not obvious, it was slow, it kept asking questions, and the UI was pretty awful.