diff options
author | Alan Pearce | 2022-04-30 19:00:04 +0200 |
---|---|---|
committer | Alan Pearce | 2022-04-30 19:00:04 +0200 |
commit | a8ad05ee11fd6c6c32dbadad30ed2013b08587ae (patch) | |
tree | 32c7c03f3839cde46bbfcfcda491c0448dd6b6b9 /content/post/opening-projects-with-projectile.md | |
parent | 5deeb3893fead388293e16317b8a3e8f178d9e25 (diff) | |
download | website-a8ad05ee11fd6c6c32dbadad30ed2013b08587ae.tar.lz website-a8ad05ee11fd6c6c32dbadad30ed2013b08587ae.tar.zst website-a8ad05ee11fd6c6c32dbadad30ed2013b08587ae.zip |
Migrate syntax highlighting options to zola syntax
Diffstat (limited to 'content/post/opening-projects-with-projectile.md')
-rw-r--r-- | content/post/opening-projects-with-projectile.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/content/post/opening-projects-with-projectile.md b/content/post/opening-projects-with-projectile.md index 775e2be..b44c5e8 100644 --- a/content/post/opening-projects-with-projectile.md +++ b/content/post/opening-projects-with-projectile.md @@ -12,7 +12,7 @@ With this in mind, I decided to try to add support for opening projects under a I saw that projectile uses [Dash.el][] in some places, and after reading about [anaphoric macros], I decided that I'd try to use them to aid me. -```elisp +```lisp (defun ap/subfolder-projects (dir) (--map (file-relative-name it dir) (-filter (lambda (subdir) @@ -23,14 +23,14 @@ I saw that projectile uses [Dash.el][] in some places, and after reading about [ First, this filters the non-special files under `dir`, filtering non-directories. Then it runs the list of `projectile-project-root-files-functions` on it to determine if it looks like a projectile project. To make the list more readable, it makes the filenames relative to the passed-in directory. It runs like this: -```elisp +```lisp (ap/subfolder-projects "~/projects") => ("dotfiles" "ggtags" …) ``` So, we've got ourselves a list, but now we need to be able to open the project that's there, even though the folders are relative. -```elisp +```lisp (defun ap/open-subfolder-project (from-dir &optional arg) (let ((project-dir (projectile-completing-read "Open project: " (ap/subfolder-projects from-dir)))) @@ -43,7 +43,7 @@ We get support for multiple completion systems for free, since projectile has a Then I defined some helper functions to make it easy to open work and home projects. -```elisp +```lisp (defvar work-project-directory "~/work") (defvar home-project-directory "~/projects") @@ -62,7 +62,7 @@ With this all set up, whenever I want to start working on a project I just type I also considered trying to add all the projects under a directory to the projectile known project list. I didn't find it quite as easy to use, but it's available below if anyone would prefer that style. -```elisp +```lisp (defun ap/-add-known-subfolder-projects (dir) (-map #'projectile-add-known-project (--map (concat (file-name-as-directory dir) it) (ap/subfolder-projects dir)))) |