| Commit message (Collapse) | Author | Age |
... | |
|
|
|
| |
Now the editor can fill **very** large terminals.
Changed/removed tests which check the truncating behaviour.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most commands that accept an argument show their current value if no
argument is specified. The `:theme` command previously displayed an
error message in the status bar if not provided with an argument:
```
Theme name not provided
```
It now shows the current theme name in the status bar if no argument is
specified.
Signed-off-by: James O. D. Hunt <jamesodhunt@gmail.com>
Signed-off-by: James O. D. Hunt <jamesodhunt@gmail.com>
|
|
|
|
|
|
|
|
|
| |
(#4426)
* add command update that will write the changes if file hasn been modified
* add docs
* update the docs
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This bug occurs on `shell_insert_output` and `shell_append_output`
commands.
The previous implementation would create a child process using the Rust
stdlib's `Command` builder. However, when nothing should be piped in
from the editor, the default value for `stdin` would be used. According
to the Rust stdlib documentation that is `Stdio::inherit` which will
make the child process inherit the parent process' stdin. This would
cause the terminal to freeze.
This change will set the child process' stdin to `Stdio::null` whenever
it doesn't pipe it. In the `if` statement where this change was made
there was an extra condition for windows that I am not sure if would
require some special treatment.
|
|
|
|
|
| |
This is mostly for the sake of the diagnostics pickers: without
rendering the diagnostic styles, it's hard to tell where the entries
in the picker are pointing to.
|
|
|
| |
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
|
|
| |
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
|
|
| |
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
|
|
| |
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
|
|
| |
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
|
|
| |
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
| |
|
| |
|
|
|
| |
Co-authored-by: SoraTenshi <dream@neoncity.dev>
|
|
|
|
|
|
|
|
| |
Some language servers may not send the `documentation` field if it
is expensive to compute. Clients can request the missing field with
a completionItem/resolve request.
In this change we use the idle-timeout event to ensure that the current
completion item is resolved.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The change in d801a6693c3d475b3942f705d3ef48d7966bdf65 to search for
suffixes in `file-types` is too permissive: files like the tutor or
`*.txt` files are now mistakenly interpreted as R or perl,
respectively.
This change changes the syntax for specifying a file-types entry that
matches by suffix:
```toml
file-types = [{ suffix = ".git/config" }]
```
And changes the file-type detection to first search for any non-suffix
patterns and then search for suffixes only with the file-types entries
marked explicitly as suffixes.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Just like for grammars we currently force a lower-case of the name for
some actions (like filesystem lookup). To make this consistent and less
surprising for users, we remove this lower-casing here.
Note: it is still the preferred way to name both language and grammar in
lower-case
Signed-off-by: Christian Speich <cspeich@emlix.com>
|
|
|
|
|
|
|
|
|
|
| |
Currently we always lower-case the grammar name when loading it. While it
is somewhat of an convention to name tree-sitter grammars in lowercase
there is no rule to enforce it.
This patch removes the lower-casing to allow all possible grammar names.
Signed-off-by: Christian Speich <cspeich@emlix.com>
|
|
|
|
|
|
| |
This complicates the code a little but it often divides by two the number of allocations done by
the functions. LSP labels especially can easily be called dozens of time in a single menu popup,
when listing references for example.
|
|
|
|
| |
not done for nothing
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we do auto formatting, the code that takes the LSP's response and applies
the changes to the document are just getting the currently focused view and
giving that to the function, basically always assuming that the document that
we're applying the change to is in focus, and not in a background view.
This is usually fine for a single view, even if it's a buffer in the
background, because it's still the same view and the selection will get updated
accordingly for when you switch back to it. But it's obviously a problem for
when there are multiple views, because if you don't have the target document in
focus, it will ask the document to update the wrong view, hence the crash.
The problem with this is picking which view to apply any selection change to.
In the absence of any more data points on the views themselves, we simply pick
the first view associated with the document we are saving.
|
| |
|
|
|
|
|
|
| |
When force quitting, we need to block on the pending writes to ensure
that write commands succeed before exiting, and also to avoid a crash
when all the views are gone before the auto format call returns from
the LS.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Autosave all when the terminal loses focus
* Correct comment on focus config
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Need a block_try_flush_writes in all quit_all paths
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
|
|
|
|
|
|
|
|
|
| |
* Fix shellwords delimiter handling
This allows commands such as `:set statusline.center ["file-type"]` to
work. Before the quotes within the list would mess it up.
Also added a test to ensure correct behavior
* Rename Delimiter -> OnWhitespace
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix test::print for Unicode
The print function was not generating correct translations when
the input has Unicode (non-ASCII) in it. This is due to its use of
String::len, which gives the length in bytes, not chars.
* Fix multi-code point auto pairs
The current code for auto pairs is counting offsets by summing the
length of the open and closing chars with char::len_utf8. Unfortunately,
this gives back bytes, and the offset needs to be in chars.
Additionally, it was discovered that there was a preexisting bug where
the selection was not computed correctly in the case that the cursor
was:
1. a single grapheme in width
2. this grapheme was more than one char
3. the direction of the cursor is backwards
4. a secondary range
In this case, the offset was not being added into the anchor. This was
fixed.
* migrate auto pairs tests to integration
* review comments
|
| |
|
|
|
|
|
| |
This function is not currently used but is likely to be useful in
the future, so this change silences the dead_code warning.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change removes language server configuration from the default
languages.toml config for integration tests. No integration-tests
currently depend on the availability of a language server but if any
future test needs to, it may provide a language server configuration
by passing an override into the `test_syntax_conf` helper.
Language-servers in integration tests cause false-positive failures
when running integration tests in GitHub Actions CI. The Windows
runner appears to have `clangd` installed and all OS runners have
the `R` binary installed but not the `R` language server package.
If a test file created by `tempfile::NamedTempFile` happens to have a
file extension of `r`, the test will most likely fail because the
R language server will fail to start and will become a broken pipe,
meaning that it will fail to shutdown within the timeout, causing a
false-positive failure. This happens surprisingly often in practice.
Language servers (especially rust-analyzer) also emit unnecessary
log output when initializing, which this change silences.
|
|
|
|
|
|
|
| |
`helix_view::apply_transaction` closes over `Document::apply` and
`View::apply` to ensure that jumplist entries are updated when a
document changes from a transaction. `Document::apply` shouldn't
be called directly - this helper function should be used instead.
|
| |
|
|
|
| |
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
|
|
|
| |
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* feat(syntax): add strategy to associate file to language through pattern
File path will match if it ends with any of the file types provided in the config.
Also used this feature to add support for the .git/config and .ssh/config files
* Add /etc/ssh/ssh_config to languages.toml
* cargo xtask docgen
* Update languages.md
* Update languages.md
* Update book/src/languages.md
Co-authored-by: Ivan Tham <pickfire@riseup.net>
* Update book/src/languages.md
Co-authored-by: Ivan Tham <pickfire@riseup.net>
Co-authored-by: Ivan Tham <pickfire@riseup.net>
|
|\
| |
| | |
Write path fixes
|