Commit Graph

3048 Commits (43761d426cb0c508bfcea93c4bf1d08949e6c7c1)
 

Author SHA1 Message Date
Gokul Soumya 970a111aa3 Extract markdown code block highlighting function 3 years ago
Blaž Hrastnik 5a60989efe
Bump dependencies 3 years ago
dependabot[bot] 9a04064373
build(deps): bump tree-sitter from 0.20.4 to 0.20.5 (#1770)
Bumps [tree-sitter](https://github.com/tree-sitter/tree-sitter) from 0.20.4 to 0.20.5.
- [Release notes](https://github.com/tree-sitter/tree-sitter/releases)
- [Commits](https://github.com/tree-sitter/tree-sitter/compare/v0.20.4...v0.20.5)

---
updated-dependencies:
- dependency-name: tree-sitter
  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>
3 years ago
dependabot[bot] b67686d318
build(deps): bump once_cell from 1.9.0 to 1.10.0 (#1768)
Bumps [once_cell](https://github.com/matklad/once_cell) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/matklad/once_cell/releases)
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/matklad/once_cell/compare/v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: once_cell
  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>
3 years ago
dependabot[bot] 0d0165b76e
build(deps): bump actions/checkout from 2 to 3 (#1767)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years ago
dependabot[bot] 1493ff7657
build(deps): bump actions/upload-artifact from 2.3.1 to 3 (#1766)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2.3.1 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2.3.1...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years ago
Gokul Soumya b0aaf08995
Change parameter object keybind from `p` to `a` (#1708)
This is largely to avoid a collision with the soon
to be merged paragraph object which takes up the p key.
3 years ago
Blaž Hrastnik 79caa7b72b
Add helix-term as default-members 3 years ago
Blaž Hrastnik 19247ff0ec
Split out typable commands into a separate file 3 years ago
Daniel S Poulin 9bfb0caf1b
Add comment textobject for surround selection and navigation (#1605) 3 years ago
chunghha 7633c5acd3
chore(theme): apply renamed infobox theme scopes for rose_pine themes (#1754) 3 years ago
Michael Davis f1e90ac2e3
update helix-syntax revision in flake.nix (#1747)
closes #1746

The queries for Go were updated in ddbf03613d.
The old ref was before this commit, so running helix from the flake

    nix flake run github:helix-editor/helix/d62ad8b595a4f901b9c5dba1bb6e8f70ece395bf -- path/to/file.go

will crash because the old grammar's query analysis will fail (because `iota`
was not yet a named node).

This commit updates the version of the grammars that we pull down when building
the flake so that the queries match the grammars. We'll have to do an update like
this whenever a grammar is bumped in a breaking way (which happens fairly often
in tree-sitter) until #1659 comes along and the version of the grammar becomes
tied to the version declared in source.
3 years ago
Blaž Hrastnik d62ad8b595
fix: text_pos_at_screen_coords tests 3 years ago
Blaž Hrastnik fd02d1bf89
Fix tab rendering to use dynamic tab width
Each tab is just wide enough to round to the nearest tab stop.

Refs #1243
3 years ago
Blaž Hrastnik 5f386fa355
Remove TODO.md
The file predates open-sourcing and we managed to implement most
of it by now. The remaining features have tracking issues.

Fixes #1155
3 years ago
Blaž Hrastnik 5d14f56fa9
Reuse visual_coords_at_pos function in view 3 years ago
Gokul Soumya 74a9dd51ff
Fallback to broader scope if theme scope not found (#1714) 3 years ago
Gokul Soumya c484b08923
Rename infobox theme scopes (#1741)
This makes it play nicely with https://github.com/helix-editor/helix/pull/1714
3 years ago
Blaž Hrastnik 0062af6a19
minor: Remove some outdated comments 3 years ago
Blaž Hrastnik 737282d0e9
Extract a common function for paste_before/_after 3 years ago
Blaž Hrastnik 376d99a51d
core: transaction: Resolve some TODOs 3 years ago
Blaž Hrastnik adf97e088e
Simplify get_clipboard_provider by defining one per host 3 years ago
Blaž Hrastnik 68bad148a5
Extract idle timeout code into ui/editor.rs 3 years ago
Blaž Hrastnik 78fba8683b
Picker performance improvements 3 years ago
Erin Kim 0ff3e3ea38
Add `inputs.nixpkgs.follows` to `rust-overlay` in `flake.nix` (#1729)
* add `inputs.nixpkgs.follows` to `rust-overlay`

* Update flake.lock
3 years ago
Blaž Hrastnik c0b86afdc8 Refactor align_selection by simplifying the calculation 3 years ago
Bob Qi 1c1aee74b4 refactor align_selection using kakoune logic 3 years ago
Gokul Soumya 5c810e5e52
Fix bug with auto replacing components in compositor (#1711)
* Fix bug with auto replacing components in compositor

This was last known to be working with 5995568c at the
time of commit, but now doesn't work with latest rust
stable.

The issue probably stems from using
std::any::type_name() for finding a component in the
compositor, for which the docs explicitly warn against
considering it as a unique identifier for types.

`replace_or_push()` takes a boxed `Component` and
passes it to `find_id()` which compares this with a
bare Component. `type_name()` returns `Box<T>` for
the former and `T` for latter and we have a false
negative. This has been solved by using a generics
instead of trait objects to pass in a `T: Component`
and then use it for comparison.

I'm not exactly sure how this worked fine at the
time of commit of 5995568c; maybe the internal
implementation of `type_name()` changed to properly
indicate indirection with Box.

* Do not compare by type name in compositor find_id
3 years ago
Blaž Hrastnik 86b1236b46
Fix cachix.yml definition 3 years ago
Michael Davis 227e0108e9
add workflow for pushing nix flake artifacts to Cachix (#1721)
* add workflow for pushing nix flake artifacts to Cachix

* add docs on using the cachix cache from nix

* remove submodule clone from cachix workflow

* remove flake check
3 years ago
Michael Daffin a76e94848a
Add terraform lsp support (#1726)
Using terraform-ls and enables auto-formate support. Also adds tfvars as an extra filetype.
3 years ago
Philipp Mildenberger 49c5bc5934
Add jumplist support for the search (closes #1625) (#1718) 3 years ago
Mateusz S. Szczygieł 14e2ced440
Make repeat operator work with completion edits (#1640)
* 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>
3 years ago
Gokul Soumya e83cdf3fd3 Ensure non empty grouped nodes in textobject queries 3 years ago
Gokul Soumya e6c36e82cf Allow capturing multiple nodes in textobject queries
Treesitter captures can contain multiple nodes like so:

```
(line_comment)+ @comment
```

This would match each line in a comment as a separate
`@comment` capture when what we actually want is the
whole set of contiguous `line_comment` nodes to be
captured under the `@comment` capture. This commit enables
this behaviour.
3 years ago
Daniel S Poulin 78d37fd332
Implement bulk buffer closing commands (#1677)
* Implement buffer-close-all

* Implement buffer-close-others

* Refactor all buffer close variants to use shared logic

* Fix clippy lint

* Docgen for new commands

* Shorten error message for attempting to close buffers that don't exist

* Refactor shared buffer methods to pass only editor, not whole compositor

* Switch signature of bulk buffer closing to use slice of DocumentIds

Addresses feedback that accepting an IntoIterator implementor is too
much for an internal. Also possibly saves some moving?
3 years ago
Ludwig Stecher 59c691d2db
Highlight matching text in file picker suggestions (#1635)
* Highlight matching text in file picker suggestions

* Remove cache, specialize highlighting code

* Fix outdated comments
3 years ago
Daniel S Poulin b13d44156c
Show infobox to hint textobjects with `mi` and `ma` (#1686)
* 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>
3 years ago
Daniel S Poulin bdbf423876
Minor cleanup of file picker file gathering logic (#1683)
* Refactor file picker filetype filter logic to remove panic, make clearer

An unwrap was unneccesarily present due to a prior contribution of mine
which was before I had any understanding of error handling in Rust. I've
also swapped a match for an if let, as was originally suggested in the
original pull request adding filetype filtering, but was merged before I
could address.

* Add some comments to the file picker code for clarity

* Switch to expect instead of ignoring type def error
3 years ago
Philipp Mildenberger 7bb1db3ab5
Bring configuration documentation up to date (missing editor.search section) (#1719) 3 years ago
dependabot[bot] 0846822371
build(deps): bump smartstring from 0.2.10 to 1.0.0 (#1722)
Bumps [smartstring](https://github.com/bodil/smartstring) from 0.2.10 to 1.0.0.
- [Release notes](https://github.com/bodil/smartstring/releases)
- [Changelog](https://github.com/bodil/smartstring/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bodil/smartstring/compare/v0.2.10...v1.0.0)

---
updated-dependencies:
- dependency-name: smartstring
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years ago
Triton171 f044059a2a
Implement LSP `workspace/configuration` and `workspace/didChangeConfiguration` (#1684)
* Implement LSP `workspace/configuration` request

* Implement LSP `workspace/didChangeConfiguration` notification.

* Simplify retrieval of LSP configuration

* Implement suggestions from PR discussion

Co-authored-by: Triton171 <triton0171@gmail.com>
3 years ago
Gokul Soumya c15996aff5
Show surround delete and replace errors in editor (#1709)
* Refactor surround commands to use early returns

* Show surround delete and replace errors in editor
3 years ago
chunghha f9ad1cafdc
chore(theme): fix "ui.selection" for rose_pine themes (#1716) 3 years ago
Michael Davis 39f7ba36e0
ignore Enter keypress when menu has no selection (#1704)
* ignore Enter keypress when menu has no selection

supersedes #1622

Builds on the work in #1285. I want to allow Enter to create a newline
when there is no selection in the autocomplete menu.

This occurs somewhat often when using LSP autocomplete in Elixir which
uses `do/end` blocks (and I set the autocomplete menu delay to 0 which
exacerbates the problem):

```elixir
defmodule MyModule do
  def do_foo(x) do
    x
  end
  def other_function(y) do|
end
```

Here the cursor is `|` in insert mode. The LSP suggests `do_foo` but I
want to create a newline. Hitting Enter currently closes the menu,
so I end up having to hit Enter twice when the module contains any
local with a `do` prefix, which can be inconsistent. With this change,
we ignore the Enter keypress to end up creating the newline in this case.

* pop compositor layer when ignoring Enter keypress

* move closing function out of consumed event result closure

* explicitly label close_fn as an 'Option<Callback>'
3 years ago
Gregory Oakes c1251aecc7
Fix duplicate "ui.help" key. (#1713) 3 years ago
Blaž Hrastnik 6a6a9ab2b3
fix: theme: bogster: Only primary selection had a cursor style 3 years ago
Blaž Hrastnik 78a6f77e99
Work around a nix-direnv issue
https://github.com/nix-community/nix-direnv/issues/109
3 years ago
Blaž Hrastnik 66637be700
Add an optimised release profile 3 years ago
Gokul Soumya 8e07e1b898
Alert if LSP is inactive when command is invoked (#1703) 3 years ago