spyder-ide / spyder

Official repository for Spyder - The Scientific Python Development Environment
https://www.spyder-ide.org
MIT License
8.11k stars 1.57k forks source link

Support EditorConfig #2336

Open techtonik opened 9 years ago

techtonik commented 9 years ago

http://editorconfig.org/

...consistent coding styles between different editors and IDEs... ...file format for defining coding styles...

goanpeca commented 9 years ago

:+1:

oscargus commented 5 years ago

I think this indeed should be very useful. Is it "easy" to have per open file settings of these things in Spyder? (I have not started to look at the code, but I guess it is a big difference if these settings are already supported on a per file basis or if one needs to implement that as well.)

techtonik commented 5 years ago

I suppose that open file should have some data model in Spyder sources, but I don't see anything close from source filenames - https://github.com/spyder-ide/spyder/tree/master/spyder

I remember there was something from Qt about Editor class or something like this. Not exactly a file model, but could be a pointer. In fact, a Spyder class diagram would be helpful to solve this.

treyhunner commented 1 month ago

I'm not a Spyder user but am involved with EditorConfig and would love to see Spyder included in the list of supported editors either with built-in support of via a separate plugin.

I don't plan to work on this issue myself, but I wanted to add some extra context for others that might work on this in the future. I briefly spoke to @CAM-Gerlach about this issue at PyCon and he noted a few things that may be relevant:

  1. All the current official EditorConfig properties are probably fairly easy to support, except maybe tab_width
  2. Since this issue was originally opened the plugin system has been overhauled a bit and writing a plugin that uses the editorconfig-core-py to configure these options based on .editorconfig settings should (in theory) be about as straightforward as writing the Gedit plugin was
  3. This functionality should probably be part of Spyder so a pull request to modify the editor plugin (which from my understand, is a "plugin" that controls much of Spyder's core functionality) may be just as appropriate as making a separate plugin
ccordoba12 commented 1 month ago

Thanks for the input @treyhunner! We'll try to take a look at it for 6.1, to be released before the end of the year.