fsync(2) is a somewhat expensive operation that flushes writes to the
underlying disk/SSD. It's typically used by databases to ensure that
writes survive very hard failure scenarios like your cat kicking the
plug out of the wall. Synchronizing isn't automatically done by
`flush`ing (from the `std::io::Write` or `tokio::io::AsyncWriteExt`
traits). From the [`tokio::fs::File`] moduledocs:
> To ensure that a file is closed immediately when it is dropped, you
> should call `flush` before dropping it. Note that this does not ensure
> that the file has been fully written to disk; the operating system
> might keep the changes around in an in-memory buffer. See the
> `sync_all` method for telling the OS to write the data to disk.
[`tokio::fs::File`]: https://docs.rs/tokio/latest/tokio/fs/struct.File.html
I'd been using this theme quite a while because it looks the nicest to
my dyslexia. That said, when I open up XML or HTML documents, they
pretty much always show up in complete white, except for attribute
values.
Finally decided to take a look at why, and added the two colors
(`tag` & `attribute`) needed to make the theme actually usable with the
two formats.
It can be convenient to define project specific debugger templates, some of
which might not necessitate prompting the user to define completion.
This commit makes completion optional for debugger templates and starts the
dap immediately if undefined or empty.
Previously, the link would point to the now moved "How to install the default language servers" page. The link now directly points to the up-to-date page.
some LSPs does update the active signature and some not. To make both
worlds happy, make the active signature more intelligent.
1. SignatureHelp store now the suggested lsp_signature
2. if the lsp_signature changes then use it
3. otherwise use the last signature from the old popup
4. in case the old signature doesn't exist anymore, show the last signature
Signed-off-by: Ben Fekih, Hichem <hichem.f@live.de>
* Add completion/signature bindings to keymap.md
PR #9974 added alt-p/alt-n keybindings to scroll through signatures.
This wasn't very discoverable, as it's not in the docs or the command palette.
This also removes a broken link for "comment mode" in the table of contents.
* Update keymap.md
* add textobjects queries comment and function
* update doc for hurl lang support
* switch entry.inner to entry.outer
* switch to function.inside
---------
Co-authored-by: Tobias Eiß <te@clarilab.de>
Trunctation should always be handled by the parent. Returning None is
only supposed to indicate a missing implementation
Co-authored-by: Ben Fekih, Hichem" <hichem.f@live.de>
* Make dark_plus.toml more accurate to VSCode
* theme(dark_plus): make type.builtin blue
* Refactor dark_plus and add myself as new maintainer
Co-authored-by: NAME <NAME@EXAMPLE.COM>
---------
Co-authored-by: Luca Saccarola <96259932+saccarosium@users.noreply.github.com>
Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
Co-authored-by: NAME <NAME@EXAMPLE.COM>
While moving completion resolve to the event system in #9668 we introduced what
is essentially a "DOS attack" on slow LSPs. Completion resolve requests were
made in the render loop and debounced with a timeout. Once the timeout expired
the resolve request was made. The problem is the next frame would immediately
request a new completion resolve request (and mark the old one as obsolete but
because LSP has no notion of cancelation the server would still process it). So
we were in essence sending one completion request to the server every 150ms and
only stopped if the server managed to respond before we rendered a new frame.
This caused overload on slower machines/with slower LS.
In this PR I revamped the resolve handler so that a request is only ever
resolved once. Both by checking if a request is already in-flight and by marking
failed resolve requests as resolved.