Skip to content

js2-mode does not respect indent #378

@Silex

Description

@Silex

I found out that js2-mode does not respect indent, but simply doing M-x js-mode does.

Here's my config:

root = true

[*]
# Use spaces for indentation
indent_style = space
# Each indent should contain 2 spaces
indent_size = 2
# Use Unix line endings
end_of_line = lf
# The files are utf-8 encoded
charset = utf-8
# No whitespace at the end of line
trim_trailing_whitespace = true
# A file must end with an empty line - this is good for version control systems
insert_final_newline = true
# A line should not have more than this amount of chars (not supported by all plugins)
max_line_length = 120

[{Makefile,**.mk}]
# Use tabs for indentation (Makefiles require tabs)
indent_style = tab

[*.py]
indent_size = 4

[python]
indent_size = 4

[*.cs]
indent_size = 4

With js2-mode (the default) it indents to 4 spaces, with js-mode it correctly indents to 2 spaces.

M-x editorconfig-find-current-editorconfig works with both modes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions