mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-13 00:40:06 -04:00
feat(indent): ecma - support common use-cases
This commit is contained in:
parent
782e299cd6
commit
7a6d93ca5b
8 changed files with 149 additions and 20 deletions
37
tests/indent/ecma/func.js
Normal file
37
tests/indent/ecma/func.js
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
const arrow_func = (
|
||||
a,
|
||||
b,
|
||||
c
|
||||
) => {
|
||||
log(a, b, c)
|
||||
}
|
||||
|
||||
const arrow_func_without_brace = (a, b, c) =>
|
||||
log(
|
||||
a,
|
||||
b,
|
||||
c
|
||||
)
|
||||
|
||||
function func_def(
|
||||
a,
|
||||
b,
|
||||
{ c = '' }
|
||||
) {
|
||||
log(a, b, c)
|
||||
}
|
||||
|
||||
func_call(
|
||||
a,
|
||||
(b) => b
|
||||
)
|
||||
|
||||
chained_func_call()
|
||||
.map()
|
||||
.filter()
|
||||
|
||||
func_call(
|
||||
chained_func_call()
|
||||
.map()
|
||||
.filter()
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue