Compare commits

..

283 commits

Author SHA1 Message Date
b8adef76fb chore: update gitignore with compile elpa files, org-roam-db, ... 2025-08-14 11:44:38 +02:00
53aa91408c fix: which-func custom setting 2025-08-14 11:44:30 +02:00
06208d5491 feat: Display function name in header as well 2025-07-24 10:24:54 +02:00
423acecb38 replace whitespace-cleanup with delete-trailing-whitespace
whitespace-cleanup seems to do some formatting, tabs-to-whitespace and
vice versa,... which are kinda annoying.

We should be fine for now with just removing trailing whitespaces.
2025-07-24 10:24:01 +02:00
706b396e1c feat: load org-roam at startup 2025-05-27 14:06:22 +02:00
b79d782623 feat: Make dashboard a bit fancier 2025-05-27 14:06:08 +02:00
8ba598127b feat: show line numbers 2025-05-27 13:49:51 +02:00
4aeb92eb6f feat: Add which-func configuration 2025-05-27 13:06:26 +02:00
c3a188defe fix: Remove unused mark section
M-SPC is used for selecting region anyway
2025-05-27 13:06:08 +02:00
0c18e02686 fix: liniting errors on init.el 2025-05-27 12:55:07 +02:00
6a57cbfd1f feat: Add custom modeline 2025-05-27 12:51:50 +02:00
015ed00b0f feat: refactor org mode configuration
Defer loading to speed up startup and combine all the configuration of
org mode in the same block.

org-ellipsis is newly added and gives some eye candy when org blocks
are folded.
2025-05-27 12:51:50 +02:00
980ce6750b feat: Add paren package configuration
show-paren-context-when-offscreen is handy to indicate when we are
offscreen for a block of code
2025-05-27 12:51:50 +02:00
28b6168110 fix: refeactor electric pair
It's a built-in package, so we can provide a proper configuration
section using use-package.
2025-05-27 12:51:50 +02:00
c809f480bd fix: load theme after it is actually loaded, not at init time 2025-05-27 12:51:50 +02:00
3591e5704e fix: remove/apply defer only where it makes sense
:defer is to defer loading because some other action (hook/config/...)
will load it when appropriate.
2025-05-27 12:51:50 +02:00
e6e5b5e461 feat: Remove org-roam-ui
Not using it, so don't have it.
2025-05-27 12:51:50 +02:00
a79987f30f chore: stylefix 2025-05-27 12:51:50 +02:00
3f93a19d4b feat: enable corfu iso company-mode
No issues so far when using melpa iso latest git repo (elpaca behaviour)
2025-05-27 12:51:50 +02:00
80b3e4dbc1 feat: enable vertico-cycle and call hook when appropriate 2025-05-27 12:51:50 +02:00
377a5cadff fix: whitespace has a separate built-in package
It has a better hook (whitespace-cleanup) than the barebones delete-trailing-whitespace.
2025-05-27 12:51:50 +02:00
adab1147e0 fix: Docs on keys to use when resizing 2025-05-27 12:51:50 +02:00
7f901b23ae feat: Remove elpaca
I'm not actually using it and it's just bloat at this point.
This speeds up the startup significantly.

Remove what you don't need.
2025-05-27 12:51:50 +02:00
a731bab651 Only pop-up messages buffer if there is an error 2025-05-26 10:59:45 +02:00
2572e8c221 Fix linting warnings in early-init/init.el
There should be no functional changes
2025-05-26 10:59:38 +02:00
6c24da4503 Rework eglot configuration to use built-in package 2025-05-25 17:26:38 +02:00
f2dc1fe496 Add flymake configuration 2025-05-25 17:26:30 +02:00
49a5164f45 Rework isearch configuration using emacs-solo inspiration 2025-05-25 17:26:06 +02:00
22c029b2f4 Remove old eldoc/jsonrpc workarounds and just use built-in packages 2025-05-25 17:25:41 +02:00
ff740ce08e feat: Add org-download 2025-04-30 09:40:43 +02:00
1a21781fba fix: switch back to company from corfu to avoid random crash
It seems like a known issue (don't have the link anymore..) but
company is doing fine for now so just switch back to it.
2025-04-30 09:39:47 +02:00
d3dc9465dd fix: load init.el of notes repo when org-roam is properly loaded
This avoids all kinds of issues about variables not being declared,
etc. in the project-notes init.el
2025-04-30 09:38:32 +02:00
f5ef8d68c5 fix: Update visit/reload-config docs 2025-04-30 09:37:32 +02:00
0b57fa79b5 feat: Update elpaca
This avoids the warning at startup about not being able to determine
elpaca core date.
2025-04-30 09:36:55 +02:00
c47c5a5185 fix: revert-mode setting 2025-01-09 21:11:48 +01:00
17e062e07f Add font and icon/nerd-font section 2025-01-09 20:55:30 +01:00
ede533e792 Use load-file option for custom file and notes iso manual check 2025-01-09 20:54:56 +01:00
3853d9d247 fix: close minibuffer if open when pressing C-g 2025-01-09 20:54:56 +01:00
c8fa26b07b feat(corfu): make <tab> execute complete 2025-01-09 20:54:56 +01:00
7252361ab1 feat(consult): enable 2025-01-09 20:54:56 +01:00
275d07b961 feat(buffer-completion): replace company-mode with corfu 2025-01-09 20:54:56 +01:00
e692a9de93 add(org-roam): custom command to filter on a tag 2025-01-07 22:05:46 +01:00
28dae3bfeb add(org-roam): don't limit tags to 10 chars 2025-01-07 22:05:29 +01:00
cea6f3f2c0 add(org-roam): enable db autosync mode 2025-01-07 21:48:45 +01:00
0e722c06b5 add(org-roam): show tags in org-roam-node-find
This allows us to search for them as well
2025-01-07 21:47:58 +01:00
34e4462f1b add(yas): enable also in text-mode 2025-01-07 21:47:39 +01:00
2023ec08b3 add(snippets): Add kaboom snippet for c-mode 2024-12-21 19:54:33 +01:00
7285b8750e feat: load init.el from (org-)notes repo if it exists 2024-11-17 19:27:45 +01:00
ad0adbc726 feat: Enable global auto-revert mode 2024-11-04 09:43:21 +01:00
75bda91171 In-buffer-completion: Add company-mode 2024-10-17 21:59:48 +02:00
a68f566cd9 In-buffer-completion: Disable corfu
Getting crashes with emacs 29.4, seems to be a known issue.
Until emacs 30, find another in-buffer-completion solution.
2024-10-17 21:59:09 +02:00
a5efd66ec7 In-buffer-completion: Add consult completion method 2024-10-17 21:58:59 +02:00
40d9146a45 In-buffer-completion: Add separate section 2024-10-17 21:58:34 +02:00
d0657174dc Update org-agenda-files with todo.org inside org-roam-directory 2024-09-29 22:58:41 +02:00
3ad176fbf9 ORG-TODO: Mark parent task done if child tasks are done 2024-09-29 22:02:19 +02:00
6aaae92c53 ADD filetags snippet 2024-09-29 22:02:16 +02:00
934c375c34 ADD org-roam-dailies-goto-today keybinding 2024-09-29 15:13:45 +02:00
1521fcb13e ADD jsonrpc section
This is a built-in package which we are updating for eglot.
2024-09-27 16:13:47 +02:00
21fbc47a8f ADD eldoc section
This is a built-in package which we are updating for eglot.
This requires some emacs-fu which I found on the elpaca github.
2024-09-27 16:13:47 +02:00
1a99cb8ccb ELPACA: Wait until use-package integration fully loaded
Stolen from github:
https://github.com/progfolio/elpaca/issues/236

If the maintainer does it, it probably is needed.
2024-09-27 15:50:10 +02:00
ce1c827f4c ELPACA: Add sub-titles 2024-09-27 15:49:58 +02:00
62148f96ca Simplify keys for org-mode source block snippets 2024-09-27 10:08:33 +02:00
8b1d672215 FIX org-mode source block snippets 2024-09-27 10:07:52 +02:00
e837ce7551 ENABLE consult-find 2024-09-26 22:48:20 +02:00
f82e59591e ENABLE consult-flymake 2024-09-26 22:47:05 +02:00
83dc765086 ENABLE consult-compile-error 2024-09-26 22:46:53 +02:00
1022956e46 ENABLE consult-grep 2024-09-26 22:30:48 +02:00
32ddb062c0 ORG_ROAM: Add consult integration 2024-09-26 22:21:26 +02:00
bbffcd8d2b DIRED: Add guessing of target directory 2024-09-26 22:21:11 +02:00
6127374888 ORG_ROAM: Add completion everywhere
That way, when we type a part of the note name, we get an automatic
link/insert of the node.
2024-09-26 22:19:06 +02:00
8a5527c2d4 ADD org-roam + org-roam-ui 2024-09-25 23:44:37 +02:00
c5cebd2147 REMOVE logo
Img is bloat
2024-09-24 22:22:47 +02:00
5ca1559c20 Move cheat-sheet to inside config.org 2024-09-24 22:21:56 +02:00
3c24cac0c1 DELETE sunrise-commander
Not using it, maybe somewhere in the future, I'll re-enable/add it.
2024-09-24 22:08:36 +02:00
Laurens Miers
b0b017251c Merge pull request #7 from laurensmiers/unclutter
Unclutter/refresh config
2024-09-24 22:01:13 +02:00
7c39432564 Move sudo to myrmi/sudo-current-buffer
It's a new function, use the custom prefix to make that clear.
2024-09-24 21:10:57 +02:00
29f8a2b08b Update gitignore 2024-09-24 21:10:55 +02:00
ddc622f270 Move config_new.org to config.org
Use it as the main config now.
2024-09-24 21:10:53 +02:00
cb018ca96b Move config.org to config_old.org
This to keep the old settings, you never know.
Yeah, I know, it's in git and I can always go back, but it's easier to
compare if the file is still in the repo...
2024-09-24 21:10:51 +02:00
caf08093dd ADD eshell plan9/smart-mode settings 2024-09-24 21:10:49 +02:00
4233409d50 Enable dired-x whenever dired mode is invoked 2024-09-24 21:10:47 +02:00
55e765911e Rename Vertico-stack to Completion section 2024-09-24 21:10:44 +02:00
d3f6a04e9b ADD resize-mode 2024-09-24 21:10:43 +02:00
c31bd5ab5b ADD visible bell 2024-09-24 21:10:41 +02:00
edee35724e ADD python mode 2024-09-24 21:10:40 +02:00
f2cfe8035c ADD zig mode 2024-09-24 21:10:39 +02:00
954196d061 ADD rust-mode 2024-09-24 21:10:37 +02:00
d5f79bf639 ADD angry faces face to major prog modes 2024-09-24 21:10:35 +02:00
78afc078ff GENERAL: Enable column numbers 2024-09-24 21:10:33 +02:00
5ef08b39b6 ADD volatile highlights 2024-09-24 21:10:28 +02:00
584a0b1b7c MAGIT: Add example command to update submodules 2024-09-24 21:10:25 +02:00
5395706577 ORG_MODE: Fix snippets to place cursor inside source block 2024-09-24 21:10:21 +02:00
2be3a79aed CORFU: Enable automatic completion in buffer
Also cycle if we reach begin/end of list of candidates.
2024-09-24 21:10:18 +02:00
f6c14e7caa GENERAL: Add adaptive cursor width 2024-09-24 21:10:16 +02:00
d757ce44a8 GENERAL: Move general config first before vertico stack
This fixes the init error on vertico stack symbols not being known due
to ':ensure' being removed since it should be enabled by default but
this was only done later in the 'general config' section.
2024-09-24 21:10:10 +02:00
122f1f5186 ADD Iedit from old config
It's too usefull not to have
2024-09-24 21:10:05 +02:00
e02a1990aa ADD Zygospore from old config
It's too usefull not to have
2024-09-24 21:09:55 +02:00
074c5fe0b1 ADD Org mode settings from old config
- Enable Super/sub-scripts
- Preserve indentation
- Org bullets
2024-09-24 21:09:15 +02:00
1b6619a978 USE_PACKAGE: always set ':ensure t' by default 2024-09-24 21:09:13 +02:00
6e52096e2d Only load custom file if it exists 2024-09-24 21:09:07 +02:00
012e960510 COMPILATION: goto end of buffer on completion 2024-09-24 21:09:05 +02:00
6f306b4ea5 Add "Enable disabled commands" section
Enable narrow functions cause they're really handy.
2024-09-24 21:09:00 +02:00
091b5fbda2 GENERAL: Enable delete-selection-mode 2024-09-24 21:08:57 +02:00
31da5498b6 SNIPPETS: Fix org mode lisp source block snippet + add general source block 2024-09-24 21:08:55 +02:00
752734c381 SNIPPET: Add git-commit message template 2024-09-24 21:08:49 +02:00
1449ae0e5f SNIPPET: Add org source-code-block snippet 2024-09-24 21:08:47 +02:00
f1eed76f1b SNIPPET: Add c-define snippet 2024-09-24 21:08:43 +02:00
cdcd577939 INIT: Move customization to its own file that we can ignore 2024-09-24 21:08:40 +02:00
69010af86e INIT: Fix config file name for myrmi/{visit,reload}-config 2024-09-24 21:08:32 +02:00
c748fb94c4 ADD treesitter-mode for C 2024-09-24 21:08:30 +02:00
8b3f426ae1 ADD markdown-mode 2024-09-24 21:08:26 +02:00
8732e36160 PROJECTILE: Don't set indexing method
This can be forced through .dir.locals.el if necessary.
Leave it at default value (alien).
2024-09-24 21:08:20 +02:00
ee7073ea67 ADD Yasnippet hook to prog- and org-mode 2024-09-24 21:08:16 +02:00
0482e48c7f Ensure eglot does not take full control of Xref
Eglot by default will take full control of xref and make the
xref-backend-functions (eglot-xref-backend t) .

To have dumb-jump as backup if eglot would fail, instruct eglot to
stay out of Xref and add/remove eglot xref backend manually.
2024-09-24 21:08:12 +02:00
2c29e77132 ADD dumb-jump mode
Add it immediatelly to the list of xref backends.
2024-09-24 21:08:09 +02:00
f121ec0330 REMOVE smartparens
Replaced with electric-pair mode, good enough for my usecase.
Don't need all the fancy stuff smartparens provides
2024-09-24 21:08:04 +02:00
9d84faf97a ADD custom visit/reload config functions 2024-09-24 21:07:53 +02:00
f44190a45d ELISP: add demos to describe-function
It saves me some extra googling.
2024-09-24 21:07:50 +02:00
1475b4acb8 CUSTOM: Add functions to reload .dir-locals.el 2024-09-24 21:07:47 +02:00
832bc40d81 Set path/exec-path to shell path
For .dir-locals.el to find the custom programs
2024-09-24 21:07:37 +02:00
12b33b1f49 PROJECTILE: use hybrid method
Gives more flexibility with .projectile file IMO to add/remove folders
from projectile-find-file .
2024-09-24 21:07:32 +02:00
53dd2a9084 ADD custom ceedling commands
Convience function to run the ceedling command
2024-09-24 21:07:23 +02:00
43c75a29e2 REMOVE custom-set-variables
Find a way to move this elegantly to a file which can be ignored by git
2024-09-24 21:07:17 +02:00
1549038f73 ADD backup configuration
Store backups in <emacs-root>/backups
2024-09-24 21:07:13 +02:00
49e26e5568 ADD Marginalia
Some eye candy in the minibuffer
2024-09-24 21:07:11 +02:00
6e1ed0ebb6 ADD Orderless 2024-09-24 21:07:07 +02:00
17515a8377 ADD Corfu
For nice popup in eglot.
2024-09-24 21:07:04 +02:00
393bace7cf ADD consult example config 2024-09-24 21:06:58 +02:00
35102de7f5 REMOVE fido, ADD Vertico
Switch from fido to vertico
2024-09-24 21:06:44 +02:00
df5d034907 PROJECTILE: install project.el hooks
Some packages use the project.el functions/bindings (like
consult, ...) for their functionality. Install the projectile bindings
so that they start using the projectile framework.
2024-09-24 21:06:37 +02:00
22a827592d REMOVE imenu
use consult-imenu in future
2024-09-24 21:06:28 +02:00
801188ed90 ADD electric-pair mode in prog-mode
This was originally supplied by smartparens but I'm only using a
subset of this package.
The main functionality which I used from smartparens is available with
electric-pair-mode .
2024-09-24 21:06:20 +02:00
7329b044f3 ADD save-symbol-at-point function
This was originally supplied by smartparens but I don't need the whole
package for this function.

Other functionality which I used from smartparens is available with
electric-pair-mode .
2024-09-24 21:06:14 +02:00
9541cfbf44 Delete trailing whitespaces before-saving
Enable globally because I don't know of a scenario where we would ever
want this.
2024-09-24 21:05:59 +02:00
b8ef2937f3 ADD save history and recentf 2024-09-24 21:05:51 +02:00
a6c81d05ba ADD smartparens 2024-09-24 21:05:48 +02:00
00d40a2d5a PROJECTILE: Initial configuration
Not sure yet about this but working for now.
Override default project keymap
2024-09-24 21:05:25 +02:00
bd3f737477 ADD enhanced dired 2024-09-24 21:05:14 +02:00
db266f3ece ADD 'transient' dependant package for magit 2024-09-24 21:05:11 +02:00
d184007b9b ADD spell checking in prog-mode 2024-09-24 21:05:02 +02:00
3bf48f5927 ADD zap-up-to-char keybinding 2024-09-24 21:04:58 +02:00
ef04adcfd9 ADD hippie-expand
Remap dabbrev to hippie-expand
2024-09-24 21:04:48 +02:00
0db6d1753e ADD multipe-cursor keybindings 2024-09-24 21:04:44 +02:00
0f9db243ad 'Fresh' start
- Use config_new.org as main config file
  Trimmed down version of old config.
  Insipred by 'mastering emacs' book to use more the built-in
  functionality of emacs. I found that It's more than good enough for my usecases.
- adapt early-init for quicker startup
  Stolen from doom emacs
- Don't use/load project.org
  Use .dir-locals.el you peasant
2024-09-24 21:01:46 +02:00
27f8caf0a5 PROGRAMMING: Add rust mode 2024-04-09 13:18:05 +02:00
110f3c5dd9 PROGRAMMING: add zig-mode 2024-04-09 09:44:10 +02:00
629f3da53b EGLOT: Add eglot
LSP client which is built-in
2023-12-05 16:18:13 +01:00
a1a3856486 LSP: remove old commented out blockrtags
Use eglot instead, it's built-in:
https://github.com/joaotavora/eglot#contribute-to-eglots-development
2023-12-05 16:07:50 +01:00
51f4498c99 RTAGS: remove rtags
Use eglot instead, it's built-in:
https://github.com/joaotavora/eglot#contribute-to-eglots-development
2023-12-05 16:06:54 +01:00
ff9ed0382d SWIPER: use thing-at-point by default when searching with swiper 2023-08-01 09:35:47 +02:00
54491b0c06 feat: add magit-submodule-update-all suffix 2023-06-11 14:32:14 +02:00
a4f7828259 fix: elpy-enable at init stage
Taken from elpy github readme.
2023-06-09 15:54:28 +02:00
5ebe6422f8 feat: refactor yasnippet
Put snippets in standard path
2023-06-08 23:37:58 +02:00
ffcbf8ec41 feat: add ivy-rich 2023-06-08 21:23:50 +02:00
0a2148f8df fix: move dired-config to dired-single for it to take effect 2023-06-08 17:55:19 +02:00
dd2692ca6e chore: clean up old debug code 2023-06-08 13:56:57 +02:00
c47edf6f18 feat: Add initial dired config
Single buffer + hiding dotfiles
2023-06-08 13:56:38 +02:00
ff49b4958c feat: remove sunrise commandor
Learn dired-mode instead
2023-06-08 12:57:40 +02:00
d37d733f5b feat: use fuzzy search in swiper, ignore order search in all others
Can switch this at runtime using hydra (C-o M).
2023-06-07 16:09:47 +02:00
1b386ae27f feat: diminish counsel 2023-06-07 16:09:22 +02:00
68d9e58c51 feat: enable ivy-hydra + move hydra 2023-06-07 16:09:12 +02:00
667b311e32 feat: refactor projectile setup
Set ivy as completion system
refactor keymap binding
don't enable projectile-global-mode, regular mode is enough
2023-06-07 13:31:44 +02:00
70bac71039 feat: enable menu in rg 2023-06-07 13:31:13 +02:00
a4040e4eef fix: remove undo GC hook
To avoid interfering with GC
2023-06-07 12:40:25 +02:00
b4fbaac91f fix: fix typo in ivy config 2023-06-07 12:33:09 +02:00
64c11c968c fix: dashboard not loading 2023-06-07 12:02:02 +02:00
4aed3d38dd feat: use :diminish in use-package
Only use it for the built-in modes like subword/auto-revert
2023-06-07 11:59:34 +02:00
808a7215ed feat: Add ivy/counsel
More lightweight than helm and suits my needs for now.
2023-06-07 11:59:31 +02:00
1758fe8906 feat: remove helm
It's getting too slow for me, might be due to garbace collection but
helm is too much for me anyway.
2023-06-07 10:52:44 +02:00
a581a36f55 feat: increase garbage collection threshold always 2023-06-07 10:52:44 +02:00
f1f6b38b6c feat: enable :ensure always true for use-package 2023-06-07 10:47:15 +02:00
d7dd8c6af1 feat: remove old workarounds
Fixes for this have been merged in 26.3, 27.1 :
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34341

So no need for this anymore
2023-06-06 10:39:40 +02:00
fe97daac36 feat: remove paradox
No longer maintained, never really used it and using elpaca now
2023-06-06 10:38:35 +02:00
0ef6bf0f3c fix: move helm-map keybindings inside use-package helm
This to have helm-map be known/defined.
2023-06-06 10:35:33 +02:00
94d12e2fdc fix: add hydra-zoom in use-package hydra
Otherwise defhydra is not known
2023-06-06 10:33:42 +02:00
a41c688aea feat: Add elpaca 2023-06-06 10:33:30 +02:00
012444d41b feat: Add early-init.el
Disable package.el at startup
2023-06-06 10:33:11 +02:00
f90a75154e refactor: clean up init.el to only contain bare-minimum 2023-06-06 10:32:53 +02:00
342307ce23 feat: add kill-other-buffers function
Convenience function to prune buffers.
This will kill all buffers except for scratch and Messages
2023-06-06 09:56:18 +02:00
8014257b46 feat: add table-of-contents for org-mode 2023-06-06 09:55:38 +02:00
3c94dc873e PROJECTILE: Use alien method for indexing
Also speeds up find-file
2023-05-05 10:36:19 +02:00
c5d49f0e07 PROJECTILE: Enable caching
Speeds up find-file
2023-05-05 10:36:19 +02:00
3867667e69 UNDO-TREE: move undo files to separate folder
Also include some code for tramp and non-undo-tree backup files for future reference.
2023-05-05 10:36:19 +02:00
381db3c3bd RIPGREP: Add helm-rg/ripgrep 2023-05-05 10:36:19 +02:00
a9cae79276 RIPGREP: Add ripgrep 2023-05-05 10:36:12 +02:00
e17468eece fix: test if server is already running
If server is already running, we get a warning/error when starting.
Test if it is running before we actually start it.

It's not really 100% proof:
https://lists.gnu.org/archive/html/bug-gnu-emacs/2018-06/msg00720.html

But it works for me, so don't ask questions.
2023-04-18 22:35:18 +02:00
65a0a832b4 Fix typo 2022-11-20 15:46:34 +01:00
9d72964ffa RTAGS: Add hook to c-mode-common 2022-09-01 16:22:00 +02:00
8e6aaadd92 RTAGS: Refactor + enable flycheck according to github wiki 2022-02-17 14:42:55 +01:00
bc3bddf4a8 XREF: Add helm-xref 2022-02-17 14:42:26 +01:00
f0bd80917c COMPANY: Move section down after configuration by rtags
company-backends variable has to be set BEFORE calling global-company-mode
2022-02-17 14:29:05 +01:00
b0b2702b38 COMPANY: Bind c-tab to complete 2022-02-17 14:27:10 +01:00
f44990e0b0 RTAGS: split up in separate packages + refactor 2022-02-17 14:22:54 +01:00
deb2961644 Move company to separate section + always enable 2022-02-17 14:15:43 +01:00
6efd6536e9 Remove gtags and lsp-mode, replace with rtags
Faster than lsp and uses compilation database as well
2022-02-17 11:26:56 +01:00
laurensmiers
673996444f UNDO: Fix lag when doing C-/ (undo/undo-tree-undo)
undo-tree-undo calls undo-list-transfer-to-tree internally which does
a lot of garbage-collect calls to make sure the GC won't run (to counter race
conditions or something)

So, define a hook that sets the GC threshold to maximum, does the
undo (which should go fast now since the GC won't run), then restore
the old GC threshold
2020-05-20 17:49:18 +02:00
laurensmiers
4724e18f76 DEBUG: Add some info on how to debug 2020-04-20 14:41:41 +02:00
laurensmiers
15dca42666 LSP: Add LSP-UI keybindings by remapping xref functions 2020-04-20 14:41:41 +02:00
laurensmiers
91ab7f3e31 XREF: Add xref key bindings 2020-04-20 14:41:41 +02:00
laurensmiers
ea7d82619c Change GTAGS key bindings
We use LSP for references etc so 'hide' gtags a bit more
2020-04-20 14:41:38 +02:00
laurensmiers
f8e9110126 Remove flycheck-clang-analyzer, caused issues with LSP 2020-04-20 14:10:08 +02:00
laurensmiers
586aa741df Fix lag in LSP mode due to garbage collection
Used profiler to determine more than 80% of time was spent in garbage
collection...
Lowering the value back to the default fixes the lag.
2020-04-20 14:07:56 +02:00
laurensmiers
e9b132d7e8 TODO: Doxymacs 2020-02-04 10:52:59 +01:00
laurensmiers
5b39426ab9 INIT: Remove custom-set-variables 2020-02-04 10:50:33 +01:00
laurensmiers
6b6601b361 LSP-UI: set doc position to top
Doc position at point is annoying
2020-02-04 10:50:33 +01:00
laurensmiers
21ac5f6b78 HELM-GTAGS: set auto update to true 2020-02-04 10:50:33 +01:00
laurensmiers
10d45c2d8c Projectile: set indexing method to hybrid + ignore LSP server cache 2020-02-04 10:50:33 +01:00
laurensmiers
6ecbdb89dc Add transparency 2019-10-08 20:28:04 +02:00
laurensmiers
c22f29ee02 Remember password in eshell 2019-09-09 14:24:45 +02:00
laurensmiers
ae71fc459c Add smart-eshell mode 2019-09-09 13:11:40 +02:00
laurensmiers
3ceea10587 Add with-editor to use current emacs when $EDITOR is used 2019-09-09 13:11:25 +02:00
laurensmiers
597e00a584 smartparens: Add copy/kill of expression keybindings 2019-09-09 09:29:51 +02:00
laurensmiers
831031aa3a Add project-specific config file option 2019-09-09 09:29:51 +02:00
laurensmiers
dc0284d45f Remove hardcoded setting of tab width 2019-09-09 09:29:51 +02:00
laurens
ec26fd8237 Add 'adaptive cursor width' 2019-09-04 19:05:41 +02:00
laurensmiers
fad0df1881 Add Language Server
- Use ccls as language server for C/C++
2019-08-26 22:11:12 +02:00
laurensmiers
e1abda326f Diminish which-key and magit from ode line 2019-08-26 22:10:43 +02:00
laurensmiers
5d8c9ad8e5 Only check melpa(https) for archives
- Due to a bug in Emacs 26.2, we have to do a small workaround
2019-08-26 22:02:22 +02:00
laurensmiers
a79e204d37 Remove old config files 2019-08-26 21:57:27 +02:00
laurensmiers
2cf00a921b Remove project specific settings from general config 2019-08-26 19:03:21 +02:00
laurens
0f6f65b198 Add org package archives 2019-07-14 13:18:56 +02:00
Laurens Miers
5f067d2b68 Hydra: add hydra + hydra-zoom 2019-04-19 16:53:02 +02:00
Laurens Miers
62c9f46308
Merge pull request #6 from laurensmiers/exwm
Exwm
2019-04-19 16:39:05 +02:00
Laurens Miers
3a034f94cf EXWM: Set workspace number to 1 and comment xrandr stuff 2019-04-19 16:36:01 +02:00
Laurens Miers
17bec5fe79 EXWM: cleanup switch window 2019-04-19 16:35:20 +02:00
Laurens Miers
887886bb7d EXWM: Use global flags to signal command-line-args 2019-04-19 16:09:20 +02:00
Laurens Miers
16979c58e3 EXWM: Move EXWM section to bottom to avoid overwriting EXWM keymaps
- F.e. C-x C-b should still work in non-EXWM environments
2019-04-19 15:49:13 +02:00
Laurens Miers
4906b9da53 EXWM: Move config of exwm to use-package config section
- + move found-custom-arg to 'Utils' section.
2019-04-19 15:46:34 +02:00
Laurens Miers
794973b051 Term-mode: Add hook to toggle between char/line mode 2019-04-19 15:36:08 +02:00
laurensmiers
fed3fe0204 Customize EXWM config 2019-04-12 15:32:08 +02:00
laurensmiers
4b57824e98 EXWM: Initial experiment
- Can be loaded in with command line flag '-start_wm'
2019-03-20 08:19:02 +01:00
laurensmiers
c65df83a20 Add paradox package menu 2018-11-12 15:57:30 +01:00
laurensmiers
717ec9d388 Add (helm-)projectile
- Remove clashing keymaps with helm-gtags
2018-11-11 21:27:30 +01:00
laurensmiers
951ab95eec Switch automatically to *Help* window with describe-key 2018-11-11 16:11:20 +01:00
laurensmiers
af3c038501 Switch automatically to *Help* window with describe-key 2018-11-11 16:11:20 +01:00
laurensmiers
44b23b046a Add which-key 2018-11-11 16:11:14 +01:00
laurensmiers
b9d9f3d789 Add resize-frame minor-mod 2018-11-11 15:10:25 +01:00
laurensmiers
a5061a5904 SUNRISE: add keybindings 2018-10-25 16:16:26 +02:00
laurensmiers
7561b63cca Add shell-pop 2018-09-04 15:29:40 +02:00
laurensmiers
7bd7a3db9b Move diminish to end of config
- otherwise mode's not known
2018-07-03 23:23:09 +02:00
laurensmiers
c2cf0f2cba Add clock to mode-line 2018-07-03 22:51:30 +02:00
laurensmiers
790399e4b9 Add diminish section 2018-07-03 22:22:38 +02:00
laurensmiers
3384086235 Add Org-mode section 2018-07-03 22:13:52 +02:00
laurensmiers
3122905578 Merge remote-tracking branch 'origin/config_as_org' 2018-07-01 16:34:07 +02:00
laurensmiers
368de14587 Add basic sunrise commander config 2018-07-01 16:23:12 +02:00
laurensmiers
850711cfdd Add sunrise commander as submodule 2018-07-01 16:23:12 +02:00
laurensmiers
0079871682 Disable audible bell 2018-07-01 16:23:12 +02:00
laurensmiers
878e292440 Add elpy 2018-07-01 16:23:12 +02:00
laurensmiers
f4b6e23942 Set GC threshold 2018-06-26 12:51:40 +02:00
laurensmiers
b621088849 Make TAB work in minibuffer 2018-06-26 12:51:40 +02:00
laurensmiers
f2b345306f Add beacon section 2018-06-15 00:18:28 +02:00
laurensmiers
5e37f3e653 Start emacs server 2018-06-14 23:39:23 +02:00
laurensmiers
9608eb5ac9 Avy: Set 'M-s' to avy-goto-char 2018-06-14 23:30:27 +02:00
laurensmiers
a18574f65e Enable subword mode (globally) 2018-06-13 10:49:29 +02:00
laurensmiers
39d0fdd7aa Add configuration-convenience functions 2018-06-13 10:48:59 +02:00
laurensmiers
9d650ebbd5 Add link to switch-window + tryout for multiple frames
- Move window-switching specific stuff section from the past to here as well
2018-06-13 10:31:21 +02:00
laurensmiers
9db1ce210e Set company-minimum-prefix to 2 2018-06-13 09:25:59 +02:00
laurensmiers
c8573cde04 Add switch-window 2018-06-13 00:58:51 +02:00
laurensmiers
51f232a9dd Window splitting convenience functions 2018-06-13 00:54:24 +02:00
laurensmiers
ad28328123 Enable relative line numbers in program-mode 2018-06-13 00:53:53 +02:00
laurensmiers
68afa8fc08 Add avy 2018-06-13 00:42:41 +02:00
laurensmiers
70662a4f65 Add programming section
- Setup company/ivory/flycheck
  - basic setup
2018-06-13 00:38:20 +02:00
laurensmiers
ef4b87f560 Add melpa to package-archives (needed for flycheck-clang-*) 2018-06-13 00:07:20 +02:00
laurensmiers
623759dd64 Add magit section 2018-06-12 22:39:05 +02:00
laurensmiers
96ab07c638 Add C coding setting + angry faces 2018-06-12 22:28:21 +02:00
laurensmiers
847f0d43eb Add GDB section 2018-06-12 22:21:54 +02:00
laurensmiers
98b1dfc7ca Add multiple cursors section 2018-06-12 22:15:57 +02:00
laurensmiers
6325892938 Helm-swoop: split window in current window 2018-06-12 22:11:21 +02:00
laurensmiers
3fcf20b863 Remove old dashboard file 2018-06-12 22:03:16 +02:00
laurensmiers
bc4ec44cea Helm: split in current window + rebind <tab> for helm + enable autoresize 2018-06-12 21:59:44 +02:00
laurensmiers
16a0b0bef6 Fix helm section 2018-06-12 21:45:59 +02:00
laurensmiers
945a55a2c0 Set modeline theme to respectful 2018-06-12 21:32:58 +02:00
laurensmiers
dc8880dfc1 Add helm-gtags section 2018-06-12 21:19:17 +02:00
laurensmiers
27b84978a7 Add readme 2018-06-12 21:13:07 +02:00
laurensmiers
0791b21aaf Add helm section 2018-06-12 21:12:56 +02:00
laurensmiers
436106e94d Add speedbar section 2018-06-12 17:35:15 +02:00
laurensmiers
ce7bb16836 Add Windooze section 2018-06-12 17:33:31 +02:00
laurensmiers
a2e0594ef1 Remove custom-set-variables 2018-06-12 17:30:34 +02:00
laurensmiers
150de7bd0a Remove README.md 2018-06-11 23:40:15 +02:00
laurensmiers
8eec08cfd8 Add expand region to config.org + remove old file 2018-06-11 23:40:01 +02:00
laurensmiers
6e1fb2c769 Add backup-files config 2018-06-11 23:13:16 +02:00
laurensmiers
2ce4a6d6a9 Enable smartparens + some extra smartparens config 2018-06-11 23:10:24 +02:00
laurensmiers
3abf958cc8 Add config.org + replace setup-editing/general.el 2018-06-11 22:57:27 +02:00
30 changed files with 2978 additions and 644 deletions

26
.gitignore vendored Normal file
View file

@ -0,0 +1,26 @@
custom.el
backups
eshell
elpaca
eln-cache
elpa
org-roam.db
transient
# projectile
projectile*
# savehist file
history
# recentf file
recentf
session*
# .org converted files
config*.el
# Tramp connection file
tramp

View file

@ -1,14 +0,0 @@
# emacs
My personal emacs configuration
It is mostly based on tuhdo's emacs ide demo: https://github.com/tuhdo/emacs-c-ide-demo
This configuration requires the installation of :
- the GNU global package (for gtags)
- clang (for ivory)
- cmake (for ivory)
- llvm-libs (for cmake, somehow not a dependency on Manjaro when installing cmake)
- Use python-pip to install jedi, flake8, importmagic and autopep8 (for elpy)
- ditaa (for ascii to image generation in org-mode)
When first checking out this config, run irony-install-server to make and install the irony-server.

1
README.org Symbolic link
View file

@ -0,0 +1 @@
config.org

View file

@ -1,8 +0,0 @@
C-M-Space : smartparens wrapping
C-c C-c : calculator (see init.el)
C-h k <key-sequence>: lookup key sequence
C-x 0 : close current window
C-q <tab> : insert a <tab>
M-x (un)tabify : (replace) tabs
M-x describe-bindings : list of all mapped keys/commands
M-p : fill-paragraph, works for doxygen as well

1252
config.org Normal file

File diff suppressed because it is too large Load diff

1608
config_old.org Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,22 +0,0 @@
(add-hook 'after-init-hook 'global-company-mode)
;; Add irony as company-backend
(eval-after-load 'company
'(add-to-list 'company-backends 'company-irony))
;; Add irony as flycheck hook
(eval-after-load 'flycheck
'(add-hook 'flycheck-mode-hook 'flycheck-irony-setup))
(add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options)
(add-hook 'irony-mode-hook 'irony-eldoc)
;; Add irony-, flycheck-, company-mode to c-mode
(add-hook 'c-mode-hook 'irony-mode)
(add-hook 'c-mode-hook 'flycheck-mode)
(add-hook 'c-mode-hook 'company-mode)
;; Set tab to autocomplete or indent depending on context
(global-set-key (kbd "<tab>") 'company-indent-or-complete-common)
(provide 'setup-autocompletion)

View file

@ -1,48 +0,0 @@
;; make angry face to get my attention
(setq prog-modes '(c++-mode python-mode erlang-mode java-mode c-mode emacs-lisp-mode scheme-mode prog-mode))
(make-face 'font-lock-angry-face)
(modify-face 'font-lock-angry-face "Red" "Yellow" nil t nil t nil nil)
;; Add keywords to recognize to angry face
(mapc (lambda (mode)
(font-lock-add-keywords
mode
'(("\\<\\(FIXME\\)" 1 'font-lock-angry-face t)))
)
prog-modes)
(mapc (lambda (mode)
(font-lock-add-keywords
mode
'(("\\<\\(TODO\\)" 1 'font-lock-angry-face t)))
)
prog-modes)
;; default coding style
(setq c-default-style "linux")
;; sane indentation offset
(setq c-basic-offset 4)
;; Tab-space strategy
;; we use spaces, deal with it
(setq-default indent-tabs-mode nil)
;; Enable subword mode for handling CamelCase format
(global-subword-mode t)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Python ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(require 'py-autopep8)
(elpy-enable)
(setq elpy-modules (delq 'elpy-module-flycheck elpy-modules))
(add-hook 'elpy-mode-hook 'flycheck-mode)
(add-hook 'elpy-mode-hook 'py-autopep8-enable-on-save)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Magit (git) ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(global-set-key (kbd "C-c m") 'magit-status)
(provide 'setup-coding)

View file

@ -1,10 +0,0 @@
(require 'multiple-cursors)
(global-set-key (kbd "C-x r a") 'mc/edit-lines)
(global-set-key (kbd "C-x r e") 'mc/edit-ends-of-lines)
(global-set-key (kbd "C->") 'mc/mark-next-like-this)
(global-set-key (kbd "C-<") 'mc/mark-previous-like-this)
(global-set-key (kbd "C-c C->") 'mc/mark-all-like-this)
(provide 'setup-cursors)

View file

@ -1,17 +0,0 @@
(require 'dashboard)
(dashboard-setup-startup-hook)
;; Set the startup message
(setq dashboard-banner-logo-title "")
;; Set the banner
(setq dashboard-startup-banner 'logo)
(setq dashboard-items '((recents . 10)
(bookmarks . 5)
))
;; Enable recent files
(recentf-mode 1)
(provide 'setup-dashboard)

View file

@ -1,134 +0,0 @@
(setq global-mark-ring-max 5000 ; increase mark ring to contains 5000 entries
mark-ring-max 5000 ; increase kill ring to contains 5000 entries
mode-require-final-newline t ; add a newline to end of file
)
(setq kill-ring-max 5000 ; increase kill-ring capacity
kill-whole-line t ; if NIL, kill whole line and move the next line up
)
;; show column numbers
(setq column-number-mode 1)
;; Remove scroll-bar, tool-bar and menu-bar
(scroll-bar-mode -1)
(tool-bar-mode -1)
(menu-bar-mode -1)
;; set appearance of a tab that is represented by 4 spaces
(setq-default tab-width 4)
;; automatically indent when press RET
(global-set-key (kbd "RET") 'newline-and-indent)
;; Map query-replace-regexp to an easier key
(global-set-key (kbd "C-x r r") 'query-replace-regexp)
;; Map query-replace-regexp to an easier key
(global-set-key (kbd "M-p") 'fill-paragraph)
;; Delete trailing whitespace when saving file
(add-hook 'before-save-hook 'delete-trailing-whitespace)
;; show whitespace in diff-mode
(add-hook 'diff-mode-hook (lambda ()
(setq-local whitespace-style
'(face
tabs
tab-mark
spaces
space-mark
trailing
indentation::space
indentation::tab
newline
newline-mark))
(whitespace-mode 1)))
;; Package: undo-tree -- saner, imo, undo with C-/
(require 'undo-tree)
(global-undo-tree-mode)
;; Package: volatile-highlights --- show changes by "undo/yanks/..."
(require 'volatile-highlights)
(volatile-highlights-mode t)
;;; Package: iedit --- Replace occurences of symbol and highlight them
(require 'iedit)
;; Package: smartparens --- smart way to handle (), {}, ...
(require 'smartparens-config)
(setq sp-base-key-bindings 'paredit)
(setq sp-autoskip-closing-pair 'always)
(setq sp-hybrid-kill-entire-symbol nil)
(sp-use-paredit-bindings)
(show-smartparens-global-mode +1)
(smartparens-global-mode 1)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; keybinding management smartparens ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; cl-package contains the loop macro
(require 'cl)
(defmacro def-pairs (pairs)
`(progn
,@(loop for (key . val) in pairs
collect
`(defun ,(read (concat
"wrap-with-"
(prin1-to-string key)
"s"))
(&optional arg)
(interactive "p")
(sp-wrap-with-pair ,val)))))
(def-pairs ((paren . "(")
(bracket . "[")
(brace . "{")
(single-quote . "'")
(double-quote . "\"")
(underscore . "_")
(back-quote . "`")))
(define-key smartparens-mode-map (kbd "C-c (") 'wrap-with-parens)
(define-key smartparens-mode-map (kbd "C-c [") 'wrap-with-brackets)
(define-key smartparens-mode-map (kbd "C-c {") 'wrap-with-braces)
(define-key smartparens-mode-map (kbd "C-c '") 'wrap-with-single-quotes)
(define-key smartparens-mode-map (kbd "C-c \"") 'wrap-with-double-quotes)
(define-key smartparens-mode-map (kbd "C-c _") 'wrap-with-underscores)
(define-key smartparens-mode-map (kbd "C-c `") 'wrap-with-back-quotes)
(define-key smartparens-mode-map (kbd "C-c s r") 'sp-rewrap-sexp)
(define-key smartparens-mode-map (kbd "C-c s u") 'sp-unwrap-sexp)
(define-key smartparens-mode-map (kbd "C-M-f") 'sp-forward-sexp)
(define-key smartparens-mode-map (kbd "C-M-b") 'sp-backward-sexp)
;; TODO: in manjaro this selects keyboard-layout or something
;;(define-key smartparens-mode-map (kbd "C-M-k") 'sp-kill-sexp)
(define-key smartparens-mode-map (kbd "C-M-w") 'sp-copy-sexp)
(define-key smartparens-mode-map (kbd "C-M-n") 'sp-next-sexp)
(define-key smartparens-mode-map (kbd "C-M-p") 'sp-previous-sexp)
;; TODO: for some reason this does not work
(define-key smartparens-mode-map (kbd "C-M-a") 'sp-beginning-of-sexp)
(define-key smartparens-mode-map (kbd "C-M-e") 'sp-end-of-sexp)
(define-key smartparens-mode-map (kbd "C-M-h") 'mark-defun)
(smartparens-global-mode t)
;; Package: comment-dwim-2 --- replacement for built-in comment-dwim, more comment features
(require 'comment-dwim-2)
(global-set-key (kbd "M-;") 'comment-dwim-2)
;; Package: yasnippet --- code template system
(require 'yasnippet)
(yas-global-mode 1)
(provide 'setup-editing)

View file

@ -1,7 +0,0 @@
(require 'expand-region)
(pending-delete-mode t)
(global-set-key (kbd "C-=") 'er/expand-region)
(provide 'setup-expand-region)

View file

@ -1,36 +0,0 @@
(setq gdb-many-windows 1)
;; Select a register number which is unlikely to get used elsewere
(defconst egdbe-windows-config-register 313465989
"Internal used")
(defvar egdbe-windows-config nil)
(defun set-egdbe-windows-config ()
(interactive)
(setq egdbe-windows-config (window-configuration-to-register egdbe-windows-config-register)))
(defun egdbe-restore-windows-config ()
(interactive)
(jump-to-register egdbe-windows-config-register))
(defun egdbe-start-gdb (&optional gdb-args)
""
(interactive)
(set-egdbe-windows-config)
(call-interactively 'gdb))
(defun egdbe-quit ()
"finish."
(interactive)
(gud-basic-call "quit")
(egdbe-restore-windows-config))
(defun egdbe-gud-mode-hook ()
""
(local-unset-key (kbd "q"))
(local-set-key (kbd "q") 'egdbe-quit))
(add-hook 'gud-mode-hook 'egdbe-gud-mode-hook)
(provide 'setup-gdb)

View file

@ -1,62 +0,0 @@
(global-set-key [f9] 'start-kbd-macro)
(global-set-key [f10] 'end-kbd-macro)
(global-set-key [f11] 'call-last-kbd-macro)
;; Package zygospore --- revert C-x 1 by pressing C-x 1 again
;; TODO: Doesn't work with sr-speedbar
(global-set-key (kbd "C-x 1") 'zygospore-toggle-delete-other-windows)
;; Set 'M-g' to 'goto-line', it's faster and what we usually want
(global-set-key (kbd "M-g") 'goto-line)
;; Set 'C-x r i' to 'string-insert-rectangle'
;; Easier than using 'M-x' and searching for it.
(global-set-key (kbd "C-x r i") 'string-insert-rectangle)
;; set garbage collection to higher value
;; see http://bling.github.io/blog/2016/01/18/why-are-you-changing-gc-cons-threshold/
(setq gc-cons-threshold 100000000)
;; important yes-or-no questions can be answered with y-or-n
(defalias 'yes-or-no-p 'y-or-n-p)
;; maximize Emacs at startup
(add-to-list 'default-frame-alist '(fullscreen . maximized))
;; Move one window back command
(global-set-key (kbd "\C-x p") 'previous-multiframe-window)
;; Use C-x o to switch to other frame when using multi-monitor
(global-set-key (kbd "C-x o") 'next-multiframe-window)
;; set my theme
(load-theme 'wombat)
;; highlight line (hl-line)
(global-hl-line-mode 1)
(set-face-background hl-line-face "dark slate grey")
;; smart mode line
(setq sml/no-confirm-load-theme t)
(setq sml/theme 'powerline)
(sml/setup)
;; enable disabled commands
(put 'narrow-to-page 'disabled nil)
(put 'narrow-to-region 'disabled nil)
;; quick function to kill all other buffers
(defun kill-other-buffers ()
"Kill all other buffers."
(interactive)
(mapc 'kill-buffer
(delq (current-buffer)
(remove-if-not 'buffer-file-name (buffer-list)))))
;; screw with vi(m)-users
(defconst wq "This is not vi! Use C-x C-c instead.")
(defconst w "This is not vi! Use C-x C-s instead.")
(defconst q! "This is EMACS not vi! Use C-x C-c instead.")
(defconst wq! "This is EMACS not vi! Use C-x C-c instead.")
(provide 'setup-general)

View file

@ -1,19 +0,0 @@
(require 'helm-gtags)
;; Enable helm-gtags-mode in languages that GNU Global supports
(add-hook 'c-mode-hook 'helm-gtags-mode)
(add-hook 'c++-mode-hook 'helm-gtags-mode)
(add-hook 'python-mode-hook 'helm-gtags-mode)
(add-hook 'java-mode-hook 'helm-gtags-mode)
(add-hook 'asm-mode-hook 'helm-gtags-mode)
;; customize behaviour
(custom-set-variables
'(helm-gtags-auto-update t))
(global-set-key (kbd "M-.") 'helm-gtags-find-tag-from-here)
(global-set-key (kbd "M-,") 'helm-gtags-pop-stack)
(global-set-key (kbd "C-c C-f") 'helm-gtags-find-files)
(global-set-key (kbd "C-c g f") 'helm-gtags-parse-file)
(provide 'setup-helm-gtags)

View file

@ -1,50 +0,0 @@
(require 'helm)
(require 'helm-config)
;; replace vanilla commands with helm commands
(global-set-key (kbd "M-x") 'helm-M-x)
(global-set-key (kbd "M-y") 'helm-show-kill-ring)
(global-set-key (kbd "C-x b") 'helm-mini)
;; In vanilla, this is mapped to show-buffers, but I don't use that so map it to helm-mini as well
(global-set-key (kbd "C-x C-b") 'helm-mini)
(global-set-key (kbd "C-x C-f") 'helm-find-files)
;; rebind tab to do persistent action
;; we use helm-execute-persistent-action more than helm-select-action (default for <tab>)
(define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action)
;; make TAB work in terminal
(define-key helm-map (kbd "C-i") 'helm-execute-persistent-action)
;; remap helm-select-action: lists actions
(define-key helm-map (kbd "C-z") 'helm-select-action)
;; remap calculator
(global-set-key (kbd "C-c C-c") 'helm-calcul-expression)
;; TODO: experiment with mark ring (breadcrumbs something?)
;; TODO: experiment with helm-regexp (build and test regexes)
;; TODO: remember helm-top (helm interface for top program)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; PACKAGE: helm-swoop ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Locate the helm-swoop folder to your path
(require 'helm-swoop)
;; replace vanilla I-search with helm-swoop
(global-set-key (kbd "C-s") 'helm-swoop)
;; From helm-swoop to helm-multi-swoop-all
;;(define-key helm-swoop-map (kbd "M-s") 'helm-multi-swoop-all-from-helm-swoop)
(define-key helm-swoop-map (kbd "C-s") 'helm-multi-swoop-all-from-helm-swoop)
;; TODO: find out how to switch from multi-swoop to swoop back again
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Next 2 lines make sure when using helm-swoop only the current window/buffer is affected ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; If this value is t, split window inside the current window
(setq helm-swoop-split-with-multiple-windows t)
;; Split direcion. 'split-window-vertically or 'split-window-horizontally
(setq helm-swoop-split-direction 'split-window-vertically)
(provide 'setup-helm)

View file

@ -1,28 +0,0 @@
(require 'org)
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
;; when ending TODO (C-C C-t) end with a note + timestamp
(setq org-log-done 'note)
;; Specify root dir to search for agenda files, TODOs, ...
(setq org-agenda-files '("~/org"))
;; Add extra states for keywords
(setq org-todo-keywords
'((sequence "TODO" "IN-PROGRESS" "WAITING" "DONE")))
(setq org-export-with-sub-superscripts nil)
;; Preserve indentation in SRC blocks
(setq org-src-preserve-indentation t)
;; Specify which languages are allowed to run inside org-mode
(org-babel-do-load-languages
'org-babel-load-languages '(
(ditaa . t))
)
;; Tell org where to look for ditaa
(setq org-ditaa-jar-path "/usr/share/java/ditaa/ditaa-0_10.jar")
(provide 'setup-org)

View file

@ -1,11 +0,0 @@
;; Package: sr-speedbar
(require 'sr-speedbar)
;; (add-hook 'emacs-startup-hook (lambda () ; Open sr speedbar on startup
;; (sr-speedbar-open)
;; ))
(setq speedbar-show-unknown-files t) ; Enable speedbar to show all files
(setq speedbar-use-images nil) ; use text for buttons
(setq sr-speedbar-right-side nil) ; put on left side
(setq sr-speedbar-width 40)
(provide 'setup-speedbar)

View file

@ -1,25 +0,0 @@
;; Windows performance tweaks
;;
(when (boundp 'w32-pipe-read-delay)
(setq w32-pipe-read-delay 0))
;; Set the buffer size to 64K on Windows (from the original 4K)
(when (boundp 'w32-pipe-buffer-size)
(setq irony-server-w32-pipe-buffer-size (* 64 1024)))
;; Set pipe delay to 0 to reduce latency of irony
(setq w32-pipe-read-delay 0)
;; From "setting up irony mode on Windows" :
;; Make sure the path to clang.dll is in emacs' exec_path and shell PATH.
(setenv "PATH"
(concat
"C:\\msys64\\usr\\bin" ";"
"C:\\msys64\\mingw64\\bin" ";"
(getenv "PATH")
)
)
(setq exec-path (append '("c:/msys64/usr/bin" "c:/alt/msys64/mingw64/bin")
exec-path))
(provide 'setup-windows)

18
early-init.el Normal file
View file

@ -0,0 +1,18 @@
;;; early-init.el --- Early Init -*- lexical-binding: t; -*-
;;; Commentary:
;; Early init configuration for Emacs Solo
;;
;;; Code:
;; Only care about errors in *Messages* buffer
(setq warning-minimum-level :error)
;; We control when packages are enabled
(setq package-enable-at-startup nil)
(provide 'early-init)
;;; early-init.el ends here

158
init.el
View file

@ -1,152 +1,28 @@
;;; init.el --- Init -*- lexical-binding: t; -*-
;; add the custom dir to our load path
(add-to-list 'load-path "~/.emacs.d/custom")
;; add melpa-stable to package-archives ;;; Commentary:
;; IMPORTANT: add (require 'package), else package-archives is not declared (void-variable) ;;; Load init files
(require 'package)
(add-to-list 'package-archives
'("melpa-stable" . "https://stable.melpa.org/packages/") t)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
;; MUST be called after package-archives is updated ;;; Code:
;; Else the automated installation logic is not able to install missing packages
(package-initialize)
;; my required packages ;;; Increase garbage collection threshold during init but leave it to the default value after
(defconst my-packages ;;; There are a LOT of articles/sites/... discussing this:
'( ;;; https://bling.github.io/blog/2016/01/18/why-are-you-changing-gc-cons-threshold/
undo-tree ;;; https://jonnay.github.io/emagicians-starter-kit/Emagician-Base.html
volatile-highlights ;;; ...
smartparens (let ((gc-cons-threshold most-positive-fixnum))
iedit (setq custom-file (expand-file-name "custom.el" user-emacs-directory))
zygospore ;; This is the actual config file. It is omitted if it doesn't exist so emacs won't refuse to launch.
comment-dwim-2 (defvar my-config-file (expand-file-name "config.org" user-emacs-directory))
yasnippet
yasnippet-snippets
sr-speedbar
company
irony
irony-eldoc
company-irony
flycheck-irony
elpy
py-autopep8
magit
org
smart-mode-line
smart-mode-line-powerline-theme
helm
helm-gtags
helm-swoop
helm-company
dashboard
multiple-cursors
expand-region
))
;; function to install new packages (when (file-readable-p my-config-file)
(defun install-packages () (org-babel-load-file (expand-file-name my-config-file)))
"Install all required packages."
(interactive)
(unless package-archive-contents
(package-refresh-contents))
(dolist (package my-packages)
(unless (package-installed-p package)
(package-install package))))
;; install packages if not yet installed (load custom-file :no-error-if-file-is-missing)
(install-packages)
;; setup general
(require 'setup-general)
;; setup general editing settings
(require 'setup-editing)
;; setup org
(require 'setup-org)
;; setup coding
(require 'setup-coding)
;; setup helm
(require 'setup-helm)
(require 'setup-helm-gtags)
;; setup speedbar
(require 'setup-speedbar)
;; setup autocompletion
(require 'setup-autocompletion)
;; setup Windows if our bootloader is Windows
(if (eq system-type 'windows-nt)
(require 'setup-windows)
) )
;; setup dashboard
(require 'setup-dashboard)
;; setup gdb
(require 'setup-gdb)
;; setup multiple cursors
(require 'setup-cursors)
;; setup expand-region
(require 'setup-expand-region)
;; start emacs server
(server-start)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(ansi-color-faces-vector
[default default default italic underline success warning error])
'(ansi-color-names-vector
["#757575" "#CD5542" "#4A8F30" "#7D7C21" "#4170B3" "#9B55C3" "#68A5E9" "gray43"])
'(custom-safe-themes
(quote
("84d2f9eeb3f82d619ca4bfffe5f157282f4779732f48a5ac1484d94d5ff5b279" "c74e83f8aa4c78a121b52146eadb792c9facc5b1f02c917e3dbb454fca931223" "3c83b3676d796422704082049fc38b6966bcad960f896669dfc21a7a37a748fa" "938d8c186c4cb9ec4a8d8bc159285e0d0f07bad46edf20aa469a89d0d2a586ea" "6de7c03d614033c0403657409313d5f01202361e35490a3404e33e46663c2596" "ed317c0a3387be628a48c4bbdb316b4fa645a414838149069210b66dd521733f" "1db337246ebc9c083be0d728f8d20913a0f46edc0a00277746ba411c149d7fe5" default)))
'(fci-rule-color "#2e2e2e")
'(global-company-mode t)
'(package-selected-packages
(quote
(ample-zen-theme ample-theme magit irony-eldoc elpy irony helm-swoop helm)))
'(vc-annotate-background "#3b3b3b")
'(vc-annotate-color-map
(quote
((20 . "#dd5542")
(40 . "#CC5542")
(60 . "#fb8512")
(80 . "#baba36")
(100 . "#bdbc61")
(120 . "#7d7c61")
(140 . "#6abd50")
(160 . "#6aaf50")
(180 . "#6aa350")
(200 . "#6a9550")
(220 . "#6a8550")
(240 . "#6a7550")
(260 . "#9b55c3")
(280 . "#6CA0A3")
(300 . "#528fd1")
(320 . "#5180b3")
(340 . "#6380b3")
(360 . "#DC8CC3"))))
'(vc-annotate-very-old-color "#DC8CC3"))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(provide 'init) (provide 'init)
;;; init.el ends here ;;; init.el ends here

6
snippets/c-mode/define Normal file
View file

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: Make a define
# key: def
# --
#define ${1:mydefine$(upcase yas-text)} $2

View file

@ -2,8 +2,7 @@
# name: for with loop variable # name: for with loop variable
# key: fori # key: fori
# -- # --
int i = 0;
for (${1:i = 0}; ${2:i < N}; ${3:++i}) { for (${1:size_t i = 0}; ${2:i < N}; ${3:++i}) {
$0 $0
} }

10
snippets/c-mode/header Normal file
View file

@ -0,0 +1,10 @@
#name : #ifndef XXX; #define XXX; #endif
# key: header
# --
#ifndef ${1:_`(upcase (file-name-nondirectory (file-name-sans-extension (or (buffer-file-name) ""))))`_H_}
#define $1
$0
#endif /* $1 */

6
snippets/c-mode/kaboom Normal file
View file

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: kaboom
# key: kb
# --
char (*__kaboom)[sizeof($1)] = 1;

View file

@ -1,9 +0,0 @@
#name : #ifndef XXX; #define XXX; #endif
# key: oncekl
# --
#ifndef ${1:`(upcase (file-name-nondirectory (file-name-sans-extension (or (buffer-file-name) ""))))`_H_}
#define $1
$0
#endif /* $1 */

View file

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: Start emacs source block
# key: se
# --
#+BEGIN_SRC emacs-lisp
${1}
#+END_SRC

View file

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: Filetags
# key: ft
# --
#+FILETAGS: :$1:

View file

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: Org source code block
# key: s
# --
#+BEGIN_SRC
${1}
#+END_SRC

View file

@ -0,0 +1,10 @@
# -*- mode: snippet -*-
# name: Git commit message template
# key: bac
# --
Before this commit,
${1}
After this commit,
${2}