<commit_before>*vlime-api.txt*
                                                                   *vlime-api*

==============================================================================
CONTENTS                                                  *vlime-api-contents*
  1. Dictionaries............................................|vlime-api-dicts|
  2. Functions...........................................|vlime-api-functions|

==============================================================================
DICTIONARIES                                                 *vlime-api-dicts*

                                                   *vlime-api.VlimeConnection*
Vlime uses |vlime-api.VlimeConnection| objects to represent connections to the
servers. You can create such an object by calling |vlime#plugin#ConnectREPL()|
or |vlime#New()|.

Most of the connection object's methods are asynchronous. All async methods
have an optional callback argument, to allow a function be registered for
handling the result returned by the server. These callback functions should
accept two arguments:

    function! SomeCallbackFunc({conn_obj}, {result}) ...

{conn_obj} is the connection object in question, and {result} is the returned
value.

See below for a detailed list of methods for |vlime-api.VlimeConnection|
objects.


VlimeConnection.Connect({host}, {port}, [remote_prefix], [timeout])
                                                   *VlimeConnection.Connect()*

  Connect to a server.

  {host} and {port} specify the server to connect to. [remote_prefix], if
  specified, is an SFTP URL prefix, to tell Vlime to open remote files via
  SFTP (see |vlime-remote-server|). [timeout] is the time to wait for the
  connection to be made, in milliseconds.

VlimeConnection.IsConnected()                  *VlimeConnection.IsConnected()*

  Return |TRUE| for a connected connection, |FALSE| otherwise.

VlimeConnection.Close()                              *VlimeConnection.Close()*

  Close this connection.

VlimeConnection.Call({msg})                           *VlimeConnection.Call()*

  Send a raw message {msg} to the server, and wait for a reply.<commit_msg>API documentation<commit_after>*vlime-api.txt*
                                                                   *vlime-api*

==============================================================================
CONTENTS                                                  *vlime-api-contents*
  1. Dictionaries............................................|vlime-api-dicts|
  2. Functions...........................................|vlime-api-functions|

==============================================================================
DICTIONARIES                                                 *vlime-api-dicts*

                                                   *vlime-api.VlimeConnection*
Vlime uses |vlime-api.VlimeConnection| objects to represent connections to the
servers. You can create such an object by calling |vlime#plugin#ConnectREPL()|
or |vlime#New()|.

Most of the connection object's methods are thin wrappers around raw
SLIME/SWANK messages, and they are asynchronous. These async methods have an
optional callback argument, to allow a function be registered for handling the
result returned by the server. The callback functions should accept two
arguments:

    function! SomeCallbackFunc({conn_obj}, {result}) ...

{conn_obj} is the connection object in question, and {result} is the returned
value.

See below for a detailed list of methods for |vlime-api.VlimeConnection|
objects.


VlimeConnection.Connect({host}, {port}, [remote_prefix], [timeout])
                                                   *VlimeConnection.Connect()*

  Connect to a server.

  {host} and {port} specify the server to connect to. [remote_prefix], if
  specified, is an SFTP URL prefix, to tell Vlime to open remote files via
  SFTP (see |vlime-remote-server|). [timeout] is the time to wait for the
  connection to be made, in milliseconds.

VlimeConnection.IsConnected()                  *VlimeConnection.IsConnected()*

  Return |TRUE| for a connected connection, |FALSE| otherwise.

VlimeConnection.Close()                              *VlimeConnection.Close()*

  Close this connection.

VlimeConnection.Call({msg})                           *VlimeConnection.Call()*

  Send a raw message {msg} to the server, and wait for a reply.
{'fraction_non_alphanumeric': 0.18132118451025056, 'fraction_numerical': 0.0009111617312072893, 'mean_word_length': 2.1544540229885056, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 20, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3061587', 'n_tokens_mistral': 1041, 'n_tokens_neox': 992, 'n_words': 363}