Commit Graph

2116 Commits (config_refactor)

Author SHA1 Message Date
Pascal Kuthe fb13130701
migrate language server config to new config system 5 months ago
Gabriel Dinner-David 84e24b33dc
make sure to sync views when applying edits to unfocused views (#9173) 6 months ago
Sammo98 65d0412880
health - add formatter to display (#7986) 6 months ago
Philipp Mildenberger 41ca46cf8c
Initialize diagnostics when opening a document (#8873) 6 months ago
Pascal Kuthe 48c49f0227
update history of a newly focused view (#9271) 6 months ago
Michael Davis 0cbd8d3df1
Check for rename support before showing LSP rename prompt (#9277) 6 months ago
jw013 00d681cc69
Update goto_file docs (#8563) (#9001)
Make the pluralization of files and selections consistent to emphasize
the 1-to-1 relation between files and selections. The prior wording
with plural "files" and singular "selection" can mislead users into
thinking the command can open multiple files from a single selection.
6 months ago
Tshepang Mbambo da4afaf3da
remove build warnings (#9180) 6 months ago
Pascal Kuthe 783ff27b1b consistent diagnostic sorting 6 months ago
Pascal Kuthe 515ef17207 make diagnostics stick to word boundaries
Diagnostics are currently extended if text is inserted at their end. This is
desirable when inserting text after an identifier. For example consider:

let foo = 2;
    --- unused variable

Renaming the identifier should extend the diagnostic:

let foobar = 2;
    ------ unused variable

This is currently implemented in helix but as a consequence adding whitespaces
or a type hint also extends the diagnostic:

let foo      = 2;
    -------- unused variable
let foo: Bar = 2;
    -------- unused variable

In these cases the diagnostic should remain unchanged:

let foo      = 2;
    --- unused variable
let foo: Bar = 2;
    --- unused variable

As a heuristic helix will now only extend diagnostics that end on a word char
if new chars are appended to the word (so not for punctuation/ whitespace).
The idea for this mapping was inspired for the word level tracking vscode uses
for many positions. While VSCode doesn't currently update diagnostics after
receiving publishDiagnostic it does use this system for inlay hints for example.
Similarly, the new association mechanism implemented here can be used for word
level tracking of inlay hints.

A similar mapping function is implemented for word starts. Together
these can be used to make a diagnostic stick to a word. If that word
is removed that diagnostic is automatically removed too. This is the exact
same behavior VSCode inlay hints eixibit.
6 months ago
Pascal Kuthe 8653e1b02f Add config to mark diagnostic sources as persistent 6 months ago
ath3 9ba691cd3a
Support drawing popup frame (#4313)
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
6 months ago
TornaxO7 914c83420b
fix `:indent-style` crash (#9087)
* removing unreachable statement in `:indent-style`

* update checks when setting indent line and update docs

* `cargo xtask docgen`
7 months ago
Daniel Ebert 938a710904 Make the indent heuristic configurable 7 months ago
TornaxO7 b81aacc5e1
Join empty lines with only one space in `join_selections` (#8989)
* fix: #8977

fixes the issue that lines with only spaces are getting
joined as well

* reverting some renamings

* improve empty line check

* adding integration test

* reverting code block

* fix conditon check for line end

* applying suggested style
7 months ago
Hendrik Norkowski b023faacf8
fix(ui): use crossterm cursor when at the end of the rope (#8934) 7 months ago
Hendrik Norkowski 71fd85894b
use crossterm cursor in editor when out of focus (#6858)
Use crossterm cursor in the editor when the terminal is out of focus to achieve consistent out-of-focus cursor behaviour
7 months ago
chtenb 8c68074fa6
Fix precedence of ui.virtual.whitespace (#8879)
* Revert "Revert "Fix precedence of ui.virtual.whitespace (#8750)""

This reverts commit 811d62d3b3.

* Fix ui.text overwriting the syntax highlighting

Adjust ui.text description
7 months ago
Cole Helbling 8b0ae3d279
bump MSRV to 1.70.0 (#8877)
* rust-toolchain.toml: bump MSRV to 1.70.0

With Firefox 120 released on 21 November 2023, the MSRV is now 1.70.0.

* Fix cargo fmt with Rust 1.70.0

* Fix cargo clippy with Rust 1.70.0

* Fix cargo doc with Rust 1.70.0

* rust-toolchain.toml: add clippy component

* .github: bump dtolnay/rust-toolchain to 1.70

* helix-term: bump rust-version to 1.70

* helix-view/gutter: use checked_ilog10 to count digits

* helix-core/syntax: use MAIN_SEPARATOR_STR constant

* helix-view/handlers/dap: use Display impl for displaying process spawn error

* WIP: helix-term/commands: use checked math to assert ranges cannot overlap
7 months ago
Blaž Hrastnik 811d62d3b3
Revert "Fix precedence of ui.virtual.whitespace (#8750)"
This reverts commit 41b307b673.
7 months ago
chtenb 41b307b673
Fix precedence of ui.virtual.whitespace (#8750) 7 months ago
Bjorn Ove Hay Andersen 47b6c4bc78
Resolve args.files before changing directory (#8676)
* Resolve args.files before changing directory

* Removed the open_cwd work-around now that the path is full

* If -w is specified, use that as the working directory

* Open the remaining files in the argument list, also when the first is a directory

* Use an iterator access the files argument
7 months ago
Matouš Dzivjak 3052050ee0
open urls with goto_file command (#5820)
* feat(commands): open urls with goto_file command

Add capability for `goto_file` command to open an URL under cursor.

Fixes: https://github.com/helix-editor/helix/issues/1472
Superseds: https://github.com/helix-editor/helix/pull/4398

* open files inside helix

* address code review

* bump deps

* fix based on code review comments
7 months ago
Ryan Mehri 6bf5548dbd make increment/decrement exit select mode 7 months ago
Ryan Mehri 09c78e8b4e make switch case commands exit select mode 7 months ago
Ryan Mehri d4a0eba1a7 make align exit select mode 7 months ago
Ryan Mehri 5913073733 make replace with clipboard commands exit select mode 7 months ago
Ryan Mehri 1271a50a82 make paste commands exit select mode 7 months ago
Ryan Mehri 34de1cab62 make indent/unindent exit select mode 7 months ago
Yomain e868678139
Add command to move files with LSP support (#8584)
* Added rename command

* Added an error if the new path already exists

* Fixed wrong command name being used

* fixed clippy suggestions

* removed didRenameFiles call, fixed early return due to path Err

* added ':rnm' alias to ':rename'

* code cleanup

* formatting

* removed debug line

* cargo fmt

* Improved new buffer error message

Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>

* Removed unnecessary path normalizing

Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>

* Update helix-term/src/commands/typed.rs

Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>

* Update helix-term/src/commands/typed.rs

Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>

* Update helix-term/src/commands/typed.rs

Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>

* Update helix-term/src/commands/typed.rs

Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>

* feat: change `rename` command to `move`

* feat: add multi lsp support when moving files

* feat: allow lsp calls with a custom timeout

* feat: sending lsp file_changed event once file has moved

---------

Co-authored-by: ontley <theontley@gmail.com>
Co-authored-by: ontley <67148677+ontley@users.noreply.github.com>
Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>
8 months ago
Skyler Hawthorne 10b178e94b
swap yank command registers (#8708)
#8703 swapped the `+` and `*` registers, but did not swap them in the
corresponding yank commands.
8 months ago
Ryan Mehri d0430f1c81
Only render preview if picker has a preview function (#8667) 8 months ago
Paul Olteanu 8d44459c6a
Add helix-specific ignore files (#8099) 8 months ago
Bjorn Ove Hay Andersen e6d2835b09
Fixed issue when the first file specified as an argument was a relative directory (#8520) 9 months ago
Yomain cd591647ec
fix(lsp): ensure we only highlight diagnostics for lsp with the feature enabled (#8551) 9 months ago
Lorenzo Bellina d9d7f67898
Add support for showing all LSPs in --health (#7315)
* Add support for showing all LSPs in --health <lang>

* Add support for showing all LSPs in --health languages

* Use available/configured in --health languages

* Apply @AlexanderBrevig suggestion in --health

* Update `--health <language>`

Better output (inspired by #8156).

Handle the case where no LSPs are configured.

* Display all LSPs in `--health languages` instead of x/x

Displays all LSPs as a list in the table generated wih `--health languages`

* Make check_binary accept Optional references to str

Avoids some calls to .clone()

* Apply @the-mikedavis suggestions

* Avoid useless collecting and cloning

* Use for loop instead of .try_for_each()
9 months ago
Bjorn Ove Hay Andersen 07a006d1d5
Add +N CLI argument to jump to first file's line number (#8521)
* Accept +num flag for opening at line number

* Update +N argument feature according to feedback in original PR #5603

* Only override the line number of the first file if +N is specified

---------

Co-authored-by: Nachum Barcohen <38861757+nabaco@users.noreply.github.com>
9 months ago
Bjorn Ove Hay Andersen a857480561
Set the working directory before loading the config (#8498) 9 months ago
Lloyd Bond 75c0a5ceb3
enable starting hx with a working directory (#8223)
* added working path arg to cli and help menu

* improve working path cli arg handling

* enable hx to set the working path

* applied cargo formatting

* improved code from cargo clippy suggestion

* improved code from follow up review

* fix for -w <path> is set but args.files is empty

* improved formatting of --help output
9 months ago
Michael Davis 01e281ce10
markdown: Recognize `<code>` tags with attributes as code (#8397) 9 months ago
A-Walrus f520b16fca
Style Bold/Italic/Strikethrough markdown in docs (#8385)
* Style Bold/Italic/Strikthrough markdown in docs

* Flatten to single match
9 months ago
Pascal Kuthe 13d4463e41 correctly center items in picker preview 10 months ago
Pascal Kuthe e9d0bd7aef fix crash in picker preview for invalid ranges 10 months ago
Em Zhan 7090555dab
Add `insert-final-newline` config option (#8157)
Co-authored-by: Xalfer <64538944+Xalfer@users.noreply.github.com>
10 months ago
Luke Halasy b959162ceb
Add tree-sitter-highlight-name command (#8170)
* adds treesitter-highlight-name command

* commit documentation changes

* moves the get_highlight_name function into core/syntax

* rename get_highlight_name function to get_highlight_for_node_at_position

* addresses pr comments: moves fn into helper fn, simplifies a lot

* commit updated documentation changes

* changes scope method to return &str so that callers can decide whether or not to own
10 months ago
Pascal Kuthe eb9c37844c
fix syntax highlights in dynamic picker (#8206) 10 months ago
Weiyuan Wu 8017bb2999
add redraw command (#6949)
Co-authored-by: Roberto Vidal <vidal.roberto.j@gmail.com>
10 months ago
Michael Davis c0fd8bc61b
Fix Clone definition for Injector (#8194) 10 months ago
Pascal Kuthe e6cdc5f9d3
Don't use word splitting during fuzzy matching (#8192) 10 months ago
Pascal Kuthe 0cfd46c14f
Do not show (running) when opening picker (#8148)
* only stream from background thread if necessary

If the file transversal is longer shorter 30ms it will now be performed
on the main thread. Spawning a thread can take a while (or rather it
takes a while until that thread is scheduled) so the files can actually
take a while to show up. This prevents the `(running)` indicator from
briefly showing up when opening the file picker in a small directory.

* run partial cargo update
10 months ago