@@ -1104,6 +1104,7 @@ defmodule ElixirLS.LanguageServer.Server do
1104
1104
fun = fn ->
1105
1105
{ line , character } = SourceFile . lsp_position_to_elixir ( source_file . text , { line , character } )
1106
1106
parser_context = Parser . parse_immediate ( uri , source_file , { line , character } )
1107
+ # TODO not working for eex
1107
1108
SignatureHelp . signature ( parser_context , line , character )
1108
1109
end
1109
1110
@@ -1117,7 +1118,12 @@ defmodule ElixirLS.LanguageServer.Server do
1117
1118
source_file = get_source_file ( state , uri )
1118
1119
1119
1120
fun = fn ->
1120
- OnTypeFormatting . format ( source_file , line , character , ch , options )
1121
+ if String . ends_with? ( uri , [ ".ex" , ".exs" ] ) or source_file . language_id in [ "elixir" ] do
1122
+ OnTypeFormatting . format ( source_file , line , character , ch , options )
1123
+ else
1124
+ # TODO no support for eex
1125
+ { :ok , nil }
1126
+ end
1121
1127
end
1122
1128
1123
1129
{ :async , fun , state }
@@ -1154,7 +1160,16 @@ defmodule ElixirLS.LanguageServer.Server do
1154
1160
1155
1161
defp handle_request ( folding_range_req ( _id , uri ) , state = % __MODULE__ { } ) do
1156
1162
source_file = get_source_file ( state , uri )
1157
- fun = fn -> FoldingRange . provide ( source_file ) end
1163
+
1164
+ fun = fn ->
1165
+ if String . ends_with? ( uri , [ ".ex" , ".exs" ] ) or source_file . language_id in [ "elixir" ] do
1166
+ FoldingRange . provide ( source_file )
1167
+ else
1168
+ # TODO no support for eex
1169
+ { :ok , [ ] }
1170
+ end
1171
+ end
1172
+
1158
1173
{ :async , fun , state }
1159
1174
end
1160
1175
0 commit comments