angelozerr / ec4e

EditorConfig for Eclipse based on GenericEditor and tm4e
Eclipse Public License 1.0
9 stars 1 forks source link

settings don't seem to get applied to (Generic) Editor #39

Open p-bakker opened 2 years ago

p-bakker commented 2 years ago

Got the following ,editorconfig file in the root of my project:

root = true

[*]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true

When I open a .ts file from within a subfolder of my project in the Generic Editor (also got WWD installed) and I press tab, I still get a tab character inserted, instead of 4 dots.

Seems like the settings of the .editorconfig file aren't getting applied, cause what happens when I hit tab in the editor follows the global Eclipse workspace setting instead

angelozerr commented 2 years ago

@p-bakker this project is very old and it could have some bugs. I'm moving ec4e to Eclipse Platform (step by step).

I started the PR https://github.com/eclipse-platform/eclipse.platform.text/pull/90 which provide only apply of proprties (without syntax coloration, without validation etc for .edtorconfig). Please be patient :)

p-bakker commented 2 years ago

K, was hoping though to be able to use it before this eventually gets rolled into Eclipse

angelozerr commented 2 years ago

I'm sorry I have no time to maintain both projects.

wesleybl commented 2 years ago

When I open a .ts file from within a subfolder of my project in the Generic Editor (also got WWD installed) and I press tab, I still get a tab character inserted, instead of 4 dots.

I checked "Insert spaces for tabs" in Workspace's "Text Editors" setting, it inserted 2 spaces, when I have "indent_size=2" setting in EditorConfig. That's right when the Workspace configuration is 4 spaces.

One thing I found bad, is that if you don't type Enter after characters that are automatically inserted, the error messages don't go away. For example, if we have the code:

const a=()=>{
  return 1;
}

and enter the code:

const b=()=>{
  return 2;
}

above it, the "}" is automatically inserted, when we type "{". The final code looks like this:

const b=()=>{
  return 2;
}

const a=()=>{
  return 1;
}

The Editor displays the message Trim traling whitespace in line return 2;, as long as we don't type Enter after the "}".

But let's wait for the PR made by @angelozerr !

angelozerr commented 2 years ago

The Editor displays the message Trim traling whitespace in line return 2;, as long as we don't type Enter after the "}".

But let's wait for the PR made by @angelozerr !

Thanks for reporting this issue. My PR on Platform text will not takecare of validation like ec4e, it will provide at firts just basic .editorconfig to apply properties like tabs.