diff options
author | pommicket <pommicket@gmail.com> | 2023-09-08 22:59:47 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-09-08 22:59:47 -0400 |
commit | 0dcfd5a4f1fd865c24c01b17b214e1f72e4c06fe (patch) | |
tree | d693d70a57713cf4dbe48d30159100bab279c77d /command.c | |
parent | f86b0aa1e843646056c08a91fcc759aa0d8a57ba (diff) |
LSP code formatting (not entirely working yet)
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -105,6 +105,8 @@ static CommandName command_names[] = { {"increment-number", CMD_INCREMENT_NUMBER}, {"decrement-number", CMD_DECREMENT_NUMBER}, {"rename-symbol", CMD_RENAME_SYMBOL}, + {"format-file", CMD_FORMAT_FILE}, + {"format-selection", CMD_FORMAT_SELECTION}, }; static_assert_if_possible(arr_count(command_names) == CMD_COUNT) @@ -703,5 +705,11 @@ void command_execute_ex(Ted *ted, Command c, const CommandArgument *full_argumen if (buffer && buffer_lsp(buffer)) menu_open(ted, MENU_RENAME_SYMBOL); break; + case CMD_FORMAT_FILE: + format_file(ted); + break; + case CMD_FORMAT_SELECTION: + format_selection(ted); + break; } } |