File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
CodeFormatServer/src/Service Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1313#include " LuaParser/Parse/LuaParser.h"
1414#include " CodeService/Diagnostic/DiagnosticBuilder.h"
1515#include " Util/FileFinder.h"
16+ #include " Util/Url.h"
1617
1718LuaFormat::LuaFormat () {
1819 _diagnosticStyle.name_style_check = false ;
Original file line number Diff line number Diff line change 44#include " CodeService/Config/LanguageTranslator.h"
55#include " LanguageServer.h"
66#include " DiagnosticService.h"
7+ #include " Util/Url.h"
78
89ConfigService::ConfigService (LanguageServer *owner)
910 : Service(owner) {
@@ -23,7 +24,8 @@ LuaStyle &ConfigService::GetLuaStyle(std::string_view fileUri) {
2324 }
2425
2526 if (editorConfig) {
26- return editorConfig->Generate (fileUri);
27+ auto filePath = url::UrlToFilePath (fileUri);
28+ return editorConfig->Generate (filePath);
2729 }
2830 return _defaultStyle;
2931}
Original file line number Diff line number Diff line change 66#include < regex>
77
88#include " Util/StringUtil.h"
9- #include " Util/Url.h"
109
1110std::shared_ptr<LuaEditorConfig> LuaEditorConfig::LoadFromFile (const std::string &path) {
1211 std::fstream fin (path, std::ios::in);
@@ -56,8 +55,7 @@ void LuaEditorConfig::Parse() {
5655 }
5756}
5857
59- LuaStyle &LuaEditorConfig::Generate (std::string_view fileUri) {
60- auto filePath = url::UrlToFilePath (fileUri);
58+ LuaStyle &LuaEditorConfig::Generate (std::string_view filePath) {
6159
6260 std::vector<std::size_t > patternSection;
6361 for (std::size_t i = 0 ; i != _sections.size (); i++) {
You can’t perform that action at this time.
0 commit comments