IntelliJ - 使用自动 formatting/reformat 时展开 Angular 导入
IntelliJ - unfolding Angular imports when using auto formatting/reformat
我在使用 IntelliJ 自动格式化时遇到问题。当我按下 Ctrl+Alt+L
时,IntelliJ 从 Angular 展开许多导入,从一行到多行,如下例所示:
import {
Component,
ElementRef,
Input,
OnInit,
QueryList,
ViewChild,
ViewChildren
} from '@angular/core';
但之前是一行中的所有内容:
import {Component, ElementRef, Input, OnInit, QueryList, Renderer2, ViewChild, ViewChildren} from '@angular/core';
我可以强制 IDE 不将这些导入展开成这么多行吗?
编辑
My editor settings
在 Intellij -> 设置 -> 编辑器 -> 代码风格 -> JavaScript select "ES6 import/export" = "Do not wrap"
我在使用 IntelliJ 自动格式化时遇到问题。当我按下 Ctrl+Alt+L
时,IntelliJ 从 Angular 展开许多导入,从一行到多行,如下例所示:
import {
Component,
ElementRef,
Input,
OnInit,
QueryList,
ViewChild,
ViewChildren
} from '@angular/core';
但之前是一行中的所有内容:
import {Component, ElementRef, Input, OnInit, QueryList, Renderer2, ViewChild, ViewChildren} from '@angular/core';
我可以强制 IDE 不将这些导入展开成这么多行吗?
编辑
My editor settings
在 Intellij -> 设置 -> 编辑器 -> 代码风格 -> JavaScript select "ES6 import/export" = "Do not wrap"