github.com/drellem2/pogo@v0.0.0-20240503070746-2c2b76da329a/README.md (about) 1 # pogo 2 code intelligence daemon 3 4 *Like a language server for project navigation.* 5 6 Open a git repository in your terminal, then navigate the project in emacs - no extra effort required. 7 8 Currently supports zshell and emacs. 9 10 ## Installation 11 *(instructions for Mac)* 12 13 1. Install golang. 14 `brew install go` 15 2. Clone the repository 16 `git clone git@github.com:drellem2/pogo && cd pogo` 17 3. Ensure gopath is set. 18 `export GOPATH=$(cd ..; pwd)` 19 4. Install executables. 20 `GO111MODULE=on go install github.com/drellem2/pogo/cmd/...` 21 5. Add the gopath `bin` file to your path. 22 `export PATH=$PATH:$(cd ../bin; pwd)` 23 6. Add the zshell tool to your `.zshrc` file. (You'll want to make some modifications to it first.) 24 `cat shell/.zshrc >> ~/.zshrc` 25 7. Install the emacs client (instructions below). 26 27 ## Shell Usage 28 29 1. Pogo will autodiscover projects as you visit directories in the shell. 30 2. Use `lsp` to list projects. 31 3. Use `sp` to switch projects. 32 4. Use `pose` to search with zoekt. 33 34 Zoekt query examples can be found [here](https://github.com/sourcegraph/zoekt/blob/main/web/templates.go#L158). 35 e.g. `pose banana` or `pose banana .` will seach the current directory for `banana`. 36 37 ## Environment Variables 38 39 - `POGO_HOME`: Folder for pogo to store indexes. 40 - `POGO_PLUGIN_PATH`: Folder to discover plugins. 41 42 ## Plugins 43 You can write/install plugins to provide IDE-like features for all editors. See the included `search` plugin for an example. 44 45 ## Emacs Client 46 47 Provides a project navigation interface matching `projectile.el`, but running in a separate process. Indexing is done in the background, and can be shared with other tools. 48 49 Goal: Open a file in emacs, then see its repository automatically imported into your favorite IDE. 50 51 ### Installation 52 - Build the server using the instructions above. 53 - Open `pogo-mode.el` in emacs and run `M-x package-install-from-buffer`. 54 - Add to your `init.el`: 55 ```emacs-lisp 56 (defvar pogo-exec-path "[YOUR_INSTALL_DIR]/pogo/bin") 57 (progn 58 (add-to-list 'exec-path pogo-exec-path) 59 (pogo-mode +1) 60 (define-key pogo-mode-map (kbd "C-c p") 'pogo-command-map)) 61 ``` 62 63 If you use `projectile`, it will work the same but doesn't have all of the features (yet).