Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language Server formatting options are hardcoded #2728

Closed
kaloyan-raev opened this issue Oct 7, 2016 · 0 comments
Closed

Language Server formatting options are hardcoded #2728

kaloyan-raev opened this issue Oct 7, 2016 · 0 comments
Assignees
Labels
kind/bug Outline of a bug - must adhere to the bug report template.
Milestone

Comments

@kaloyan-raev
Copy link
Contributor

Formatting options passed to language servers are hardcoded to:

  • insertSpaces = true
  • tabWidth = 3 (why 3 ?!)

The insertSpaces = true value comes from here: https://github.com/eclipse/che/blob/master/plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/LanguageServerFormatter.java#L179

The tabWidth = 3 value seems to come from here: https://github.com/eclipse/che/blob/master/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/editorconfig/DefaultTextEditorConfiguration.java#L35

Reproduction Steps:

  1. Launch a Node stack with the JSON LS Agent activated
  2. Open a JSON file in the editor
  3. Format the document

Expected behavior:

The document is formatted according to the current user preferences.

Observed behavior:

The document is formatted with a hardcoded settings. The user preferences are not applied.

Che version: latest master
OS and version: Fedora 24
Docker version: 1.10.3
Che install: local build

Additional information:

  • Problem started happening recently, didn't happen in an older version of Che: [No]
  • Problem can be reliably reproduced, doesn't happen randomly: [Yes]
@kaloyan-raev kaloyan-raev mentioned this issue Oct 7, 2016
34 tasks
kaloyan-raev added a commit to kaloyan-raev/che that referenced this issue Oct 7, 2016
… options to LS

Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
@bmicklea bmicklea added the kind/bug Outline of a bug - must adhere to the bug report template. label Oct 10, 2016
@bmicklea bmicklea mentioned this issue Nov 16, 2016
66 tasks
@bmicklea bmicklea added this to the 5.0.0 milestone Jan 11, 2017
@bmicklea bmicklea mentioned this issue Jan 13, 2017
70 tasks
JPinkney pushed a commit to JPinkney/che that referenced this issue Aug 17, 2017
… options to LS (eclipse-che#2735)

* Fixes eclipse-che#2728: Respect user settings when sending formatting options to LS

Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>

* Remove spaces in empty line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template.
Projects
None yet
Development

No branches or pull requests

3 participants