MooersLab / emacs30venturatreesitterconfig

Configuration file for Emacs 30.0.5 with tree-sitter and combobulate for macOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Emacs Configuration with Support for Structured Editing

Moved to Codeberg

I will try to keep this updated, but go here for the most recent version.

Purpose

This configuration supports structured editing of computer code with concrete syntax trees. The built-in package tree-sitter and the new package combobulate support this kind of editing. Emacs has to be compiled with support for tree-sitter. See this repo for a protocol for compiling Emacs 30 from source code on macOS and this one for doing likewise with Ubuntu. These protocols should work with Emacs 29.0.5.

This configuration file is also a rewrite of my basic configuration file with the packages in use listed at the top to speed up the start-up of Emacs. The package package is used to install the missing packages rather than by using the `:ensure t` option in use-package, but use-package is still used to customize packages and load packages when needed. This massive rearrangement reduced the start-up time by about 30%. Many thanks go to Jeff Bowman for this suggestion.

However, after two weeks of use, I am having trouble with not all the elisp files in the elpa folder compiled after upgrading packages. Fixing this issue can take 30 minutes. I did not have this issue when I used `:ensure t` with use-package. I recommend not updating your packages frequently; once a month may be frequent enough. Likewise, I also recommend using the emacs-server and emacsclient for instant access.

The init.el file was developed on Ventura (macOS 13.2), but it should be transferrable to older Mac operating systems. There are several Mac-specific lines in the basic configuration section that can be quickly switched for Linux or Windows. There are also several file paths that may need customizing. Both kinds of sites are marked with ;; ==> adjust here in the init.el file.

The manual-packages folder contains the packages that were not added via accessing MELPA and company. Their *.elc files will only work on Ventura with Emacs compiled the same way that I compiled mine. You may have to byte-recompile these packages.

Features

The content of the configuration file supports my academic research writing with occasional code writing for research purposes.

  • Configured for structured editing with combobulate and tree-sitter.
  • Uses the Vertico and friends for completion by default. I love the in-line documentation from Marginalia.
  • Fuzzy matching is turned one for use in Ido.
  • Can opt in the use of Helm or Icicles.
  • Helm’s helm-google-suggest command is very cool. Use google-this when helm-mode is toggled off.
  • Configured for org-mode, org-agenda, org-babel, and org-roam to get organized, track notes, and do literate programming.
  • Supports org-pomodoro.
  • Supports pdf-tools.
  • Uses booksmarks+, dired+, and iscicles (the last is off by default–it is a heavy-duty completion engine for the minibuffer). These require custom installation because they are on the Emacs Wiki and not in a repository.
  • Uses evil-nerd-commenter for smart commenting of lines and regions.
  • Configured for Clojure, Python, and R programming.
  • Supports the use of LaTeX via AUCTeX.
  • Supports google-this. Make selection and enter `C-c / g` to submit as selected region as a search term to Google in default browser.
  • Eglot is built into this version of Emacs.

I invoke org-pomodoro with the point on a Project’s headline in a org file to generate the logbook for storing the record of pomodoros. I store my lists of manuscripts, grant applications, service activities, etc in separate org files rather than in a single task.org folder because I have too many projects for a singe org file. I bookmarked the headlines for specific projects to accelerate my access to a project via the Bookmarks List buffer. I use the area under a project headline to store the logbook and over relevant information. Perhaps I would not need the bookmarks if I used org-agenda for scheduling my daily activities, which I do not because it is too hard to stay on top of everything. I just use org-agenda to schedule upcoming meetings.

Note that the bookmarks+ package runs on top of the built-in bookmarks.el package. Bookmarks+ can bookmark a much wider array of items. You can bookmark PDFs for later reading and websites of interest. I find it much easier to bookmark URLs of heavily visited sites than to store them in my private index.html file. You can also bookmark project directories and even dired buffers.

What the landing page (dashboard) will resemble when first loaded

The default image for the dashboard is the Emacs logo. I substituted another image that is included above for testing. The bottom of the dashboards has the top 10 Hackernews items. This is an attention trap, so you may to comment it out.

The startup time should be shorter on Linux and longer on Windows.

I tried zsh and bash. There was no difference in Emacs startup times on the Mac, although these two shells differ in the startup times of new tabs. The Emacs binary starts up in a flash without an init.el.

Note that bookmarks are normally accessed via the bookmarks list buffer, but some can be listed on the dashboard automatically. For example, clicking on the icon in the dashboard of the PDF of a book opens the book in Emacs for immediate reading. The bookmarks are a way of keeping track of material that needs to be read soon. You can configure Emacs to use the bookmarks file as the startup page.

With bookmarks+, you add bookmarks to websites with the C-x x c u keybinding. You can also add bookmarks to directories. Navigate to the directory of interest in a Dired buffer. With the directory name selected in the Dired buffer, enter C-x x m to add the directory as a bookmark. Remember to save the bookmarks list buffer. I add bookmarks to my writing projects on Overleaf, to the project folder in my local drive, and to a PROJ headline in my journalArticles.org file where I store my logbook for tracking my pomodoros on a project. I can pop into any of those three locations in a flash via the click of a mouse thanks to bookmarks+ and its developer Drew Adams.

About

Configuration file for Emacs 30.0.5 with tree-sitter and combobulate for macOS

License:MIT License


Languages

Language:Emacs Lisp 99.9%Language:Python 0.1%Language:Makefile 0.0%