---
feature_story: FS_41_40_39_44
feature_title: suggest from interp tree
feature_status: PARTIAL
---

TODO: Parts of the proposal may be obsoleted by implementing (but need to finalize with tests):
*   FS_01_89_09_24 interp tree
*   FS_26_43_73_72 func tree
TODO: Currently interp tree path is part of func tree path
      (shown in description) so this feature should be reviewed and clarified.

This feature is related to FS_01_89_09_24 interp tree.

The feature proposes to have special `arg_name` (special case) which is not based on loaded data,
but based on config of interpreter (FS_01_89_09_24 interp tree).

For example:

*   When `Alt+Shift+Q` is used, the `arg_value` lists are composed based on only `search_control`:

    ```
    lay | # Alt+Shift+Q
    ```
    
    ```
    some_command 
    class_function: 6
      tree_step_0: class_function [init_value]
      tree_step_1: external
      *tree_step_2: ? goto desc list
      tree_step_3: ? host service
    ```

    Function `_contribute_to_completion` is ineffective because `func_id_query_enum_items` uses
    `ServerAction.ProposeArgValues` and this function checks for:

    ```
    if self.parsed_ctx.server_action == ServerAction.ProposeArgValues:
    ```

*   When args are suggested, the `arg_value` lists includes both:

    *   `arg_value` lists from currently expected `prop_name`
    *   next values based on current tree path as explained in FS_01_89_09_24 interp tree.

    ```
    lay | # Tab
    ```
    
    ```
    intercept help subtree goto desc list
    ```

This feature proposes to invoke contribution to completion all the time,
and use separate field in the output of `func_id_query_enum_items` to list what is proposed
by the FS_01_89_09_24 interp tree.
