This matches the behavior described by the EditorConfig spec for its
`insert_final_newline` option:
> Editors must not insert newlines in empty files when saving those
> files, even if `insert_final_newline = true`.
Co-authored-by: Axlefublr <101342105+Axlefublr@users.noreply.github.com>
These match the equivalent options in VSCode. `trim_trailing_whitespace`
is also the name used by EditorConfig.
* `trim-final-newlines` trims any extra line endings after the final one
* `trim-trailing-whitespace` trims any trailing whitespace (but not
empty lines)
Render rulers before the cursor to ensure that the cursor, when over
a ruler, is not hidden from view. Without this, you typically end up
with 1) foreground text that is the same as the background if the
ruler doesn't already have a foreground and 2) no visible cursor,
because the ruler's background color took precedence. By moving the
rulers before the cursor, this ensures that the theme is still rendered
more or less the way one would visually expect things to turn out.
The runtime directory should be correctly set without the need to set
HELIX_RUNTIME manually because we check for a runtime directory within
CARGO_MANIFEST_DIR.
This change also filters the runtime directory out of the source file
set passed to buildRustPackage since the runtime directory is not needed
at compilation time.
This follows a pattern used in the signature help request for example.
Moving the json deserialization into the return future of
`text_document_hover` makes the types easier for callers to work with.
The info log within `process_request_response` duplicated the body of
the JSON message printed earlier by the transport which was confusing.
The error log in the completion handler was easy to hit during normal
use and is not actually an error - dropping is the graceful way to
handle changes occurring while completion requests are in flight.