Commit Graph

113 Commits

Author SHA1 Message Date
fe6a4e7ce5 fix(elisp): add lexical-binding comment to all files to suppress new Emacs 31 warnings
I've set `lexical-binding` to `nil` in all Emacs Lisp files to suppress
the warnings introduced in Emacs 31 requiring all elisp files to have a
`lexical-binding` comment.

This retains the default behavior of dynamic binding when no
`lexical-binding` comment is present. With it set to `t` across the
board, various things break, and fixing those is a task for another day.
2025-06-29 12:23:03 +01:00
ed5432641a feat(keybindings): add cmd+shift+p and cmd+/ keybindings from VSCode
Makes cmd+shift+p open the command palette and cmd+/ toggle comments, as
they do in VSCode.

This should ease my recent usage of Cursor/VSCode alongside Emacs, as
certain keybindings I have in Emacs cannot be setup in VSCode to work in
all contexts. Hence I've had to get used to cmd+shift+p instead of C-x
C-m, as the later does not want to play ball when a terminal is active
in VSCode.
2025-06-28 17:14:37 +01:00
Jim Myhrberg
9313f84d51 fix(editor/origami): add missing major modes 2024-11-21 01:31:02 +00:00
6e9307d616 feat(editor/env): switch from direnv package to envrc and mise
envrc.el should be less invasive overall, and mise does the same thing,
but for mise instead of direnv.
2024-05-09 02:31:34 +01:00
1a462a32c6 chore(editor/fussy): use built-in flx-rs score wrapper
The built-in wrapper is identical to my previous custom one.
2023-12-15 15:06:38 +00:00
e74a3bd3ad fix(editor/fussy): improve completion performance and simplify setup
The fussy package now comes with helper functions to strip down an input
string, removing all extra "tofu" characters added by Consult. This is
also faster than the old hand-rolled solution I had come up with
previously.

Hence I've switch to simpler variant that uses a custom scoring function
that calls `flx-rs-score`, with `str` having been sanitized with the
function assigned to `fussy-remove-bar-char-fn`, which by default is
`fussy-without-tofu-char`.

I've also submitted a PR to fussy that will cleanup the input string
when using flx-rs:

https://github.com/jojojames/fussy/pull/36
2023-11-20 19:26:47 +00:00
2212a5eb13 feat(editor/doom-modeline): override flycheck/flymake "ok" icon
I don't like the "check_cicle_outline" icon that doom-modeline uses by
default. Hence we override that icon to replace it with "check_bold".
2023-08-01 02:17:28 +01:00
0b63d3607d feat(editor): replace nearly all use of all-the-icons with nerd-icons
This also lets us unpin doom-modeline, which was previous pinned to the
latest commit that supported all-the-icons.
2023-05-11 01:49:40 +01:00
4654ea5e80 fix(completion/marginalia): improve issues with project-buffer annotations
Show project relative file paths even when project root and file paths
start with a mixure of "~/" and absolute path.

Also handle buffers not backed by a file on disk by falling back onto
marginalia--buffer-file.
2023-05-11 01:19:05 +01:00
e45fce6685 fix: pin doom-modeline to last all-the-icons supported commit
doom-modeline recently switched from all-the-icons to nerd-icons, but I
cannot get it to render icons correctly. So for now I'm pinning
doom-modeline to the last commit that supported all-the-icons.
2023-05-09 00:46:03 +01:00
3bd155cb79 feat(editor): try snap-indent as a replacement for yank-indent
Currently trying via my own fork of snap-indent, which has a PR pending.
2023-05-01 00:01:45 +01:00
a78e417e6f feat(icons): use nerd-fonts to display icons in terminals
Uses the new nerd-icons package to display icons in various places
similar to all-the-icons. But it works in a terminal too as long as the
terminal is using a Nerd Font.
2023-04-30 23:47:38 +01:00
db016c1e7d chore(editor): switch yank-indent from vendored to separate repo version 2023-04-18 02:30:16 +01:00
0eedc37603 feat(editor): add custom yank-indent package
When yank-indent-mode is enabled, yanked (pasted) text is indented based
on the indent rules of the current major mode. It has a
global-yank-indent-mode too which by default excludes a long list of
known indentation sensitive modes with which this approach does not work
very well.

It is based on some random hacky snippets elisp I've been using for over
a decade. Said snippets are themselves based on some random snippets I
found online, and since morphed into the weird monster they had become.
2023-04-16 03:13:14 +01:00
1a55833d09 fix(editor/indent-guides): switch back to column display due to performance
Yet again, I'm switching highlight-indent-guides back to column mode. It
seemed that character mode performance had been improved. But I've run
into a number of files since where it tanks performance to the point key
strokes takes close to a second to render.
2023-02-07 19:04:22 +00:00
d83ca9867a feat(editor): change highlight indent guides style to a thin line
For now, it seems that this no longer causes performance issues compared
to the column style. Time will tell if this stays true.
2023-01-15 20:57:29 +00:00
d6457f26de feat(editor): add direnv-mode to set env vars via direnv 2023-01-09 10:48:26 +00:00
9654403bee feat(editor): enable subword-word globally in all buffers 2022-12-04 01:14:57 +00:00
d0a1d34e2c chore(editor/rainbow): move setup to a central list of hooks 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
5322ca88eb chore(editor/all-the-icons): remove custom project-file category alias
It is now part of the MintSoup's fork of all-the-icons-completion.
2022-10-24 10:40:39 +01:00
e015c7f619 chore(editor): move marginalia related code to siren-marginalia module 2022-10-19 23:22:02 +01:00
dfe7250218 feat(editor): switch to fork of all-the-icons-completion 2022-10-19 23:22:02 +01:00
d498f20336 fix(editor): move siren-all-the-icons module from projects to editor directory 2022-10-19 23:21:55 +01:00
4e1250f259 chore(editor): minor tweak to how file name is rendered in modeline 2022-08-20 01:13:26 +01:00
1e5761afc7 feat(editor): don't enable vertico-mouse-mode
I basically never use it, but the mouse-over highlighting can be
annoying if the mouse happens to be towards the bottom of the frame.
2022-08-20 01:12:11 +01:00
c7d1f1d749 feat(editor): replace highlight-symbol with symbol-overlay
symbol-overlay claims to be much faster at highlighting symbols across
large files, and also has better interactive symbol manipulation
features.
2022-08-15 23:56:17 +01:00
19713d30e3 fix(editor): resolve flx-rs+consult issues
This is a more generic and robust fix for flx-rs not behaving correctly
when given consults extra metadata bytes as part of the input candidate.

This should now work with any candidate provided by consult, not just
those that come from the consult-buffer command.
2022-08-11 02:27:29 +01:00
41742663de chore(editor/fussy): tidy up commented out stuff 2022-07-20 22:02:13 +01:00
92a6db71e6 fix(editor): correctly filter buffer results from consult-buffer
It seems the string candidates produced by consult-buffer have some
extra non-printable bytes appended at the end. These bytes makes flx-rs
not match against the candidate properly.

Consult does add a text property to the candidate string called 'buffer,
which contains the original buffer name.

So for now, we advice the flx-rs-score function and attempt to the
extract the buffer text property from the input candidate and use that
instead. If the candidate has no such text property, we use it as is.
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
29db7b63ac feat(editor/fussy): improve completion performance
It seems the fzf-native scoring method can get slow and laggy over
time. It seems the flx-rs method does not, and is overall a bit faster.

However, flx-rs doesn't give exact matches as high of a score as
fzf-native, so scoring might be a bit different than I'm used to. Time
will tell if I'll find it annoying enough to switch back to fzf-native.

Also switch from orderless to fussy's all-completions backed filtering
method. This yields a noticeable improvement in speed, but it does not
support multiple search terms separated by space like orderless does.
Another potential habit I will need to adjust.
2022-07-19 00:39:53 +01:00
3d40d3b0ef feat(editor): add marginalia tab annotator with tab group support 2022-07-15 23:34:03 +01:00
b411cc7856 chore(editor): improve setup of indentation highlight guides 2022-07-15 22:44:24 +01:00
2fa38381ee fix(editor): change highlight indentation guides back to 'column mode
It turns out that using the 'character mode causes very noticeable
performance degradation and straight up lag when typing in a lot of
programming languages. Setting it back to 'column seems to resolved this
for me.
2022-07-13 18:49:42 +01:00
efde4eaaf2 feat(editor): don't highlight current indent level
Simply render indent guides identical for all levels. Specifically
highlighting the current indent line makes things feel a bit "noisy",
and also doesn't always respond to changes that fast, making things feel
slow too.
2022-06-20 20:22:58 +01:00
f319097821 feat(whitespace): re-enable whitespace mode without newline-mark
Turns out the conflicts with both copilot and highlight-indent-guide was
due to the newline-mark. Hence disable newline-mark and re-enable
whitespace mode.
2022-06-20 20:22:35 +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
5b054bdd07 fix(editor/undo): increase undo limits when using undo-fu
Turns out undo-tree massively increases undo limits, and the defaults
seem to cut off history for me much sooner than I'd like. So I set the
limits to the same high values are undo-tree does.
2022-06-18 00:25:18 +01:00
c5010120da feat(editor): improve styling of highlight-indent-guides package
Use regular face definitions in override theme instead of the percentage
custom vars.
2022-06-18 00:23:16 +01:00
f6ecda7bf4 feat(completion): replace orderless with fussy
Use fussy instead of orderless for filtering and scoring/ordering
completion candidates. This seems to overall order results in a much
better way than just orderless.

Technically orderless is still used to filter the candidate list, but
fzf-native is used to score/order the results.
2022-06-09 00:58:38 +01:00
a26c613342 chore: update comment on siren-whitespace module 2022-05-12 01:30:22 +01:00
911bdb7182 feat(editor): add extra navigation keybindings for vundo
Simply add ctrl variants of the standard f/b/n/p/a/e keybindings enabled
in vundo-mode-map.
2022-04-28 12:08:11 +01:00
177f075853 feat(editor): replace undo-tree with undo-fu and vundo
Also replace undohist with undo-fu-session.

Overall this seems to yield a more reliable undo history, as undo-fu and
vundo supposedly operate with vanilla emacs undo history state, while
undo-tree supposedly does some custom tweaks to the undo state.
2022-04-26 23:39:48 +01:00
c84bf1dea6 feat(editor): improve whitespace-mode setup and cleanup on save
Move away from the whitespace-cleanup-mode package, and instead simply
define our own whitespace-cleanup-on-save-mode minor-mode that uses a
before-save-hook.
2022-04-26 23:33:57 +01:00
881250f6c4 chore(core): add siren-dir and siren-cache-dir helper functions 2022-04-26 20:00:03 +01:00
2b39d5b0d7 chore(use-package): use :preface in favor of :init when defining things 2022-04-22 23:25:56 +01:00
dad8f778b3 fix(editor): use new marginalia-field-width variable name
The old marginalia-truncate-width variable was deprecated a while ago,
and the deprecated var alias was recently removed from marginalia.
2022-04-19 01:12:42 +01:00
96f3dca1c9 chore(editor): minor tweak to vertico setup 2022-04-07 00:42:04 +01:00