Closed piotr-cz closed 5 years ago
@piotr-cz I cannot reproduce the bug. Do you have a specific .editorconfig
file I can test with?
# EditorConfig is awesome: http://EditorConfig.org
# Documentation: https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties
# top-most EditorConfig file
root = true
# Universal properties
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
# Code
[*.{php,js}]
max_line_length = 120
curly_bracket_next_line = true
spaces_around_operators = true
spaces_around_brackets = both
indent_brace_style = Allman
# PHP files
[*.php]
# Javascript
[*.js]
# Views (Twig & HTML)
[*.{html.twig,html}]
# Configuration files (JSON, XML, YAML)
[*.{json,xml,yml,yaml}]
What are the two file names you switched between?
It applies to any file I've tested, with different .editorconfig files, on two different machines with different OS. No matter if I'm editing a file within the same folder as the .editorcofig is located or in a nested subfolder. Tried with EOLs of CRLF and LF.
Strange is that it looks like I'm the only person experiencing the issue.
So the only common denominator is me? I mean, the plugin is supposed to work just after opening a file, right?
Yes, it is supposed to work after opening a file.
Can I help somehow to track the bug down/ debug?
@piotr-cz If you have time, you can check the loadConfig function in PluginDefinition.cpp. It maybe neither called nor called correctly.
I mean you can do debugging on your system.
I'm not good in C++, but I will try. Problem could be here: NppPluginEditorConfig.cpp as loading works tough menu but not on load.
As well as somewhere else, as the options are forgotten also when the tab loses focus:
1) I open file (.editorconfig is not loaded) 2) Plugins > EditorConfig > Reload EditorConfig for this file (loaded) 3) Switch to other tab, Switch back: (.editorconfig settings are forgotten).
Since this is quite an old bug, and I have never seen this happen myself, could you check if the problem still exists with the new versions. At the moment of writing that is Notepad++ 7.6.3 and the plugin version 0.4.0
And if it still exists, in v0.4.0 of the plugin is a Show EditorConfig settings for this file
in the menu. Maybe that can help to debug the problem.
I am closing this one. If the problem still exists, feel free to reopen it
When I open Notepad++, I need to reload definitions (Plugins > EditorConfig > Reload EditorConfig for this file) so plugin works correctly.
Same when I switch to another tab and come back.
I'm using v0.1.3 with Notepad++ v6.7.7, no other plugins installed except the default ones.