Commit graph

637 commits

Author SHA1 Message Date
Masafumi Koba
214ddf78e3 Support typescript-mode (#274)
This fixes #139.

For more details, see <https://github.com/ananthakumaran/typescript.el>.
2018-05-03 14:57:16 +01:00
Andrea Crotti
ed2be07237
avoid same name with different case, fixes #272 2018-04-22 14:49:07 +01:00
Nicholas D Steeves
152a091c6f Rename files that are prohibited in Debian packages (#258)
* Rename files that are prohibited in Debian packages

* Add missing keys for all markdown-mode snippets

* markdown-mode: Give a couple snippets more meaningful names

* markdown-mode/uft8: Modify description to say UTF-8

* Add MELPA stable badge.

@AndreaCrotti is now tagging stable releases, so I believe it is
appropriate to close #242
2018-04-21 10:04:16 +01:00
rrooij
cdd424df88 php-mode: fix case in getters and setters (#271)
Fix the case of the getter and setter templates. The previous
method "capitalize" turned upper case characters to lower case
elsewhere in the string.
2018-04-21 09:57:50 +01:00
Andrea Crotti
829e3b0e22
Merge branch 'master' of github:AndreaCrotti/yasnippet-snippets 2018-04-18 13:40:15 +01:00
Andrea Crotti
b93e4009c9
fix version number 2018-04-18 13:39:28 +01:00
rrooij
d60f079c93 php-mode: fix missing dollar sign in set snippet (#266)
The dollar sign was missing which caused a badly generated setter
method.
2018-04-18 13:32:45 +01:00
rrooij
4bbe565b7c php-mode: add getter and setter snippets (#265) 2018-04-08 12:46:31 +01:00
Neymarsabin
66031e52fb Add various snippets for org-mode (#260)
* Add various snippets for org-mode

* Remove readme and sourcecode and fix typos

* Remove reveal_all and edit table snippet
2018-04-07 15:40:15 +01:00
Carl Lieberman
b663ac7f37 Add snippets for latex-mode (#241)
* Add sum snippet for LaTeX

* Add int snippet for LaTeX

* Add prod snippet for LaTeX

* Add binom snippet for LaTeX

* Add bigcup snippet for LaTeX

* Add bigcap snippet for LaTeX

* Remove trailing lines

* Replace two-word arguments with one word

* Actually, remove the words entirely
2018-04-07 15:12:47 +01:00
Sunil
41030e2b01 Add snippets for bazel-mode (#255)
* bazel mode snippets for cc

* bazel mode snippets for java.

added bazel mode java snippets and added newline at eof

* bazel mode snippets for python

* bazel mode snippets for shell
2018-04-07 15:08:56 +01:00
Jader Martins
6c11e532e8 fix indent function haskell (#261)
* fix indent function

* remove extra line
2018-04-07 14:57:26 +01:00
Guillermo Robles
79fc648da3 Add bibtex-mode snippets (#251)
* Add bibtex-mode snippets

* Move yas-indent-line option to .yas-setup.el file
2018-03-24 18:24:04 +00:00
Julio Oliveira
2b4c4d7ef7 Fix python-mode/function_docstring_numpy docstring indentation (#256) 2018-03-07 13:18:25 +00:00
Andrea Crotti
5464966ade
gratipay dead 2018-03-01 11:18:27 +00:00
Kenneth Lin
2373036c13 Can we use JIT snippet loading? (#252)
I found that yasnippet now supports JIT snippet loading. Can we make this the default setting when we initialize snippets? From some very basic benchmarking this reduces my load time of yasnippet-snippet autoloads from ~2200 ms to ~400 ms. Further compiling the snippets pushes this down to ~360 ms.
2018-02-22 13:40:09 +01:00
James N
26b33acf8c Add snippets for kotlin (#246) 2018-02-22 09:03:07 +01:00
Marco Craveiro
d88001c1fb Latex: add snippet for description (#250)
Similarly to itemize and enumerate, the description snippet creates a
list of items, with a description associated. Copied from the
enumerate snippet.
2018-02-22 08:55:33 +01:00
Erick Navarro
652419d299 Add markdown-mode code block (#254) 2018-02-22 08:55:18 +01:00
Noam Postavsky
b42c2b670b Remove paren-wrapping snippets from emacs-lisp-mode (#248)
There are several snippets whose expansion is nothing more than

    (KEY $0)

where KEY is the snippet's #key field.  These snippets do nothing but
save you typing in the parentheses.  Using a package like paredit, or
smartparens would be more suited to this.  There are currently a lot
of snippets in emacs-lisp-mode, which makes browsing through the list
more difficult, so these least useful ones should be removed.
2018-01-22 13:21:12 +00:00
kchenphy
f76efc2054 Add snippet for elisp package (#239)
* Add snippet for elisp package

* Update snippets

* Combine lexical-binding line with package declaration line.

(to prevent checkdoc from triggering)

* Provide sensible default for license.
2018-01-12 13:16:35 +00:00
James N
3ab16fb465 Add snippets for swift (#244) 2018-01-07 09:47:42 +00:00
Wahed Mangal
2bb3cc1b2e Elixir cleanup + 5 useful snippets (#245)
* removed trailing newline from elixir snippets

* 5 convenience snippets I often use
2018-01-06 21:17:06 +00:00
fnwiya
7fc2b95e2f add type to git_commit_mode (#240) 2018-01-05 10:08:00 +00:00
Ludwig PACIFICI
737953ea6b Added Rust snippets "eprint" and "eprintln" (#243)
eprint/eprintln snippets behave like print/prinln.

* eprintln: Macro for printing to the standard error, with a newline.
* eprint: Macro for printing to the standard error.
2018-01-05 10:07:07 +00:00
Andrea Crotti
72d3292f7a
add missing backquote 2017-11-27 12:23:56 +00:00
Noam Postavsky
871c6f022d Add snippet dir with symbol indirection (#230)
* yasnippet-snippets.el (yasnippet-snippets-dir): Define with
defconst, set to the "snippets" directory.
(yasnippet-snippets-initialize): Add `yasnippet-snippets-dir' as a
symbol.  Drop the boundp check, as we are already doing (require
'yasnippet).
2017-11-25 10:45:07 +00:00
ybiquitous
13bee06e1f Add method and accessor (getter/setter) snippets for ES6 (#237)
For details, see below links:

- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/set
2017-11-22 21:39:30 +00:00
randen
6b6dcd9eca Fix typo (#236)
Typo in 'insertmacro'
2017-11-06 12:47:26 +00:00
Noam Postavsky
120d35010a Move some C/++ specific stuff to its own subdir (#231) 2017-10-31 13:17:53 +00:00
Thomas Atkinson
ebe3b513df Php doc changes (#232)
* Change type indent width for phpdoc param tags

phpcs expects one space between @param tag and type
identifier. Checking
http://manual.phpdoc.org/HTMLSmartyConverter/PHP/phpDocumentor/tutorial_tags.pkg.html
there is only meant to be one space included.

* Remove * at end of phpdoc return tag

The return tag should be the last tag in the phpdoc block and should
not add a extra line for a extra tag.
2017-10-31 09:48:31 +00:00
Patrick Nuckolls
e28a7391ef Update template (#235)
Moved spaces that were part of the default values out of them as they are always going to be left in, and moved the quotes outside of the docstring default as they will usually be there.
2017-10-30 13:11:25 +00:00
ybiquitous
07389c6723 add 'try...catch' statement snippet to js-mode (#227)
* add 'try...catch' statement snippet to js-mode

For details, see below link:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch

* change variable name from `e` to `err` for Error object
2017-10-10 20:24:37 +01:00
ybiquitous
29ce99b841 add arrow function snippets to js-mode (ES2015 syntax) (#226)
* add arrow function snippets to js-mode (ES2015 syntax)

For details, see below link:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions

* Make 'arrow-function' snippet more simple
2017-10-06 17:18:12 +01:00
Nathanael Merlin
143b31a4eb Add powershell-mode with basic function snippets (#220) 2017-10-06 17:16:24 +01:00
Noam Postavsky
65764856df Put $0 before comment-end (#221)
* Put $0 before comment-end

* snippets/prog-mode/fixme:
* snippets/prog-mode/todo:
* snippets/prog-mode/xxx: Use comment-start and comment-end directly
instead of `yas-with-comment` so that $0 can be inserted before comment-end.

* * snippets/prog-mode/.yas-setup.el (yas-with-comment): Remove.
2017-10-01 14:06:13 +01:00
ybiquitous
39b8becede add Promise snippet to js-mode (since ES2015) (#228)
For details, see below link:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/promise
2017-10-01 12:27:37 +01:00
Andrea Crotti
227845c8b9
move script to the right place 2017-10-01 12:25:27 +01:00
Jürgen Hötzel
314a16ff7e Add snippet for sh 'until' loop (#229) 2017-10-01 12:22:34 +01:00
Davidbrcz
7534870632 Update cc-mode/main (#222)
The current cc-mode/main  snippet does not compile out of the box with gcc or g++.
I reverted it to a more standard code which does not use variable length array with its arguments
2017-09-27 13:09:05 +01:00
ybiquitous
76e5443738 add snippets for 'let' and 'const' statements (ES2015 syntax) (#225)
For details, see below links:

- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const
2017-09-27 13:07:36 +01:00
Andrea Crotti
bcbdc760f8
fixes #223 2017-09-26 18:24:39 +01:00
ybiquitous
70903229b4 add snippets about ES2015 module syntax (import, export) (#219)
* add snippets about ES2015 module syntax (import, export)

For details, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import

* follow exact 'import' syntax

* add 'group: es6'
2017-09-20 20:34:01 +01:00
ybiquitous
728a66d6c3 rewrite 'class' and 'constructor' for ES2015 syntax in js-mode (#218)
* rewrite 'class' and 'constructor' for ES2015 syntax in js-mode

* fine tuning

* fine tuning

* add new snippets 'class-es6' and 'init-es6' for backward compatibility
2017-09-20 20:33:21 +01:00
USAMI Kenta
1cb40233f8 Add snippets for php-mode (#205)
* Add snippets for php-mode

* Fix typo
2017-09-20 19:05:01 +01:00
ybiquitous
643d6a0e10 add "switch" snippet to js-mode (#217)
Inspired by other language modes (go, cc, php, etc.).
2017-09-15 16:57:11 +01:00
ybiquitous
00e4e12922 insert space between "for" keyword and "(" (#215)
* insert space between "for" keyword and "("

In order to follow the standard JavaScript coding style.

* trim final newline
2017-09-14 11:04:34 +01:00
ybiquitous
886befad0e use "forEach" instead of "each" (#216)
"forEach" is standard API, but "each" is non-standard.

See below:

- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach
- https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach
2017-09-14 09:24:11 +01:00
Thibault
5c3bb7ad8f Fix path for csharp-mode/main (#212) 2017-09-08 12:35:24 +01:00
Avelino
e62b18c771 create python snippet bang #! (#213) 2017-09-08 12:34:01 +01:00