vim: Add highlighting to set commands (#28600)

5brian created

|Before|After|
|--|--|

|![image](https://github.com/user-attachments/assets/fb965e1f-658c-4ecd-a51f-821881b8001a)|![image](https://github.com/user-attachments/assets/f05f73bf-6661-406a-a5d6-e121e5b6fd1a)|

Release Notes:

- N/A

Change summary

crates/vim/src/command.rs | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

Detailed changes

crates/vim/src/command.rs 🔗

@@ -963,7 +963,15 @@ pub fn command_interceptor(mut input: &str, cx: &App) -> Vec<CommandInterceptRes
             .boxed_clone(),
         )
     } else if query.starts_with("se ") || query.starts_with("set ") {
-        return VimOption::possible_commands(query.split_once(" ").unwrap().1);
+        let (prefix, option) = query.split_once(' ').unwrap();
+        let mut commands = VimOption::possible_commands(option);
+        if !commands.is_empty() {
+            let query = prefix.to_string() + " " + option;
+            for command in &mut commands {
+                command.positions = generate_positions(&command.string, &query);
+            }
+        }
+        return commands;
     } else if query.starts_with('s') {
         let mut substitute = "substitute".chars().peekable();
         let mut query = query.chars().peekable();