| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix panic on close last buffer (#2367)
In certain circumstances it was possible to cause a panic when closing
buffers due to some mishandling of view document history.
A change has been made to delete removed documents from the history of
accessed documents for each view. The ensures we don't attempt to jump
to a deleted document by mistake.
* Move remove document code into View function 'remove_document'
* Replace 'view.jumps.remove' call with 'view.remove_document' call
|
| |
|
|
|
|
| |
Fixes #1238
|
|
|
|
|
|
|
|
| |
This line uses the Display trait for io::ErrorKind which was
stabilized in Rust 1.60.0. We can set MSRV all the way back to
1.57.0 by replacing it with a pretty-print.
Closes #2460.
|
|
|
|
|
| |
Instead of moving the Node contents on view swap if they have the same parent
reorder them to keep traversal order otherwise re-parent them.
|
|
|
|
|
|
|
| |
* add Tree::swap_split_in_direction()
* add swap_view_{left,down,up,right} commands, bound to H,J,K,L
respectively in the Window menu(s)
* add test for view swapping
|
|
|
|
|
|
|
| |
Change the layout of existing split view from horizontal to vertical and
vica-versa. It only effects the focused view and its siblings, i.e. not
recursive.
Command is mapped to 't' or 'C-t' under the Window menus.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Inserting these with the `HashMap::insert` method evades the call
to `Selection::ensure_invariants`. The effect is that the scratch
buffer (or other buffers opened through these code-paths) can start
with a selection at (0, 0), when a file with equivalent contents ("\n")
would start with (0, 1).
I.e.:
hx
and
touch f
hx f
start with different selections even though they have an equivalent
Rope. With this change they both start with (0, 1).
|
| |
|
|
|
|
| |
'auto-format' option (#2321)
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* feat(commands): better handling of buffer-close
Previously, when closing buffer, you would loose cursor position in other docs.
Also, all splits where the buffer was open would be closed.
This PR changes the behavior, if the view has also other buffer
previously viewed it switches back to the last one instead of the view
being closed. As a side effect, since the views are persisted,
the cursor history is persisted as well.
Fixes: https://github.com/helix-editor/helix/issues/1186
* Adjust buffer close behavior
* Remove closed documents from jump history
* Fix after rebase
|
|
|
|
| |
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
|
|
|
|
|
|
|
| |
* Add color_column option
* Rename to ruler
Co-authored-by: DeviousStoat <devious@stoat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* config option line numbers none
* view tests
* added tests
* doc
* comment
* Make gutters configurable
* docu
* docu
* rm none docu
* order
* order
* precedence
* simpler
* rm todo
* fixed clippy
* order
* double quotes
* only allow diagnostics and line-numbers
* tests
* docu
* format
* rm short variant and more docu
* performance improvements
* typo
* rename
|
|
|
| |
Skip launching a language server if a document doesn't have a valid URL.
|
|
|
|
|
|
|
| |
* Make `:write` create nonexistent subdirectories
Prompting as to whether this should take place remains a TODO.
* Move subdirectory creation to new `w!` command
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add runtime language configuration (#1794)
* Add set-language typable command to change the language of current buffer.
* Add completer for available language options.
* Update set-language to refresh language server as well
* Add language id based config lookup on `syntax::Loader`.
* Add `Document::set_language3` to set programming language based on language
id.
* Update `Editor::refresh_language_server` to try language detection only if
language is not already set.
* Remove language detection from Editor::refresh_language_server
* Move document language detection to where the scratch buffer is saved.
* Rename Document::set_language3 to Document::set_language_by_language_id.
* Remove unnecessary clone in completers::language
|
|
|
|
|
|
|
|
|
| |
(#1912)
* feat(clipboard): reintroduce win32yank for wsl2 linux
* refactor(clipboard): adjust win32yank position to not interrupt wayland/x11
Co-authored-by: jiqb <gthbji@ml1.net>
|
|
|
|
| |
Refs #1884
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Move top level lsp config to editor.lsp
This is mainly done to accomodate the new lsp.signature-help config
option that will be introduced in https://github.com/helix-editor/helix/pull/1755
which will have to be accessed by commands. The top level config
struct is split and moved to different places, making the relocation
necessary
* Revert rebase slipup
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add refresh-config and open-config command
* clippy
* Use dynamic dispatch for editor config
* Refactor Result::Ok to Ok
* Remove unused import
* cargo fmt
* Modify config error handling
* cargo xtask docgen
* impl display for ConfigLoadError
* cargo fmt
* Put keymaps behind dyn access, refactor config.load()
* Update command names
* Update helix-term/src/application.rs
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Switch to unbounded_channel
* Remove --edit-config command
* Update configuration docs
* Revert "Put keymaps behind dyn access", too hard
This reverts commit 06bad8cf492b9331d0a2d1e9242f3ad4e2c1cf79.
* Add refresh for keys
* Refactor default_keymaps, fix config default, add test
* swap -> store, remove unneeded clone
* cargo fmt
* Rename default_keymaps to default
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
|
|
|
|
|
| |
* Refactor :set to parse by deserializing values
* Implement serialize for idle_timeout config
|
| |
|
|
|
|
|
|
| |
Each tab is just wide enough to round to the nearest tab stop.
Refs #1243
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* add basic completion replay
* use transaction as the last completion
* completion replay only on trigger position
* cache changes in CompletionAction
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Show infobox to hint textobjects with `mi` and `ma`
* Add note to infobox than any pair of characters will work too
The wording could probably be a little more clear, but I wanted to
keep it short but still accurate.
* Don't allocate a vec for the static help text
* Fix bug where `mi<esc>` would swallow next input and persist infobox
* Better help text for arbitrary pair matching in textobject selection
* Add way to add fake pending key data below status, use with `mi`/`ma`
This is a bit hacky as it makes use of global state which will end
up managed in multiple places, but has precedent in the way autoinfo
works. There should probably be a bigger refactor to handle this
kind of state better.
* Return early on anything other than `mi` and `ma` for autoinfo
* Remove "ascii" from help text with `mi` and `ma`
* Update helix-term/src/ui/editor.rs
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* impl auto pairs config
Implements configuration for which pairs of tokens get auto completed.
In order to help with this, the logic for when *not* to auto complete
has been generalized from a specific hardcoded list of characters to
simply testing if the next/prev char is alphanumeric.
It is possible to configure a global list of pairs as well as at the
language level. The language config will take precedence over the
global config.
* rename AutoPair -> Pair
* clean up insert_char command
* remove Rc
* remove some explicit cloning with another impl
* fix lint
* review comments
* global auto-pairs = false takes precedence over language settings
* make clippy happy
* print out editor config on startup
* move auto pairs accessor into Document
* rearrange auto pair doc comment
* use pattern in Froms
|
| |
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* feat(editor): add config for search wrap_around
Fixes: https://github.com/helix-editor/helix/issues/1489
* Move search settings into separate config
* Disable linter
|
| | |
|
| | |
|
| | |
|
| |
| |
| | |
Looks like it checked the wrong doc id when setting last modified doc.
|
| |
| |
| |
| |
| |
| |
| | |
* feat(helix-view): dynamic line numbers
* docs: describe editor.line-number in more detail
* Make dynamic numbers the default behavior of `relative`
|
| |
| |
| | |
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
|