Commit Graph

4358 Commits (a863fd89e149ae698f1c7d1d493cc4197abd430a)
 

Author SHA1 Message Date
Pascal Kuthe ba24cfe912 Delete snippet placeholders when accepting completion
When accepting a snippet completion we automatically delete the
placeholders for now as doing so manual is quite cumbersome. In the
future we should keep these as a mark + virtual text that is
automatically removed once the cursor moves there.
1 year ago
Urgau ded4381728 Implement LSP snippet tabstops sorting and merging 1 year ago
Michael Davis d2af31b916 LSP: Advertise snippet support 1 year ago
Michael Davis b9b1ec2208 Apply snippets as transactions 1 year ago
Urgau 3f90dafa3c Remove now unused the pattern combinator 1 year ago
Urgau e973b71c83 Optimize LSP snippet parsing 1 year ago
Michael Davis 9c12e0fb76 Add parser for LSP snippet 1 year 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`.
1 year ago
Davide Galassi f976c004e2
Allow LSP server to be stopped (#5964) 1 year ago
Erasin Wang 0e5a4e55a4
Update highlights for golang (#6204)
- update tree-sitter-go
- refine keywords
- set package as namespace
- add label
1 year ago
Erasin Wang 622f90a157
Update highlight for PHP (#6203)
- update tree-sitter-php
- add basic types, operator
- refine keyword
1 year 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.
1 year ago
dependabot[bot] 84be5cd52c
build(deps): bump grep-regex from 0.1.10 to 0.1.11 (#6215)
Bumps [grep-regex](https://github.com/BurntSushi/ripgrep) from 0.1.10 to 0.1.11.
- [Release notes](https://github.com/BurntSushi/ripgrep/releases)
- [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/ripgrep/compare/grep-regex-0.1.10...0.1.11)

---
updated-dependencies:
- dependency-name: grep-regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 year ago
dependabot[bot] 8228fb0cf7
build(deps): bump tokio from 1.25.0 to 1.26.0 (#6212)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.25.0 to 1.26.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.25.0...tokio-1.26.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 year ago
dependabot[bot] 2417ac8a4b
build(deps): bump thiserror from 1.0.38 to 1.0.39 (#6216)
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.38 to 1.0.39.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.38...1.0.39)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 year ago
dependabot[bot] 53c8dcea5b
build(deps): bump ignore from 0.4.18 to 0.4.20 (#6214)
Bumps [ignore](https://github.com/BurntSushi/ripgrep) from 0.4.18 to 0.4.20.
- [Release notes](https://github.com/BurntSushi/ripgrep/releases)
- [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/ripgrep/compare/ignore-0.4.18...ignore-0.4.20)

---
updated-dependencies:
- dependency-name: ignore
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 year ago
dependabot[bot] b1e7d4d9a0
build(deps): bump serde_json from 1.0.93 to 1.0.94 (#6211)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.93 to 1.0.94.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.93...v1.0.94)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 year ago
dependabot[bot] c00baf7da6
build(deps): bump grep-searcher from 0.1.10 to 0.1.11 (#6213)
Bumps [grep-searcher](https://github.com/BurntSushi/ripgrep) from 0.1.10 to 0.1.11.
- [Release notes](https://github.com/BurntSushi/ripgrep/releases)
- [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/ripgrep/compare/grep-searcher-0.1.10...0.1.11)

---
updated-dependencies:
- dependency-name: grep-searcher
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 year ago
workingj 77d6ed150c
feat(theme): Update pop-dark for color-modes (#6208) 1 year ago
Erasin Wang bc50502b1e
Update highlight for ecma/js/ts (#6205) 1 year ago
Erasin Wang cfb9986d84
Update onelight theme (#6192) 1 year ago
David Else 707457c632
Rewrite and refactor all documentation (#5534)
* Rewrite and refactor all documentation

* Rewrite and refactor the guides

* update runtime directory instructions for windows

* Update the Ubuntu 3rd party repo section with 22.10

* Merge from upstream

* Rewrite and refactor all documentation

* Apply suggestions from code review

Apply the suggestions that can be committed from the GitHub web interface.

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

* Add Windows themes folder

Co-authored-by: digidoor <37601466+digidoor@users.noreply.github.com>

* Apply the rest of the suggestions from the code review

* Revert "Apply the rest of the suggestions from the code review"

This reverts commit 498be1b7a1aec3ff567b95130148628beeef9b77.

* Revert "Merge branch 'rewrite-and-refactor-all-documentation' of github.com:David-Else/helix into rewrite-and-refactor-all-documentation"

This reverts commit 7c8404248ffef73b80b9051d5a4359c5bcfa5d1a, reversing
changes made to d932969cfc9fadda12a74cc01665919dee7152fb.

* Apply code review suggestions

* Changes after re-reading all documents

* Missed a full stop

* Code review suggestions and remove macOS and Windows specific sections

* Add OpenBSD to heading

* Add back macOS and Windows sections and further simplify and improve

* Change wording to nightly

* Remove README installation section and turn into a link

* Simplify building from source and follow code review suggestions

* Code review revisions

* Fix copy paste mistake

* Apply the latest code review suggestions

* More small code review items

* Change minor modes for code review

* Fix link and typos

* Add note that you need a c++ compiler to install the tree-sitter grammars

* Add pacman example

* Make sure all headings are lower case

* Revert to the original passage adding a reference to Windows that was missing

* Update book/src/guides/adding_languages.md

Fix grammar typo

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

* Update book/src/install.md

Fix tree sitter typo

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

* Remove TOC links to main heading

---------

Co-authored-by: CptPotato <3957610+CptPotato@users.noreply.github.com>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Co-authored-by: digidoor <37601466+digidoor@users.noreply.github.com>
1 year ago
cinerea0 5ebe1014ac
docs: describe tab-width and unit subkeys (#5862) 1 year ago
Filip Dutescu 376c19e06b
feat(dap): implement Restart request (#5651)
Add a restart debug session command, which would issue a
[Restart Request][1], if the debugger supports it and a session is
running. It uses the same arguments and requests used to start the
initial session, when recreating it.

It builds upon #5532, making use of the changes to the termination
workflow of a session.

[1]: https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Restart

Closes: #5594

Signed-off-by: Filip Dutescu <filip.dutescu@gmail.com>
1 year ago
Santiago Vrancovich 39d5fb0e59
Remove centering view from Unimpaired commands (#6193)
Remove `align_view` calls from `goto_*_diag` as per issue #6177
1 year ago
Erasin Wang e6597bc992
Update queries for godot4 (#6186) 1 year ago
nuid32 def26966d2
Fix lacking space panic (#6109)
* Fix lack of space for popup crash

* Fix saturating -> wrapping

* Fix wrapping -> saturating (I am an idiot)

* Remove useless "mut" in helix-tui/src/buffer.rs

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

* Remove redundant bound-check

* Return bound-check back

* Add bound-check for set_style

* Remove set_style bound-check

* Revert bound-check

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
1 year ago
Pascal Kuthe ccdb144665 update MSRV to 1.65 1 year ago
Sebastian Thiel 5b4e73f37d Update helix-vcs/Cargo.toml
Co-authored-by: Ivan Tham <pickfire@riseup.net>
1 year ago
Sebastian Thiel ac9e0b39f2 upgrade `git-repository` to `gix` 0.36.1; up min. rustc version to 1.64
This fixes breakage when installing `helix` due to an incorrect usage of
`as_ref()` when interacting with `bstr` in the `gitoxide` codebase.

However, this upgrade also requires a higher rustc version, as `gitoxide`
recently updated its `windows` crate version.
1 year ago
Roberto Vidal 725d9aecf0
Add support for reStructuredText (#6180) 1 year ago
Henrik Tjäder cf153080d7
Theme: Papercolor: Add ui.highlight (#6162)
Using the picker with syntax highlighting the
fallback `ui.selection` makes a lot of text,
especially for the light variant, hard to read.

Instead, use a lighter background for highlights
1 year ago
Alexander Brevig a2e54167d8
fix: Handle signals before crossterm events (#6170)
This is a workaround for a freeze when suspending Helix with C-z on
non-Windows systems. The check for the keyboard enhancement protocol
locks up crossterm's internal event reading/polling system by trying to
set up multiple concurrent readers. `input_stream.next()` sets up one
reader looking for regular crossterm events while the
`supports_keyboard_enhancement` query sets up another looking for
internal events. The latter hangs for two seconds or until the former
yields an event. By handling signals first we don't lock up the mutex
by trying to read keyboard events.
1 year ago
Nick bf872366fd
Document the file-modification-indicator statusline element (#6036) 1 year ago
Matthias Q 2bd8bc8d84
feat(prql): add prql support (#6126) 1 year ago
Pascal Kuthe 5c716af7a2
Fix scrolloff at view bottom (#6142)
Fixes a regression introduced in #5420 where a scrolloff of `x - 1`
was used instead if `x` at the bottom of the screen. This was
especially problematic if the scrolloff was set to `0` in that case
the scrolloff behaved as tough set to `-1` and the cursor disappeared
from the view if scrolled to the botoom.
1 year ago
István Donkó 2d5577dbe6
Extend the set of tags highlighted in comments (#6143) 1 year ago
nuid32 ddc5bf4e60
Fix 'attempt to divide by zero' panic (#6155) 1 year ago
Michael Davis 6e7dcb3317
CI: Update cachix/install-nix-action to v20 (#6163)
This fixes an issue with installing Nix 1.14 which causes the
cachix/cachix-action in the next step to fail.
1 year ago
Andrey Grebenyk 0625f410eb
Add graphql schema file type (#6159)
Co-authored-by: Andrey Grebenyk <GrebenyukAE@ugpa.ru>
1 year ago
NomisIV c082ef2863
Fix indentation lines (#6134) (#6136) 1 year ago
Michael Davis 27211abf06
Ignore key-release keyboard events (#6139)
Since crossterm 0.26.x, we receive press/release keyboard events on
Windows always. We can ignore the release events though to emulate
the behavior of keyboard input on Windows on crossterm 0.25.x.
1 year ago
lesleyrs 8dab8a0a03 Add shift-backspace keybind alias for backspace (#4937)
When the Kitty Keyboard Protocol is enabled, S-backspace is
distinguished from backspace with no modifiers. This is awkward when
typing because it's very easy to accidentally hold shift and press
backspace temporarily when typing capital letters.

Kakoune (which is also a Kitty Keyboard Protocol application) treats
S-backspace as backspace too:
3150e9b3cd/src/input_handler.cc (L1275)
1 year ago
Michael Davis a066815833 Enable the enhanced keyboard protocol if supported 1 year ago
Michael Davis 79bf5e3094 Update crossterm to 0.26.1
Crossterm 0.26.x includes a breaking change for the command to set the
cursor shape. This commit includes a change which uses the new type.
1 year ago
Mathieu Agopian a976786a4f
book: Document <space>h and <space>g (#6124) 1 year ago
Mofiqul 5ef3f5f59f
theme: Add Adwaita Dark (#6042) 1 year ago
Isotoxal 7b8daae395
theme: Add Everblush (#6086) 1 year ago
dependabot[bot] f02fdd2f73
build(deps): bump tempfile from 3.3.0 to 3.4.0 (#6128)
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/Stebalien/tempfile/releases)
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/NEWS)
- [Commits](https://github.com/Stebalien/tempfile/commits)

---
updated-dependencies:
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 year ago
luetage cac4a3604c
Kanagawa: fix bufferline, theme wrap-indicators, cursor, menu, and syntax changes (#6085) 1 year ago