Commit Graph

3322 Commits

Author SHA1 Message Date
Dmitry Bogatov
ea9948449d config(emacs): Add eshell command to run "git grep" via `grep'
This is much more convenient than equivalent `gf' in vim.
2024-07-25 20:31:49 -04:00
Dmitry Bogatov
5874000d21 config(emacs): Disable moving the point on mouse middle button pasting 2024-07-25 20:31:17 -04:00
Dmitry Bogatov
39f3013619 config(emacs): Disable evil-auot-indent in haskell mode
For some reason, auto-indent indents the line I open with "o" when cursor is
on an import line, so I have to hit backspace twice before I can type "import
NewStuff". Very annoying.
2024-07-25 11:14:41 -04:00
Dmitry Bogatov
ab28b6e716 config(emacs): Fix syntax error in call to "use-package" 2024-07-25 11:13:51 -04:00
Dmitry Bogatov
31ebb48540 config(emacs): Put "git-grep" buffer on the bottom of the frame
This makes it more convenient when working with long lines that fit
into full frame, but not into half.
2024-07-10 18:45:20 -04:00
Dmitry Bogatov
eef57dd32c config(emacs): Automatically use treesitter-based major modes 2024-07-05 16:59:49 -04:00
Dmitry Bogatov
f801e0a9bc config(emacs): Install all treesitter grammars 2024-07-05 16:40:29 -04:00
Dmitry Bogatov
2344235bc0 config(emacs): Setup LSP for C programming 2024-07-05 13:36:13 -04:00
Dmitry Bogatov
f3f8baa5d7 config(emacs): Configure fill-column=78 for git-commit buffers 2024-06-30 14:24:35 -04:00
Dmitry Bogatov
4fbdfbe9a7 config(emacs): Defined deprecated function expected by "evil-paredit-mode" 2024-06-29 16:55:57 -04:00
Dmitry Bogatov
3a0c693fa4 config(emacs): Specialise "(" and ")" moves for lisp mode
Redefine these keybindings to move over s-expressions, not sentences in lisp
modes. That is usually more helpful. Actually, I don't remember using
"next-sentence" instead of "next-paragraph" at all.
2024-06-29 16:44:20 -04:00
Dmitry Bogatov
15530ee34b config(emacs): Improve keybindings in heml completion buffer
Previous idea of using "|" and "\\" didn't work well: these letters
are free, but its key is way too far to the right of the keyboard.
2024-06-29 16:15:36 -04:00
Dmitry Bogatov
635792de44 config(emacs): Automatically "set +x" scripts with shebang
The way it is implemented has some false positives (e.g jinja2
templates of scripts), but overall it is net win.
2024-06-28 20:06:51 -04:00
Dmitry Bogatov
9391102c91 bin(slack-upload): Add script to upload files into $dayjob Slack 2024-06-28 20:06:34 -04:00
Dmitry Bogatov
ff10d111d8 config(emacs): Move snippets directory under backed-up ~/data/active
Snippets are usually trivial to warrant inclusion into ~/source and
writing commit messages for them, but I still don't want to lose them.
2024-06-28 19:36:48 -04:00
Dmitry Bogatov
80494352e1 auto: Reformat Nix code under config/ 2024-06-28 16:22:07 -04:00
Dmitry Bogatov
9208c6feea fix: Skip vendored home-manager from treefmt(1) config 2024-06-28 16:21:29 -04:00
Dmitry Bogatov
6060cd0844 config(fish): Make prompt look more like normal /bin/sh
This is less confusing to other humans when copy-pasting shell output
somewhere.
2024-06-28 16:12:44 -04:00
Dmitry Bogatov
a27da6bb1b config(fish): Add more egonomic replacement for arrow key
Arrow keys are really hard to reach. Not that I love "C-"
combinations, but it is still an improvement.
2024-05-21 21:16:50 -04:00
Dmitry Bogatov
652b598d80 canon-yaml: Run processing in main thread if threadcount=1
Skip overhead of thread creation if there is only one file, and
process it in the main thread instead. Small victory at small price.
2024-05-21 21:14:23 -04:00
Dmitry Bogatov
8b5f01acf5 canon-yaml: Reformat files in multiple threads
For my $dayjob set of 166 yaml files, it brough time to process them
all in single invocation from ~75ms to ~40ms. Not as great as I
expected, yet still an improvement.
2024-05-21 21:06:58 -04:00
Dmitry Bogatov
26f42c6036 canon-yaml: Return exit code 1 if input file is malformed YAML 2024-05-21 19:27:57 -04:00
Dmitry Bogatov
0d98b3ca5b config(git): Git-Ignore state files of pytest-benchmark plugin 2024-05-21 19:19:52 -04:00
Dmitry Bogatov
ba539949bc canon-yaml: Improve error handling of malformed YAML in input
Now instead of propagating error, GNU-style error message is printed
on stderr with as much details as provided by underlying libyaml.
2024-05-21 19:17:56 -04:00
Dmitry Bogatov
00fb05922f canon-yaml: Factor key comparaison function into separate file
This is function that user most likely will want to customize, so
let's make it easier to do so. Especially, since it requires no
sacrifices for me.
2024-05-20 23:11:02 -04:00
Dmitry Bogatov
4b1fbf05bb Merge branch 'import/canon-yaml'
* import/canon-yaml:
  config(git): Git-Ignore artefacts of Zig build system
  canon-yaml: Import early-alpha version of YAML formatter
2024-05-21 02:36:30 +00:00
Dmitry Bogatov
5e0e793d6a config(git): Git-Ignore artefacts of Zig build system 2024-05-20 22:35:51 -04:00
Dmitry Bogatov
93f7645838 canon-yaml: Import early-alpha version of YAML formatter
I have been working on new, hopefully efficient, YAML formatter for
couple weeks. It works, it is significantly faster that both python
and haskell version, but both documentation and error reporting are
lacking.
2024-05-20 22:34:03 -04:00
Dmitry Bogatov
da46d85a02 config(emacs): Prevent git from abbreviating filenames in "git log --diffstat" 2024-05-18 17:11:21 -04:00
Dmitry Bogatov
fdc74869b2 config(emacs): Add list of recent commits to "magit-status" screen
Seems useful and I can't feel the slow down of one more git(1) invocation.
2024-05-17 21:09:04 -04:00
Dmitry Bogatov
4ac20c9212 config(emacs): Open list of git repositories in emacs mode
Default single-key bindings are reasonably comfortable (after redefining j/k).
2024-05-17 21:05:50 -04:00
Dmitry Bogatov
849d841e7c config(emacs): Refactor configuration to use :custom instead of "setq"
This is more correct, since :custom correctly runs on-update hooks defined by
"defcustom" form.
2024-05-17 21:04:46 -04:00
Dmitry Bogatov
464c33b03c config(emacs): Configure command to open list of git repositories
These days I only work on $dayjob and ~/source, and configuration
reflects this. I might return to other projects some day.
2024-05-17 21:02:10 -04:00
Dmitry Bogatov
146e00ce56 config(emacs): Configure magit to not show list of refs in the revision
Due specifics of my pull-request workflow at $dayjob, that section
gets several pages long and is completely unusable. So far I didn't
fee the loss for any other repository.
2024-05-17 20:37:44 -04:00
Dmitry Bogatov
f7f3eccd1a config(emacs): Change "j/k" magit keybindings to move line-wise
Moving by sections feel, uhm, jumpy and non-intuitive. Also, you don't
expect me to use C-n/C-p to select pieces of a hunk, right?
2024-05-17 20:35:54 -04:00
Dmitry Bogatov
69ee0d0612 config(emacs): Configure magit to display --no-merges log option 2024-05-17 20:35:32 -04:00
Dmitry Bogatov
32a680435d config(nixos): Add documentation of some haskell libraries into $profile/share/doc 2024-05-17 20:33:27 -04:00
Dmitry Bogatov
43a73725b2 config(emacs): Automatically save files on buffer switch
Since I almost never kill buffers, emacs never warns me that I forgot
to save the buffer before I forget about. This sometimes results in
puzzling behaviour from external tools.

Given that normally I do ":w" quite often, I don't expect these
advices to break any of my workflows.
2024-05-17 20:30:54 -04:00
Dmitry Bogatov
aecc2ba797 config(emacs): Do not auto-caps "day" word in SQL
On $dayjob we have view that has column with that name.
2024-05-17 15:58:35 -04:00
Dmitry Bogatov
983f4c7315 config(emacs): Configure more keybindings for magit
Magit is good out-of-box, after reading the manual, it awesome.
2024-05-17 15:57:39 -04:00
Dmitry Bogatov
e6fc444b43 text/gemini: New post: Writing into /dev/stdout file 2024-05-15 09:00:55 -04:00
Dmitry Bogatov
ed35e07766 config(nixos): Configure nginx to serve local documentation on 127.0.0.10:80
Also, assign pretty DNS name to this IP address. This has following
benefits compared to file://foo.html bookmarks:

 * This way I can link to local documentation from Gemini files.
   Lagrange tries to open file:// on its own.

 * Links with missing /index.html work correctly. Unfortunately, some
   documentation is clearly designed to be served by web-server, not
   to be read over file:// protocol.
2024-05-13 09:04:29 -04:00
Dmitry Bogatov
73cf6bfdd4 config(emacs): Configure "helm" completion framework
It is quite nice in general, but what is most valuable to me is
convenient buffer switching.
2024-05-13 08:57:08 -04:00
Dmitry Bogatov
560fd6f817 config(emacs): Bind useless arrow keys to buffer navigation commands
Not sure yet if this is going to be helpful, but these arrow keys are
completely useless for text navigation, so nothing is lost.
2024-05-10 20:38:24 -04:00
Dmitry Bogatov
8b7d5b31d8 config(emacs): Avoid configuring "ghcid" from Emacs
It can (and should) be done in much more flexible way by putting .ghci
and .ghcid files into the Haskell project root.
2024-05-10 20:23:56 -04:00
Dmitry Bogatov
7e436c2a6a config(emacs): Enable "winner-mode" to get undo for window layout 2024-05-10 20:14:52 -04:00
Dmitry Bogatov
8036264441 config(emacs): Just (require 'evil)
There is no point in playing with lazy initialization -- there is
absolutely no scenario when "evil" is not loaded.
2024-05-10 20:13:04 -04:00
Dmitry Bogatov
717ea979da config(emacs): Install and somewhat configure Matrix client
I am somewhat ashamed to admit it, but Matrix is easier to use, and
history stored on the server is more convenient. I don't use Matrix
much, but when I need help with Zig, it is nice to have solution in
Emacs (as opposed to in-browser solution).
2024-05-10 20:06:16 -04:00
Dmitry Bogatov
026e0a5c88 config(emacs): Remove delay in bookmark search
I used to believe that bookmark interactive search is just that slow, but all
this time it was about stupid configuration variable. I guess it uses more CPU
this way, but really, I have under hundred of bookmarks, how expensive it can
be?
2024-05-10 19:49:36 -04:00
Dmitry Bogatov
d988290bbe config(emacs): Change "C-x K" to also close the window
This is usually what I want to happen when I want to actually kill the buffer.
2024-05-10 19:48:46 -04:00