Skip to content

Instantly share code, notes, and snippets.

@pesterhazy
pesterhazy / eglot-monorepos.md
Last active May 13, 2024 12:14
Emacs, Monorepos, Eglot, Clojure-lsp and Project.el

This gist is for anyone who's trying to use emacs + eglot + monorepo (with Clojure or any other language).

When you open a file in a buffer, eglot needs to determine the scope or folder to run the language server in. By default, the folder eglot will pick as the assumed project root is the repo root (the ancestory directory containing .git).

But in a monorepo, that's rarely what you want. In a large repo, analyzing all the *.clj files with clojure-lsp could take a minute or longer. As a limiting case, imagine Google with its gargantuan monorepo. Analyzing all the source files would take an indefinite period of time.

@deathau
deathau / Readme.md
Last active March 9, 2025 01:56
Obsidian scss

Obsidian SASS theme switching tools

I was building up a small library of css snippets, and mixing and matching via copy-paste was getting tiresome.
So, I knocked myself up a little solution using https://sass-lang.com/
To use this solution, you need to follow the instructions on the website to install the SASS command line utility.

Instructions

For my purposes, I created a subfolder in my Obsidian vault called ./.themes where my obsidian.scss file lives. I also created a subfolder for mixins (./.themes/mixins) containing small snippets like "Andy Matuschak" mode and collapsing sidebars (and my preferred custom colours for my Base2Tone theme)

@brenns10
brenns10 / Makefile
Last active August 3, 2023 19:51
Linux Character Device Example
obj-m += chardev.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
@tanyuan
tanyuan / smart-caps-lock.md
Last active May 9, 2025 20:31
Smart Caps Lock: Remap Caps Lock to Control AND Escape

Smart Caps Lock: Remap to Control AND Escape (Linux, Mac, Windows)

Caps Lock 變成智慧的 Control 以及 Escape

  • 單獨輕按一下就是 Escape
  • 若按下時同時按著其他鍵,就會是 Control

這應該是 Vim 和 Emacs 的最佳解了!(Emacs? Bash 的快捷鍵就是 Emacs 系列的)

  • Send Escape if you tap Caps Lock alone.