Skip to content

zikajk/ecp-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Eglot Clojure Project Tree (ECP-Tree)

./screenshot.png

Introduction

Eglot Clojure Project Tree uses custom functionality in clojure-lsp. Lsp-mode has treemacs integration, this is for people who for some reason decided to use eglot instead of lsp-mode.

This is an interactive project tree for Clojure projects. It facilitates the navigation and interaction with various project entities like files, namespaces, and functions directly from Emacs.

Installation

Installation

Prerequisites

Ensure you have Emacs version 29.1 or newer installed. The following dependencies are handled automatically:

  • Eglot 1.12.29 (built into Emacs 29.1)
  • Hierarchy 0.7.0 (built into Emacs 29.1)
  • Jarchive 0.11.0

Manual Installation

  1. Clone the repository:
    git clone https://github.com/zikajk/ecp-tree.git ~/.emacs.d/site-lisp/ecp-tree
        
  2. Add to your Emacs configuration:
    (add-to-list 'load-path "~/.emacs.d/site-lisp/ecp-tree")
    (require 'ecp-tree)
        

Usage

There are two main commands:

Display Full Project Tree

To display the complete project tree:

M-x ecp-tree-show

Display Current Namespace Tree

To display the tree starting from your current namespace:

M-x ecp-tree-show-from-current

This will show only the current namespace and its contents.

Show Callers for var / fn

Number of callers next to each fn / var:

./screenshot-call.png

Debug Mode

To debug potential problems during hierarchy creation:

M-x ecp-tree-toggle-debug

Configuration

Can be customized by:

  • (customize-group ecp-tree)

ECP-Tree offers several customization options to adjust the appearance and behavior of the project tree. These include:

  • Icon (string) for different node types like projects, folders, libraries, etc.
  • Sorting children nodes alphabetically.

Refer to the package source for detailed customization options and their default values.

If .jar file nodes under ‘External Dependencies’ are missing children (such as .clj and .class files), you might need to add this to your ~/.config/clojure-lsp/config.edn

{....
 :dependency-scheme "jar"
...}

Development

The ECP-Tree is developed and maintained by zikajk. For contributions, suggestions, or issues, please visit the project’s GitHub repository:

Current Features

  • Interactive project tree view.
  • Customizable icons (strings) for different node types.
  • Sorting of children nodes.

Future Developments

  • [ ] Class Decompilation: Currently, ECP-Tree does not integrate class decompilation. It is a potential area for development, possibly leveraging existing clojure-lsp functionality. Contributions are welcome to implement this feature.
  • [x] Lazy and Asynchronous Hierarchy Loading: Improving the project tree’s responsiveness by finding ways to load the hierarchy lazily and possibly asynchronously, so users don’t have to wait for the full hierarchy to build at once.
  • Cache Mechanism Improvements: The current cache mechanism is quite naive. Enhancing this could improve performance. Versions >=0.2 don’t need cache anymore as they load their children lazily!

Contributing

ECP-Tree welcomes contributions from the community.

Support

For support, questions, or to report an issue, please use the GitHub issues page.

Copying

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see https://www.gnu.org/licenses/.

End of ECP-Tree README

About

Eglot Clojure Project Tree

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published