Remove indentation in symbol body

This commit is contained in:
Michael Panchenko committed 2025-03-29 13:09:17 +01:00
1 parent 9ee3b0cfc5
commit b2207d65e8
1 file changed
+4
+4
View File
@@ -947,6 +947,10 @@ class LanguageServer:
symbol_file = self.retrieve_full_file_content(symbol["location"]["relativePath"])
symbol_lines = symbol_file.split("\n")
symbol_body = "\n".join(symbol_lines[symbol_start_line:symbol_end_line])
# remove leading indentation
symbol_start_column = symbol["location"]["range"]["start"]["character"]
symbol_body = symbol_body[symbol_start_column:]
return symbol_body