Skip to content

Code manipulation utilities for Emacs using tree-sitter

Notifications You must be signed in to change notification settings

meain/tree-surgeon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

tree-surgeon

A collection of code manipulation utils using tree-sitter.

;; Example configuration
(use-package tree-surgeon
  :straight (tree-surgeon :type git :host github :repo "meain/tree-surgeon")
  :config (evil-leader/set-key "H j" 'tree-surgeon-split-join))

Features

I am still porting over things from elisp-tree-sitter(in my personal config) to builtin treesit module. As of now, we just have split-join and go-errors but should have more here soon.

Split join

Split and join arguments and parameters in function calls and definitions.

M-x tree-surgeon-split-join

Go errors

Automatically generate go return statements for errors. Call tree-surgeon-go-errors to generate the return statements with an if err != nil check.

M-x tree-surgeon-go-errors
Customization

You can add or modify the language specific settings by modifying tree-surgeon-split-join-settings.

About

Code manipulation utilities for Emacs using tree-sitter

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published