Commit Graph

101 Commits

Author SHA1 Message Date
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
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
ee91287b52 feat(completion): ignore case in minibuffer completion 2022-03-14 21:16:14 +00:00
106245af8b feat(completion): improve completion-at-point/company candidates
This applies especially in lsp-mode. Yasnippet snippets now show as
completion candidates if the word at point exactly matches a snippet
keyword, otherwise it'll fallback to normal lsp backed completion.

And it also supports completing file/directory names now too while
lsp-mode is active.

All this is done by modifying completion-at-point-functions after
lsp-mode has done it's trickery with it. Along with a dirty hack to
company-yasnippet to make it only activate on exact matches. Without
this hack, lsp backed completion rarely activates as snippets would have
higher priority if there's any partial matches.
2022-03-14 21:16:13 +00:00
1db4018497 feat(nativation/consult): custom groups for consult-buffer
Using consult-buffer to switch between buffers is now project aware,
meaning when current buffer is in a project, the list of buffers is
split into two groups; project buffers, and other non-project buffers.

The project buffers group is above the other buffers group, meaning it's
very easy to switch to other buffers within the same project, while
still being able to switch to non-project buffers too.

When current buffer is not part of a project, all buffers are shown
together in a single completion group.
2022-02-17 22:08:03 +00:00
4a552aa96d fix(editor/vertico): resolve race-condition issue with projectile-switch-project
Occasionally right after starting Emacs, it was possible to issue a
projectile-switch-project command which ran before my hacky
vertico-directory advice had been added. This should ensure the advice
gets added earlier.
2022-02-07 22:42:17 +00:00
fd1072ae8c chore(editor/marginalia): minor customization tweaks 2022-01-26 22:48:39 +00:00
c80b4e24fa fix(editor/vertico): cleanup if projectile command is canceled 2022-01-18 03:04:53 +00:00
309bc2a611 feat(editor/vertico): improve extension setup
Override default straight recipe for vertico to expose extensions as
packages.

Also create hacky vertico-directory-mode to easily toggle
vertico-directory features on and off.

vertico-directory-mode is then used by a projectile advice to
temporarily disable vertico-directory features while completing results
from projectile. This is required to avoid breaking the
projectile-switch-project and related commands, as the project list is
not a set of files, but vertico-directory-enter thinks it is.
2022-01-18 00:51:34 +00:00
04d83a23cd feat(editor/veritco): add vertico-directory extension 2022-01-16 03:35:49 +00:00
56a577ae91 feat(completion): switch from selectrum to vertico
I finally resolved the lsp-mode bug I had whenever I tried vertico in
the past. It was due to me setting resize-mini-windows instead of
vertico-resize.
2022-01-09 15:41:17 +00:00
f4e1c403b0 feat(editor): add project-buffer marginalia annotator
This is useful for annotating completion-read buffer results which all
belong to a single project, as it removes the project root from the
file path field, showing a relative path to each buffer's file from the
project root.
2021-10-06 01:39:55 +01:00
0e6a7b6290 feat(editor): switch to vertico+orderless from selectrum+prescient
Personally I find orderless is giving me better results than prescient
when fuzzy/flex matching is enabled. Hence the switch to orderless.

I also split the modules apart to ensure, that selectrum, vertico,
prescient and orderless can be mixed and matched however and work
correctly.

And the switch from to vertico from selectrum is mostly cause I like
it's wraparound/cycle feature, where end/beginning of the candidate list
will wrap around.
2021-06-24 22:39:17 +01:00