@@ -41,44 +41,72 @@ ls.setup({
4141
4242</details >
4343
44+ <details >
45+ <summary >Lua</summary >
46+
47+ #### Normal Snippets
48+
49+ | Trig | Desc | Context Required |
50+ | :---: | ------------------------------------ | :--------------: |
51+ | ` fn ` | Expands to function definition. | No |
52+ | ` req ` | Expands to ` require(...) ` statement. | No |
53+
54+ #### Postfix Snippets
55+
56+ ``` scheme
57+ [
58+ (function_call)
59+ (identifier)
60+ (expression_list)
61+ ] @any_expr
62+ ```
63+
64+ | Trig | Desc (placehoder: ` ? ` ) | Expr before cursor |
65+ | :-------: | ---------------------------------------- | :----------------: |
66+ | ` .ipairs ` | Expands to ` ipairs(?) ` for-loop. | ` any_expr ` |
67+ | ` .pairs ` | Expands to ` pairs(?) ` for-loop. | ` any_expr ` |
68+ | ` .isnil ` | Expands to ` if ? == nil then ` statement. | ` any_expr ` |
69+
70+ </details >
71+
4472<details >
4573<summary >Cpp</summary >
4674
4775#### Normal Snippets
4876
49- | Trig | Desc | Context Required |
50- | :---------: | ------------------------------------------------------------------------------------------------ | :--------------: |
51- | ` fn ` | Expand to lambda function in argument list or function body, otherwise expand to normal function | No |
52- | ` \|trans ` | Expand to ranges::views::transform pipe. | No |
53- | ` \|filter ` | Expand to ranges::views::filter pipe. | No |
54- | ` cpo ` | Expand to customize point object. | No |
55- | ` ns%s(%S+) ` | Expand to namespace block (including comments). | No |
56- | ` itf ` | Expand to a struct with default virtual destruction. | No |
57- | ` pvf ` | Expand to a pure virtual function declaration. | No |
77+ | Trig | Desc | Context Required |
78+ | :---------: | -------------------------------------------------------------------------------------------------- | :--------------: |
79+ | ` fn ` | Expands to lambda function in argument list or function body, otherwise expand to normal function. | No |
80+ | ` \|trans ` | Expands to ranges::views::transform pipe. | No |
81+ | ` \|filter ` | Expands to ranges::views::filter pipe. | No |
82+ | ` cpo ` | Expands to customize point object. | No |
83+ | ` ns%s(%S+) ` | Expands to namespace block (including comments). | No |
84+ | ` itf ` | Expands to a struct with default virtual destruction. | No |
85+ | ` pvf ` | Expands to a pure virtual function declaration. | No |
5886
5987#### Auto-snippets
6088
61- | Trig | Desc | Context Required |
62- | :------: | -------------------------------------------------------- | :---------------------------: |
63- | ` ctor! ` | Expand to default constructor | In Class |
64- | ` dtor! ` | Expand to default destructor | In Class |
65- | ` cc! ` | Expand to default copy constructor | In Class |
66- | ` mv! ` | Expand to default move constructor | In Class |
67- | ` ncc! ` | Expand to delete copy constructor | In Class |
68- | ` nmv! ` | Expand to delete move constructor | In Class |
69- | ` ncm! ` | Expand to delete copy and move constructor | In Class |
70- | ` once ` | Expand to ` pragma once ` marker at the front of the file. | All lines before are comments |
71- | ` u8 ` | Expand to ` uint8_t ` . | No |
72- | ` u16 ` | Expand to ` uint16_t ` . | No |
73- | ` u32 ` | Expand to ` uint32_t ` . | No |
74- | ` u64 ` | Expand to ` uint64_t ` . | No |
75- | ` i8 ` | Expand to ` int8_t ` . | No |
76- | ` i16 ` | Expand to ` int16_t ` . | No |
77- | ` i32 ` | Expand to ` int32_t ` . | No |
78- | ` i64 ` | Expand to ` int64_t ` . | No |
79- | ` t(%s)! ` | Evaluate (QET) marker, and expand to typename. | No |
80- | ` #" ` | Expand to include statement with quotes. ` #include "" ` . | No |
81- | ` #< ` | Expand to include statement with ` <> ` . ` #include <> ` . | No |
89+ | Trig | Desc | Context Required |
90+ | :------: | --------------------------------------------------------- | :---------------------------: |
91+ | ` ctor! ` | Expands to default constructor. | In Class |
92+ | ` dtor! ` | Expands to default destructor. | In Class |
93+ | ` cc! ` | Expands to default copy constructor. | In Class |
94+ | ` mv! ` | Expands to default move constructor. | In Class |
95+ | ` ncc! ` | Expands to delete copy constructor. | In Class |
96+ | ` nmv! ` | Expands to delete move constructor. | In Class |
97+ | ` ncm! ` | Expands to delete copy and move constructor. | In Class |
98+ | ` once ` | Expands to ` pragma once ` marker at the front of the file. | All lines before are comments |
99+ | ` u8 ` | Expands to ` uint8_t ` . | No |
100+ | ` u16 ` | Expands to ` uint16_t ` . | No |
101+ | ` u32 ` | Expands to ` uint32_t ` . | No |
102+ | ` u64 ` | Expands to ` uint64_t ` . | No |
103+ | ` i8 ` | Expands to ` int8_t ` . | No |
104+ | ` i16 ` | Expands to ` int16_t ` . | No |
105+ | ` i32 ` | Expands to ` int32_t ` . | No |
106+ | ` i64 ` | Expands to ` int64_t ` . | No |
107+ | ` t(%s)! ` | Evaluates (QET) marker, and expand to typename. | No |
108+ | ` #" ` | Expands to include statement with quotes. ` #include "" ` . | No |
109+ | ` #< ` | Expands to include statement with ` <> ` . ` #include <> ` . | No |
82110
83111##### Quick Expand Type markers
84112
@@ -109,18 +137,18 @@ ls.setup({
109137] @any_expr
110138```
111139
112- | Trig | Desc (placehoder: ` ? ` ) | Expr before cursor |
113- | :-------: | ------------------------------------------------------------------ | :----------------: |
114- | ` .be ` | Expand to begin and end exprs | ` any_expr ` |
115- | ` .mv ` | Wraps with ` std::move(?) ` | ` any_expr ` |
116- | ` .fwd ` | Wraps with ` std::forward<decltype(?)>(?) ` | ` any_expr ` |
117- | ` .val ` | Wraps with ` std::declval<?>() ` | ` any_expr ` |
118- | ` .dt ` | Wraps with ` decltype(?) ` | ` any_expr ` |
119- | ` .uu ` | Wraps with ` (void)? ` | ` any_expr ` |
120- | ` .ts ` | Switch indent's coding style between ` CamelCase ` and ` snake_case ` . | ` indent ` |
121- | ` .sc ` | Wraps with ` static_cast<>(?) ` | ` any_expr ` |
122- | ` .single ` | Wraps with ` ranges::views::single(?) ` | ` any_expr ` |
123- | ` .in ` | Expands to ` if (...find) ` statements. | ` any_expr ` |
140+ | Trig | Desc (placehoder: ` ? ` ) | Expr before cursor |
141+ | :-------: | -------------------------------------------------------------------- | :----------------: |
142+ | ` .be ` | Expands to begin and end exprs. | ` any_expr ` |
143+ | ` .mv ` | Wraps with ` std::move(?) ` . | ` any_expr ` |
144+ | ` .fwd ` | Wraps with ` std::forward<decltype(?)>(?) ` . | ` any_expr ` |
145+ | ` .val ` | Wraps with ` std::declval<?>() ` . | ` any_expr ` |
146+ | ` .dt ` | Wraps with ` decltype(?) ` . | ` any_expr ` |
147+ | ` .uu ` | Wraps with ` (void)? ` . | ` any_expr ` |
148+ | ` .ts ` | Switches indent's coding style between ` CamelCase ` and ` snake_case ` . | ` indent ` |
149+ | ` .sc ` | Wraps with ` static_cast<>(?) ` . | ` any_expr ` |
150+ | ` .single ` | Wraps with ` ranges::views::single(?) ` . | ` any_expr ` |
151+ | ` .in ` | Expands to ` if (...find) ` statements. | ` any_expr ` |
124152
125153</details >
126154
@@ -149,20 +177,20 @@ ls.setup({
149177] @expr_or_type
150178```
151179
152- | Trig | Desc (placehoder: ` ? ` ) | Expr before cursor |
153- | :--------: | ---------------------------------------------------------- | :----------------: |
154- | ` .rc ` | Wraps with ` Rc::new(?) ` if expr, ` Rc<?> ` if type | ` expr_or_type ` |
155- | ` .arc ` | Wraps with ` Arc::new(?) ` if expr, ` Arc<?> ` if type | ` expr_or_type ` |
156- | ` .box ` | Wraps with ` Box::new(?) ` if expr, ` Box<?> ` if type | ` expr_or_type ` |
157- | ` .mu ` | Wraps with ` Mutex::new(?) ` if expr, ` Mutex<?> ` if type | ` expr_or_type ` |
158- | ` .rw ` | Wraps with ` RwLock::new(?) ` if expr, ` RwLock<?> ` if type | ` expr_or_type ` |
159- | ` .cell ` | Wraps with ` Cell::new(?) ` if expr, ` Cell<?> ` if type | ` expr_or_type ` |
160- | ` .refcell ` | Wraps with ` RefCell::new(?) ` if expr, ` RefCell<?> ` if type | ` expr_or_type ` |
161- | ` .ref ` | Wraps with ` &? ` | ` expr ` |
162- | ` .refm ` | Wraps with ` &mut ? ` | ` expr ` |
163- | ` .ok ` | Wraps with ` Ok(?) ` | ` expr ` |
164- | ` .err ` | Wraps with ` Err(?) ` | ` expr ` |
165- | ` .some ` | Wraps with ` Some(?) ` | ` expr ` |
166- | ` .println ` | Wraps with ` println!("{:?}", ?) ` | ` expr ` |
180+ | Trig | Desc (placehoder: ` ? ` ) | Expr before cursor |
181+ | :--------: | ----------------------------------------------------------- | :----------------: |
182+ | ` .rc ` | Wraps with ` Rc::new(?) ` if expr, ` Rc<?> ` if type. | ` expr_or_type ` |
183+ | ` .arc ` | Wraps with ` Arc::new(?) ` if expr, ` Arc<?> ` if type. | ` expr_or_type ` |
184+ | ` .box ` | Wraps with ` Box::new(?) ` if expr, ` Box<?> ` if type. | ` expr_or_type ` |
185+ | ` .mu ` | Wraps with ` Mutex::new(?) ` if expr, ` Mutex<?> ` if type. | ` expr_or_type ` |
186+ | ` .rw ` | Wraps with ` RwLock::new(?) ` if expr, ` RwLock<?> ` if type. | ` expr_or_type ` |
187+ | ` .cell ` | Wraps with ` Cell::new(?) ` if expr, ` Cell<?> ` if type. | ` expr_or_type ` |
188+ | ` .refcell ` | Wraps with ` RefCell::new(?) ` if expr, ` RefCell<?> ` if type. | ` expr_or_type ` |
189+ | ` .ref ` | Wraps with ` &? ` . | ` expr ` |
190+ | ` .refm ` | Wraps with ` &mut ? ` . | ` expr ` |
191+ | ` .ok ` | Wraps with ` Ok(?) ` . | ` expr ` |
192+ | ` .err ` | Wraps with ` Err(?) ` . | ` expr ` |
193+ | ` .some ` | Wraps with ` Some(?) ` . | ` expr ` |
194+ | ` .println ` | Wraps with ` println!("{:?}", ?) ` . | ` expr ` |
167195
168196</details >
0 commit comments