aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* Match in visual use head not anchor (#1805)Ivan Tham2022-03-14
| | | | | | Currently match is finding the match based on the anchor rather than the head (cursor) so this behavior is rather unexpected when user is doing a match but a different item was matched instead when the selection is more than one character.
* ci: configure restore-keys for caches (#1806)Michael Davis2022-03-14
| | | | | | | | | | | | | | | | | | | | | | `restore-keys` is a configuration option for the actions/cache action which specifies fallback behavior. The [docs][docs] say it best: > When a cache miss occurs, the action searches for alternate keys > called `restore-keys`. > > If you provide `restore-keys`, the `cache` action sequentially > searches for any caches that match the list of `restore-keys`. > ... If there are no exact matches, the action searches for partial > matches of the restore keys. When the action finds a partial match, > the most recent cache is restored to the `path` directory. So this improves caching when there's a miss. For example if I edit `.github/workflows/languages.toml`, the current behavior is that the cache for downloaded grammars will miss and all of them will need to be fetched again. With `restore-keys`, we use the latest published cache as 'good enough', we'll fetch whatever grammars changed, and then at the end we publish a new cache under the new hash. [docs]: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#example-using-the-cache-action
* minor: occurance -> occurrenceBlaž Hrastnik2022-03-14
|
* fix #1808Blaž Hrastnik2022-03-14
|
* Fix: insert_register (#1751)Narazaki Shuji2022-03-13
| | | | | - set register name correctly - use autoinfo to display register contents - call `paste` with `Paste::Cursor`
* Update keymap documentation in the book (#1745)Daniel S Poulin2022-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add missing key bindings to keymap docs * Add a note about readline bindings in insert mode * Rewrite section on selection extend mode We seem to have settled on this model, so no reason to say in the docs that this is experimental. I also don't think we have any movements that don't obey extend mode left. * Fix table formatting * Fix missing command for command palette binding * Fix missed capitalization of descriptions in keymap docs * Be consistent with multiple bindings in keymap docs * Fix differently marked up commands in keymap docs * Make special key capitalization consistent Co-authored-by: Michael Davis <michael.davis@nfiindustries.com> * Fix extra space in docs Co-authored-by: Michael Davis <michael.davis@nfiindustries.com> * A few more capitalizations of special keys in keymap docs * Move a selection manipulation key map to the appropriate section in docs * Move minor mode entry bindings to the minor modes section of keymap docs * Add note about default register used in search commands in keymap docs * Fix formatting of rebased addition * Remove note about potential removal of select mode It's been decided since to keep it Co-authored-by: Michael Davis <michael.davis@nfiindustries.com>
* C# highlighting improvements (#1795)Philipp Mildenberger2022-03-12
|
* Use `^` and `$` to match the beginning and end of a line when searching (#1790)nibon72022-03-12
| | | | | Fixes #1737 Signed-off-by: nibon7 <nibon7@163.com>
* use 'cargo test --workspace' in CI (#1793)Michael Davis2022-03-12
| | | | | | | 79caa7b72bef94bd820758b2ebc20887324f7416 setup helix-term as the default workspace member (which I believe is done to avoid building xtask on every compile). This changes the behavior of 'cargo test' though so that it only runs helix-term tests by default. To run all tests, we switch to 'cargo test --workspace'.
* Add csharp lsp support (#1788)Aaron Housh2022-03-12
| | | | | | | * add csharp lsp support * remove hostPID * update docs
* theme: Use distinct colors for match pair and cursor for gruvbox (#1791)Rohan Jain2022-03-11
|
* remove stray 'println!' from grammar building function (#1785)Michael Davis2022-03-11
|
* fix '--grammar' flag in help text (#1784)Michael Davis2022-03-10
|
* Remove remaining helix-syntax leftoversBlaž Hrastnik2022-03-10
|
* update revision for tree-sitter-rescriptMichael Davis2022-03-10
| | | | | Looks like this was rebased a few hours ago and now the 789a171 revision no longer exists.
* flake: use builtins.fetchTree to shallow-clone grammar reposMichael Davis2022-03-10
| | | | | | | | | | | Here we perform a shallow fetch using builtins.fetchTree. In order to make this work, we need to specify the `ref' for any repository that doesn't have `master' as its default branch (I'm not sure why this limitation exists since we don't need this when performing the shallow fetch in `--grammar build') This `ref' field is ignored by helix, so I have left it undocumented for now, but I could be open to documenting it.
* rename '--fetch/build-grammars' flags into '--grammar fetch/build'Michael Davis2022-03-10
| | | | | The old flags were a bit long. --grammar is also aliased to -g to make it even easier.
* fetch and build grammars with nix in flakeMichael Davis2022-03-10
| | | | | | | | | | | | This commit replaces the out-of-date builder in the flake which relied on submodules for fetching and the compiler for building. Now we disable fetching and building explicitly with the environment variable and then use builtins.fetchGit and a derivation mostly derived from upstream to compile the grammars. Anecdotally, this is still quite slow as builtins.fetchGit does not seem to do shallow clones. I'm not sure I see a way around it though without recording sha256s, which seems cumbersome.
* fetch and compile tree-sitter grammars in helix-term buildMichael Davis2022-03-10
| | | | | | | This restores much of the behavior that existed before this PR: helix will build the grammars when compiling. The difference is that now fetching is also done during the build phase and is done much more quickly - both shallow and in parallel.
* only fetch git-sourced grammarsMichael Davis2022-03-10
| | | | | | This is a bit of a micro-optimization: in the current setup we waste a thread in the pool for a local grammar only to println! a message saying we're skipping fetching because it's a local grammar.
* shallow cloneSkyler Hawthorne2022-03-10
|
* fix context in errorSkyler Hawthorne2022-03-10
|
* migrate grammar fetching/building code into helix-loader crateMichael Davis2022-03-10
| | | | | | | | | 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.
* add 'use-grammars' to languages.tomlMichael Davis2022-03-10
| | | | | | | | The vision with 'use-grammars' is to allow the long-requested feature of being able to declare your own set of grammars that you would like. A simple schema with only/except grammar names controls the list of grammars that is fetched and built. It does not (yet) control which grammars may be loaded at runtime if they already exist.
* ensure rust grammar is available in CIMichael Davis2022-03-10
|
* replace all submodule documentation with flags documentationMichael Davis2022-03-10
|
* implement build_grammars and fetch_grammarsMichael Davis2022-03-10
| | | | | | | | build_grammars adapts the functionality that previously came from helix-syntax to be used at runtime from the command line flags. fetch_grammars wraps command-line git to perform the same actions previously done in the scripts in #1560.
* add --fetch-grammars and --build-grammars CLI flagsMichael Davis2022-03-10
|
* rename tree_sitter_library in LanguageConfig to 'grammar'Michael Davis2022-03-10
| | | | | | | | This is not strictly speaking necessary. tree_sitter_library was used by just one grammar: llvm-mir-yaml, which uses the yaml grammar. This will make the language more consistent, though. Each language can explicitly say that they use Some(grammar), defaulting when None to the grammar that has a grammar_id matching the language's language_id.
* migrate helix-syntax crate into helix-core and helix-termMichael Davis2022-03-10
| | | | | | | | | | | | 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.
* add tree-sitter sources to languages.tomlMichael Davis2022-03-10
| | | | | | | | | | | | | | | | | | | | | | | | | Here we add syntax to the languages.toml languge [[grammar]] name = "<name>" source = { .. } Which can be used to specify a tree-sitter grammar separately of the language that defines it, and we make this distinction for two reasons: * In later commits, we will separate this code from helix-core and bring it to a new helix-loader crate. Using separate schemas for language and grammar configurations allows for a nice divide between the types needed to be declared in helix-loader and in helix-core/syntax * Two different languages may use the same grammar. This is currently the case with llvm-mir-yaml and yaml. We could accomplish a config that works for this with just `[[languages]]`, but it gets a bit dicey with languages depending on one another. If you enable llvm-mir-yaml and disable yaml, does helix still need to fetch and build tree-sitter-yaml? It could be a matter of interpretation.
* remove all submodulesMichael Davis2022-03-10
| | | | | | | | | | | | | | | | | | | | | | | The submodules system is being replaced with a command-line flag hx --fetch-grammars Which shallow-clones grammar repositories at the given revision and hx --build-grammars For building grammars separate of the initial compilation of helix. Why remove submodules? * Cloning helix in general takes a long time because of the submodules, especially when the submodules are not fetched as shallow * Packaging is consistently painful no matter the package-manager * It is quite difficult to devise a scheme where users can declare a desired set of grammars and implement it with submodules This commit fully removes the existing tree-sitter submodules from the tree (as well as the .gitmodules file which is no longer used).
* Add --edit-config flag to directly open config.toml (#1771)Joe2022-03-09
| | | Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
* Update architecture.md (#1750)Daniel S Poulin2022-03-09
| | | | | | | * Update architecture.md Adds some more details on how views work. * Add additional architecture discussion from matrix, written by @sudormrfbin
* Fix bug in LSP when creating a file in a folder that does not exist (#1775)Emil Fresk2022-03-08
|
* Add --health command for troubleshooting (#1669)Gokul Soumya2022-03-08
| | | | | | | | | | | | | | | * Move runtime file location definitions to core * Add basic --health command * Add language specific --health * Show summary for all langs with bare --health * Use TsFeature from xtask for --health * cargo fmt Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* use latest nix-cargo-integration which depends on dream2nix (#1758)Michael Davis2022-03-08
| | | | | | | | https://github.com/nix-community/dream2nix is a fairly new and cool-looking project for adapting upstream package manager outputs (lockfiles mostly it would seem) for nix. This should improve the ability to cross-compile. As a more concrete measure of improvement, `nix flake check' now succeeds 🎉
* Add arrow key mappings for tree-sitter parent/child/sibling nav (#1724)Daniel S Poulin2022-03-08
| | | | | | | | | * Add arrow key mappings for tree-sitter parent/child/sibling nav This helps my use case, where I use a non-qwerty layout with a programmable mechanical keyboard, and use a layer switching key (think fn) to send left down up right from the traditional hjkl positions. * Add new bindings to docs
* Allow highlighting additional spans in md rendererGokul Soumya2022-03-08
|
* Extract markdown code block highlighting functionGokul Soumya2022-03-08
|
* Bump dependenciesBlaž Hrastnik2022-03-08
|
* build(deps): bump tree-sitter from 0.20.4 to 0.20.5 (#1770)dependabot[bot]2022-03-08
| | | | | | | | | | | | | | | | 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>
* build(deps): bump once_cell from 1.9.0 to 1.10.0 (#1768)dependabot[bot]2022-03-08
| | | | | | | | | | | | | | | | | 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>
* build(deps): bump actions/checkout from 2 to 3 (#1767)dependabot[bot]2022-03-08
| | | | | | | | | | | | | | | | | 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>
* build(deps): bump actions/upload-artifact from 2.3.1 to 3 (#1766)dependabot[bot]2022-03-08
| | | | | | | | | | | | | | | | 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>
* Change parameter object keybind from `p` to `a` (#1708)Gokul Soumya2022-03-07
| | | | This is largely to avoid a collision with the soon to be merged paragraph object which takes up the p key.
* Add helix-term as default-membersBlaž Hrastnik2022-03-07
|
* Split out typable commands into a separate fileBlaž Hrastnik2022-03-07
|
* Add comment textobject for surround selection and navigation (#1605)Daniel S Poulin2022-03-06
|
* chore(theme): apply renamed infobox theme scopes for rose_pine themes (#1754)chunghha2022-03-05
|