Skip to content

Xaldew/yasnippet-radical-snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Radical Yasnippet Collection

This repository contains a small collection of radical snippets for yasnippet.

Installation

As this collection has only just been created, for the time being this collection is not available on MELPA. In the meantime, you may install it directly from my personal archive. This can be done by adding the following snippet to your emacs.

(require 'package)
(add-to-list 'package-archives
             '("xaldew" . "https://gustafwaldemarson.com/elpa/"))
(add-to-list 'package-unsigned-archives "xaldew")
(package-initialize)

Once that is done, then just refresh the packages and install it with:

  • M-x package-refresh-contents
  • M-x package-install yasnippet-snippets

Alternatively, you can also install the package using e.g. use-package with the following snippet in your .emacs:

(use-package yasnippet-radical-snippets
  :ensure t
  :after yasnippet
  :config
  (yasnippet-radical-snippets-initialize))

For doom emacs:

(package! yasnippet-radical-snippets
  :recipe (:host github :repo "Xaldew/yasnippet-radical-snippets"
           :files (:defaults "snippets" "yasnippet-radical-snippets.el")))

Examples

Below are some examples of the snippets available in this repository, with some caveats listed below.

Python

Non-Type Annotated Function - Google Style

Google Python Style

Non-Type Annotated Function - ReST Style

ReST Python Style

Type Annotated Function

Requested, but not implemented yet.

Update Existing Function Arguments

ReST Python Update

Python Class Documentation

Python Class Documentation

C/C++

Documented Function - Doxygen Style

This snippet attempts to grab type-information using the Semantic backend, falling back to regexp based extraction should it fail or not be available.

C++ Function Doxygen

Py-snippets

After some discussion with the MELPA maintainers, the Python snippets copied into a separate repository.

Contributing

If you have a similarly interesting snippet that you think is too complex for a general collection, feel free to create an issue or pull-request to discuss it.

If you have found a bug in any of the available snippets and want to report it, please provide a minimal example that can reproduce it; these snippets are often a bit difficult to debug so please make it as easy as possible for us.

About

A collection of radical Yasnippets

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published