Commit Graph

71 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
9142e179fd refactor(text-editing/toggle-comments): simplify implementation 2024-11-21 01:25:01 +00:00
Jim Myhrberg
bd6c2439f0 chore(keybinds): replace nearly all global-set-key with general 2024-11-21 01:24:10 +00:00
0c124709b9 fix(language/go): ensure tree-sitter grammar correctly 2024-11-05 00:18:45 +00:00
3edd8e647e feat(treesit): install grammars to custom directory 2024-10-24 03:13:17 +01:00
efd3bf1dde fix(language/scss): prevent tree-sitter-mode from activating in scss-mode
tree-sitter-mode does not play nice with scss-mode, and results in the
buffer having no syntax highlighting at all.
2024-10-24 01:59:55 +01:00
fae8b8bb6b chore(treesit): add extra helper functions 2024-10-24 00:21:52 +01:00
243e2e17b1 chore(treesit): add and use treesit helpers for easier custom font-lock queries 2024-10-23 02:07:27 +01:00
f70de31989 fix(completion/yasnippet): fix completion issues caused by yasnippet
This somewhat works around some changes to cape, which I was abusing to
effectively get a capf yasnippet function that would only return results
on exact matches. This allows normal lsp completion to work just fine,
except for exact matches against specific snippets.

Now we use the yasnippet-capf package instead, no longer needing the
company-yasnippet package, and hacking it to also only give a single
result back, with some caveats.
2024-10-18 02:47:37 +01:00
Jim Myhrberg
64d520c1d5 revert(text-editing/smartparens): disable navigate action on {} pair
This reverts commit 2dfc86b610.

Removing navigate action on {} pair has a lot more side effects which
are very annoying. I will need to find another workaround.
2024-07-15 10:48:30 +01:00
eec29b6c55 chore(text-editing/smartparens): remove old {} pair post-handler
I don't recall why I added this in 2015, and as far I can tell removing
it doesn't affect anything.
2024-05-26 23:52:24 +01:00
2dfc86b610 fix(text-editing/smartparens): disable navigate action on {} pair 2024-05-26 23:52:14 +01:00
6faa4d9f65 fix(language/terraform): disable lsp-mode and tree-sitter-mode
Both cause annoyances and freezes, to the point they're generally not
worth using right now.
2024-05-12 13:52:32 +01:00
df10665d0c fix(text-editing/treesit): resolve issues with treesit-auto package
When the global-treesit-auto-mode is enabled, was getting lots of errors
related to an infinite loop whenever opening a buffer supported by one
of `*-ts-mode` modes. Instead, I now take a more manual and intentional
approach to using the built-in treesit modes for specific languages.
2023-12-15 14:55:22 +00:00
0053382b78 fix(text-editing/treesit): ensure treesit and related packages are loaded correctly 2023-12-07 00:10:54 +00:00
400ba2c37c feat(editor/treesit): expand treesit highlight features to max 2023-08-01 01:39:43 +01:00
762f2ca733 fix(text-editing/treesit): correctly load on versions of Emacs without built-in treesit 2023-05-23 23:11:22 +01:00
146d2311a9 chore(treesit): tweak setup of built-in treesit modes 2023-05-09 01:30:18 +01:00
f7e9abbcb1 feat(text-editing): remove excess keybindings for smart-shift
They were mostly getting in the way to perform regular operations after
performing a shift.
2023-05-09 00:50:10 +01:00
956dc88505 fix(magit/forge): fix error when attempting to edit a PR description
Enabling tree-sitter-mode in markdown buffers led to tree-sitter-mode
failing to load when editing pull request descriptions with forge.

As tree-sitter seemed to have no effect on markdown files, we might as
well just disable it.
2023-04-30 23:47:38 +01:00
d30d2e340b feat(language/python): enable tree-sitter-mode 2023-04-25 02:12:28 +01:00
d7494f5147 feat(language/php): enable tree-sitter-mode 2023-04-25 02:12:19 +01:00
c3dd1fe68a feat(language/nix): enable tree-sitter-mode 2023-04-25 02:12:08 +01:00
67a8b439f5 feat(language/markdown): enable tree-sitter-mode 2023-04-25 02:11:54 +01:00
20457dc99f feat(language/lua): enable tree-sitter-mode 2023-04-25 02:11:38 +01:00
b8b7c7be84 fix(language/go): enable tree-sitter syntax highlighting 2023-03-07 23:37:24 +00:00
e138cb3a84 fix(language/sh): only activate tree-sitter in sh and bash scripts
The tree-sitter grammars don't work properly with zsh scripts for
example, so only activate tree-sitter if sh-shell is bash or sh.
2023-02-08 22:43:46 +00:00
cead803781 feat(language/typescript): switch to new typescript-ts-mode
As typescript-mode has effectively been deprecated, let's switch to the
new typescript-ts-mode in Emacs 29.x.
2023-02-08 22:43:46 +00:00
96c6d4c493 chore(tree-sitter): remove needless :defer t statement 2022-12-04 13:39:38 +00:00
dad465c90a chore(text-editing/smartparens): move setup to a central list of hooks 2022-12-04 01:55:43 +00:00
044c67d379 chore(tree-sitter): move setup to a central list of hooks 2022-12-03 23:34:52 +00:00
fe33fe0344 chore(deps): update string-edit package name to string-edit-at-point 2022-11-23 21:15:18 +00: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
0de0c4ca23 feat(text-editing): replace toggle-quotes with cycle-quotes package
It seems cycle-quotes does a better job than toggle-quotes. For example
it supports literal backtick strings in Go, which toggle-quotes does
not.
2022-07-20 22:02:12 +01:00
86464e80b1 feat(text-editing): add shift-number package 2022-07-20 22:02:12 +01:00
ab7d541148 feat(text-editing): add beginend package which improves M-< and M-> keybindings 2022-07-20 22:02:12 +01:00
ad2e2d2bab feat(text-editing): add siren-insert module
Defines two functions for inserting en-dash and em-dash characters which
are typically difficult to type directly into Emacs.
2022-05-02 10:27:26 +01:00
881250f6c4 chore(core): add siren-dir and siren-cache-dir helper functions 2022-04-26 20:00:03 +01:00
d86f6c4490 feat(language): enable tree-sitter for most languages that are supported 2022-04-19 01:12:42 +01:00
d85671a44c fix(text-editing): use wildcard in tempel-path
After an update to tempel, it seems tempel-path must point to a file, or
a wildcard matching one or more files.
2022-04-16 23:54:29 +01:00
6bada58d49 feat(snippets): add wip config for tempel to try it out 2022-03-14 21:16:15 +00: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
b742c9026f feat(snippets): disable prog-mode snippets from yasnippet-snippets
The prog-mode snippets are very basic, a bit a annoying, as they
contain a couple of single-character snippets which conflict with common
variable names in Go.
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
b7b21c5e13 chore(formatting): move formatting related modules to a dedicated formatting directory 2021-04-07 23:50:11 +01:00
affbe2e113 fix(text-editing): correctly load custom snippets on emacs startup 2021-02-27 23:30:05 +00:00
395ad7ccac fix(startup): correctly setup deferred loading for various packages
This just ensures that various packages that can defer loading actually
does defer until they're first used.
2021-02-17 01:52:59 +00:00
831503060f chore(startup): stop using emacs-startup-hook to trigger package load
Packages that need to be loaded on emacs startup, should just be loaded
through use-package in a non-deferred manner.

It makes no real difference to startup, loading the packages either
slows down emacs before "startup" is complete, or right after it
completes. End result is that Emacs is unresponsive for basically the
same amount of time regardless.
2021-02-17 01:52:58 +00:00
345584e52c chore(text-editing): update move-dup package to v2.x
Version 2 seems to mostly just change the `md-` function/variable prefix
to be `move-dup-`.
2021-02-17 01:52:58 +00:00