Commit Graph

38 Commits (9c4c66d41758013fbfbd11f5096166d90c32ec12)

Author SHA1 Message Date
TiredTumblrina 94a9c81eb0
Prevent improper files (like /dev/random) from being used as file arguments (#10733)
* Implement check before adding path to files

* fix problem where directories were removed from args.files

* Revert "Implement check before adding path to files"

This reverts commit c123944d9b.

* Dissallow opening of irregular non-symlink files

* Fixed issue with creating new file from command line

* Fixed linting error.

* Optimized regularity check as suggested in review

* Created DocumentOpenError Sum Type to switch on in Application

* Forgot cargo fmt

* Update helix-term/src/application.rs

Accept suggestion in review.

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

* Moved thiserror version configuration to the workspace instead of the individual packages.

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
5 months ago
Pascal Kuthe b834806dbc use newtype parttern for langauge server id 7 months ago
Michael Davis 2cadec0b11
Add changelog notes for 24.03 (#9946)
* changelog: Checkpoint 2024-03-20

commit: b8e79c0ef5

* Bump the version to 24.3.0

* changelog: Checkpoint 2024-03-25

commit: 614a744d24

* Address review comments

* changelog: Checkpoint 2024-03-30

commit: 64c1de1988

* Adjust release day to 2024-03-30

* Linkify
7 months ago
Michael Davis 38af99f05f Bump tree-sitter to 0.22.2 8 months ago
Michael Davis 1f916e65cf Create helix-stdx crate for stdlib extensions
helix-stdx is meant to carry extensions to the stdlib or low-level
dependencies that are useful in all other crates. This commit starts
with all of the path functions from helix-core and the CWD tracking that
lived in helix-loader.

The CWD tracking in helix-loader was previously unable to call the
canonicalization functions in helix-core. Switching to our custom
canonicalization code should make no noticeable difference though
since `std::env::current_dir` returns a canonicalized path with
symlinks resolved (at least on unix).
10 months ago
Michael Davis 3011df4f35
Bump tree-sitter to latest master (#9317)
* query capture names now return `&str`s rather than `String`s
* the `#any-of?` predicate is now supported
10 months ago
Skyler Hawthorne bf7c4e1659
use workspace inheritance for common version (#8925) 11 months ago
Fomalhaut Weisszwerg b7f98d1d99
set Cargo feature resolver to v2 (#8917)
* fix: version of Cargo feature resolver.

This commit solve the ambiguity to determin the version of resolver.
To get more detail, see the following two documents:

- https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions
- https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html

* unified: Rust edition in all workspaces.

Now, the Rust 2021 is available in all workspaces.

* fined up: Cargo.toml by using workspace inheritance.

To get more detail of the `workspace.package` table, see a following document:

- https://doc.rust-lang.org/cargo/reference/workspaces.html#the-package-table
12 months ago
Blaž Hrastnik 5ce1c30f77
Revert "Pin tree-sitter to the 0.20.10 release (#8396)"
We only reverted so that the latest release would use a stable
tree-sitter version hosted on crates.io. We do want the improvements
on nightly.

This reverts commit 2ebcc4dbeb.
1 year ago
Michael Davis 2ebcc4dbeb
Pin tree-sitter to the 0.20.10 release (#8396) 1 year ago
Pascal Kuthe 0cb595e226
transition to nucleo for fuzzy matching (#7814)
* transition to nucleo for fuzzy matching

* drop flakey test case

since the picker streams in results now any test that relies
on the picker containing results is potentially flakely

* use crates.io version of nucleo

* Fix typo in commands.rs

Co-authored-by: Skyler Hawthorne <skyler@dead10ck.com>

---------

Co-authored-by: Skyler Hawthorne <skyler@dead10ck.com>
1 year ago
Michael Davis 01a1e5ec2a
Update tree-sitter to latest master (#7998) 1 year ago
Pascal Kuthe 262a595e53
pin TS to unreleased git revision to fix freezes (#7737) 1 year ago
Michael Davis fc4ca96c29
Update tree-sitter to v0.20.10 (#6608)
We used a git dependency to take advantage of the latest fixes in
master but a new release is now available:
https://crates.io/crates/tree-sitter/0.20.10
2 years ago
Michael Davis c8e6857aff Add a parser-combinator crate
Parser-combinators are one of the simpler tools for building ad-hoc
parsers. They're a good fit because they are...

* Small: each parser / parser-combinator is around 10 LOC.
* Functional: helix_core strives to be a functional set of utilities
  usable throughout the rest of the editor.
* Flexible: use them to build any sort of ad-hoc parser. In the child
  commit, we'll parse LSP Snippet syntax using these new parser
  combinators.

Why not use an existing parser-combinator crate? Existing popular
parser-combinator crates have histories of making breaking changes
(for example nom and combine).

> Implementation note: I tried to not introduce a new trait since the
> types can be expressed in terms of `impl Fn`s. The trait is necessary
> to build `seq` implementations without a proc macro though, and also
> allows us to use `&'static str`s very conveniently: see the trait
> implementation for `&'static str`.
2 years ago
Michael Davis 136d1164e0
Pin tree-sitter at git master (#6218)
Tree-sitter has some unreleased improvements that can speed up small
queries and prevent hangs due to error recovery in some parsers. This
change pins tree-sitter to the latest master.

Neovim also pins tree-sitter to a commit on master.
2 years ago
Skyler Hawthorne b2e83f81e1
enable rendering in integration tests (#5819)
This will allow testing more of the code base, as well as enable UI-
specific testing.

Debug mode builds are prohibitively slow for the tests, mostly
because of the concurrency write tests. So there is now a profile for
integration tests that sets the optimization level to 2 for a few helix
crates, and lowers the number of rounds of concurrent writes to 1000.
2 years ago
Pascal Kuthe 5a3ff74221
Show (git) diff signs in gutter (#3890)
* Show (git) diff signs in gutter (#3890)

Avoid string allocation when git diffing

Incrementally diff using changesets

refactor diffs to be provider indepndent and improve git implementation

remove dependency on zlib-ng

switch to asynchronus diffing with similar

Update helix-vcs/Cargo.toml

fix toml formatting

Co-authored-by: Ivan Tham <pickfire@riseup.net>

fix typo in documentation

use ropey reexpors from helix-core

fix crash when creating new file

remove useless use if io::Cursor

fix spelling mistakes

implement suggested improvement to repository loading

improve git test isolation

remove lefover comments

Co-authored-by: univerz <univerz@fu-solution.com>

fixed spelling mistake

minor cosmetic changes

fix: set self.differ to None if decoding the diff_base fails

fixup formatting

Co-authored-by: Ivan Tham <pickfire@riseup.net>

reload diff_base when file is reloaded from disk

switch to imara-diff

Fixup formatting

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>

Redraw buffer whenever a diff is updated.

Only store hunks instead of changes for individual lines to easily allow
jumping between them

Update to latest gitoxide version

Change default diff gutter position

Only update gutter after timeout

* update diff gutter synchronously, with a timeout

* Apply suggestions from code review

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

* address review comments and ensure lock is always aquired

* remove configuration for redraw timeout

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2 years ago
Kirawi 772af7ffb1
remove `split-debuginfo` setting (#3691)
According to [the rustc book](https://doc.rust-lang.org/rustc/codegen-options/index.html#split-debuginfo), this is not supported on Windows. It also prevents Helix from compiling on the latest nightly.
2 years ago
Michael Davis 4fc991fdec migrate grammar fetching/building code into helix-loader crate
This is a rather large refactor that moves most of the code for
loading, fetching, and building grammars into a new helix-loader
module. This works well with the [[grammars]] syntax for
languages.toml defined earlier: we only have to depend on the types
for GrammarConfiguration in helix-loader and can leave all the
[[language]] entries for helix-core.
3 years ago
Michael Davis eeb3f8e963 migrate helix-syntax crate into helix-core and helix-term
helix-syntax mostly existed for the sake of the build task which
checks and compiles the submodules. Since we won't be relying on
that process anymore, it doesn't end up making much sense to have
a very thin crate just for some functions that we could port to
helix-core.

The remaining build-related code is moved to helix-term which will
be able to provide grammar builds through the --build-grammars CLI
flag.
3 years ago
Blaž Hrastnik 79caa7b72b
Add helix-term as default-members 3 years ago
Blaž Hrastnik 66637be700
Add an optimised release profile 3 years ago
Blaž Hrastnik bd549d8a20 Merge remote-tracking branch 'origin/master' into debug 3 years ago
Blaž Hrastnik df0d58e9f7 Set flags necessary for cargo-flamegraph 3 years ago
Gokul Soumya 71292f9f11 docs: Auto generate command list 3 years ago
Blaž Hrastnik d1854d8e6a Merge remote-tracking branch 'origin/master' into debug 3 years ago
Blaž Hrastnik cccc1949eb Enable thin LTO
It compiles about half a second slower for me, so it seems fine to use
by default.
3 years ago
Dmitry Sharshakov ba96f5d296
Format Cargo.toml 3 years ago
Dmitry Sharshakov 0f6e81b85b Initial debug adapter protocol implementation 3 years ago
Blaž Hrastnik 35606a3daa Inline tui as helix-tui fork.
We only rely on some of the rendering primitives and implement our
Cursive-style compositor on top.
4 years ago
Blaž Hrastnik a323155b99 Faster dev builds on OSX if using Rust 1.51. 4 years ago
Blaž Hrastnik 8adcf5083f wip 4 years ago
Blaž Hrastnik 935cfeae57 Split parts of helix-term into helix-view.
It still largely depends on term for some types but I plan to change
that later.
4 years ago
Blaž Hrastnik 088f8a82af Incremental parsing: rough draft. 4 years ago
Blaž Hrastnik a106be94f1 Refactor a little bit. 4 years ago
Blaž Hrastnik 7eac12a4bb Add helix-syntax as a wrapper around tree-sitter parsers. 4 years ago
Blaž Hrastnik 240e5f4e3d Initial import. 5 years ago