How to open files within the same workspace emacs

Viewed 99

Currently, whenever I open a new file with emacs (I work terminal only) it opens it within a new workspace. That can be quite annoying for me as initially when I start working, I open my project which has some init stuff (lsp-go) that takes a few minutes (monorepo). After that, I would like that whenever I open a new file (from the terminal again) that it uses the same workspace as prior so that it does not have to reinitialise everything (+ I would like to keep my buffers within the same workspace).

Here are some of my aliases:

alias estart="emacs --daemon"
alias estop='emacsclient -e "(kill-emacs)"'

alias e="emacsclient -nw"

My usual workflow is:

  1. Start the server e.g. estart
  2. Open the project e . (this will trigger lsp to load its stuff)
  3. Later on, I open another file (could be anywhere even outside the project) e someFile

Note, I use doom emacs if that's of any use

0 Answers
Related