| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
|
| |
* added position-pct as a statusline indicator
* removed unnecessary mutable reference
* pct -> percent
* percent -> percentage
|
| |
|
|
|
|
|
| |
* add spacer element to statusline
* docs
|
|
|
| |
Would panic when given the view for the current document for a different document.
|
|
|
|
|
|
|
| |
* keep jump/file history when using :split
* move history cloning into the switch function
Co-authored-by: Robin <robinvandijk@klippa.com>
|
|
|
|
|
|
|
|
|
| |
* add statusline element to display file line endings
* run cargo fmt --all
* change the word *ending* from plural to singular
* support for the unicode-lines feature flag
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add lsp signature help
* Do not move signature help popup on multiple triggers
* Highlight current parameter in signature help
* Auto close signature help
* Position signature help above to not block completion
* Update signature help on backspace/insert mode delete
* Add lsp.auto-signature-help config option
* Add serde default annotation for LspConfig
* Show LSP inactive message only if signature help is invoked manually
* Do not assume valid signature help response from LSP
Malformed LSP responses are common, and these should not crash the
editor.
* Check signature help capability before sending request
* Reuse Open enum for PositionBias in popup
* Close signature popup and exit insert mode on escape
* Add config to control signature help docs display
* Use new Margin api in signature help
* Invoke signature help on changing to insert mode
|
|
|
|
| |
If all gutters are removed, there are still an extra one padding, would be nice
to remove that to save some space.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* feat(statusline): add the file type (language id) to the status line
* refactor(statusline): move the statusline implementation into an own struct
* refactor(statusline): split the statusline implementation into different functions
* refactor(statusline): Append elements using a consistent API
This is a preparation for the configurability which is about to be
implemented.
* refactor(statusline): implement render_diagnostics()
This avoid cluttering the render() function and will simplify
configurability.
* feat(statusline): make the status line configurable
* refactor(statusline): make clippy happy
* refactor(statusline): avoid intermediate StatusLineObject
Use a more functional approach to obtain render functions and write to
the buffers, and avoid an intermediate StatusLineElement object.
* fix(statusline): avoid rendering the left elements twice
* refactor(statusline): make clippy happy again
* refactor(statusline): rename `buffer` into `parts`
* refactor(statusline): ensure the match is exhaustive
* fix(statusline): avoid an overflow when calculating the maximal center width
* chore(statusline): Describe the statusline configurability in the book
* chore(statusline): Correct and add documentation
* refactor(statusline): refactor some code following the code review
Avoid very small helper functions for the diagnositcs and inline them
instead.
Rename the config field `status_line` to `statusline` to remain
consistent with `bufferline`.
* chore(statusline): adjust documentation following the config field refactoring
* revert(statusline): revert regression introduced by c0a1870
* chore(statusline): slight adjustment in the configuration documentation
* feat(statusline): integrate changes from #2676 after rebasing
* refactor(statusline): remove the StatusLine struct
Because none of the functions need `Self` and all of them are in an own
file, there is no explicit need for the struct.
* fix(statusline): restore the configurability of color modes
The configuration was ignored after reintegrating the changes of #2676
in 8d28f95.
* fix(statusline): remove the spinner padding
* refactor(statusline): remove unnecessary format!()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add theme picker with live preview
* Add live theme preview to :theme command
* cargo fmt
* Fix clippy warnings
* Remove picker variant
* Remove unused import
* Cleanup
* Change current_theme to last_theme
* Fix accidental comment flash deletion
* Typo
* Remove theme cache
* Add some comments
* Refactor some theme handling
TIL flatmap on Option is called and_then
* Remove unnecessary renames
* Constrain last_theme theme preview lifecycle
* Switch to bitflag implementation
* Better handling of last_theme
* Sort theme names
* Better memory juggling
* Missed a branch
* Remove name from theme, switch bitand to &
* cargo fmt
* Update helix-view/src/editor.rs
* Switch boolean to enum
* Remove bitflag impl
* cargo fmt
* Remove un-needed type arg
* cargo fmt
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add mode specific styles
In similar vein to neovim's lualine and similar statusline packages this
allows helix users to style their mode based on which mode it is thus
making each mode more visually distinct at a glance
* Add an example based on rosepine
* Add editor.colors-mode config
* Document statusline mode styles
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add workspace and document diagnostics picker
fixes #1891
* Fix some of @archseer's annotations
* Add From<&Spans> impl for String
* More descriptive parameter names.
* Adding From<Cow<str>> impls for Span and Spans
* Add new keymap entries to docs
* Avoid some clones
* Fix api change
* Update helix-term/src/application.rs
Co-authored-by: Bjorn Ove Hay Andersen <bjrnove@gmail.com>
* Fix a clippy hint
* Sort diagnostics first by URL and then by severity.
* Sort diagnostics first by URL and then by severity.
* Ignore missing lsp severity entries
* Add truncated filepath
* Typo
* Strip cwd from paths and use url-path without schema
* Make tests a doctest
* Better variable names
Co-authored-by: Falco Hirschenberger <falco.hirschenberger@itwm.fraunhofer.de>
Co-authored-by: Bjorn Ove Hay Andersen <bjrnove@gmail.com>
|
|
|
|
|
| |
* Implement cursorline
* Binary search possible lines
|
|\
| |
| | |
Integration testing harness
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When a new View of a Document is created, a default cursor of 0, 0 is
created, and it does not get normalized to a single width cursor until
at least one movement of the cursor happens. This appears to have no
practical negative effect that I could find, but it makes tests difficult
to work with, since the initial selection is not what you expect it to be.
This changes the initial selection of a new View to be the width of the
first grapheme in the text.
|
| |
| |
| |
| |
| |
| |
| | |
* Use new macro syntax for encoding sequences of keys
* Make convenience helpers for common test pattern
* Use indoc for inline indented raw strings
* Add feature flag for integration testing to disable rendering
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Add file-picker.follow-symlinks configuration option (default is true), this
also controls if filename and directory completers follow symlinks.
- Update FilePicker to set editor error if opening a file fails, instead of
panicing.
Fix #1548
Fix #2246
|
|
|
|
|
|
|
|
| |
In certain circumstances it was possible to get into an infinite loop
when replaying macros such as when different macros attempt to replay
each other.
This commit adds changes to track which macros are currently being
replayed and prevent getting into infinite loops.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
| |
* 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`
|
| |\
| | |
| | | |
Change cursor shape on mode change
|
| | |\ |
|