mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
fix(indent): ecma - parenthesized expression indentation
This commit is contained in:
parent
20168d8e20
commit
3ef2c77e13
3 changed files with 21 additions and 0 deletions
|
|
@ -8,6 +8,7 @@
|
|||
(named_imports)
|
||||
(object)
|
||||
(object_pattern)
|
||||
(parenthesized_expression)
|
||||
(return_statement)
|
||||
(statement_block)
|
||||
(switch_case)
|
||||
|
|
|
|||
|
|
@ -35,3 +35,17 @@ func_call(
|
|||
.map()
|
||||
.filter()
|
||||
)
|
||||
|
||||
function prepare_list_fetcher(filter) {
|
||||
return Object.assign(
|
||||
async () =>
|
||||
(
|
||||
await http.get('/list', {
|
||||
params: {
|
||||
filter: filter,
|
||||
},
|
||||
})
|
||||
).data,
|
||||
{ key: ['/list', filter] }
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,6 +60,12 @@ describe("indent JavaScript:", function()
|
|||
{ 19, 2 },
|
||||
{ 20, 2 },
|
||||
{ 25, 2 },
|
||||
{ 42, 8 },
|
||||
{ 43, 10 },
|
||||
{ 44, 12 },
|
||||
{ 48, 4 },
|
||||
{ 49, 4 },
|
||||
{ 50, 2 },
|
||||
}
|
||||
do
|
||||
run:new_line("ecma/func.js", { on_line = info[1], text = "//", indent = info[2] }, info[3], info[4])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue