Commit graph

312 commits

Author SHA1 Message Date
Michael Davis
78b1600943
Improve documentation on Language Server installation (#2037) 2022-04-09 12:17:32 +05:30
Kurenshe Nurdaulet
0b410b0a16
Add default language server for Vue (#2043) 2022-04-08 21:04:22 -05:00
Evan Relf
7779dbfcb8
docs: Quote TOML keys containing dots (#2040) 2022-04-08 17:21:52 -05:00
unrelentingtech
7f461895b0
Add language server command for OCaml (#2035) 2022-04-08 15:02:25 -05:00
Aaron Housh
9caf7c0d5a
Add swift language (#2033) 2022-04-08 13:10:37 -05:00
Karl Grasegger
8e12fd5290
PHP roots and languageserver improvements (#2031)
Co-authored-by: Karl Grasegger <karl.grasegger@gebruederheitz.de>
2022-04-08 12:57:46 -05:00
David
61d1684a32
Add default language server for CSS (#2025) 2022-04-08 10:06:54 -05:00
David
22629ca211
Add default language server for JSON (#2024) 2022-04-08 10:06:41 -05:00
David
b5efb9d66c
Add default language server for HTML (#2018) 2022-04-08 08:36:10 -05:00
Matthew Toohey
31c468ab95
add languages r and rmarkdown (#1998)
* add languages `r` and `rmarkdown`

* r: fix highlights

* rmarkdown: add eof in queries

* rmarkdown: update lang-support.md

* r: fix highlight query precedence
2022-04-08 09:30:44 +09:00
Michael Davis
275c05008f
fix keymap doc typo for 'delete' in insert-mode (#1990)
closes #1980
see also #1180
2022-04-07 00:31:40 +09:00
VuiMuich
eb84d9493c
add language ron (#1925) 2022-04-05 07:39:22 -05:00
Roland Kovacs
d962e06e91
Add runtime language configuration (#1794) (#1866)
* Add runtime language configuration (#1794)

* Add set-language typable command to change the language of current buffer.
* Add completer for available language options.

* Update set-language to refresh language server as well

* Add language id based config lookup on `syntax::Loader`.
* Add `Document::set_language3` to set programming language based on language
  id.
* Update `Editor::refresh_language_server` to try language detection only if
  language is not already set.

* Remove language detection from Editor::refresh_language_server

* Move document language detection to where the scratch buffer is saved.
* Rename Document::set_language3 to Document::set_language_by_language_id.

* Remove unnecessary clone in completers::language
2022-04-05 09:56:14 +09:00
Dr. David A. Kunz
9782204f73
Add typed commands buffer-next and buffer-previous (#1940) 2022-04-03 17:56:46 +05:30
Ivan Tham
8350ee9a0e Add paragraph textobject
Change parameter/argument key from p to a since paragraph only have p
but parameter are also called arguments sometimes and a is not used.
2022-04-03 00:46:53 +09:00
Lauri Gustafsson
e4561d1dde
Add texlab language server for latex (#1922) 2022-04-02 09:00:05 -05:00
Michael Davis
ffdc2f1793
separate JSX queries from javascript (#1921)
It looks like a24fb17b2a (and
855e438f55) broke the typescript
highlights because typescript

    ; inherits: javascript

but it doesn't have those named nodes in its grammar.

So instead we can separate out JSX into its own language and copy
over everything from javascript and supplement it with the new
JSX highlights. Luckily there isn't too much duplication, just the
language configuration parts - we can re-use the parser with the
languages.toml `grammar` key and most of the queries with `inherits`.
2022-04-02 10:07:35 +09:00
Marcin Puc
924462edda
Add install instructions for Void Linux (#1911) 2022-03-31 14:55:55 -05:00
Rohan Jain
5d61631507
Resolve conflicts between prompt/picker bindings (#1792)
Currently, the picker's re-using a few bindings which are also present
in the prompt. This causes some editing behaviours to not function on
the picker.

**Ctrl + k** and **Ctrl + j**
This should kill till the end of the line on prompt, but is overridden
by the picker for scrolling. Since there are redundancies (`Ctrl + p`,
`Ctrl + n`), we can remove it from picker.

**Ctrl + f** and **Ctrl + b**
This are used by the prompt for back/forward movement. We could modify
it to be Ctrl + d and Ctrl + u, to match the `vim` behaviour.
2022-03-31 16:51:11 +09:00
Triton171
58758fee61
Indentation rework (#1562)
* WIP: Rework indentation system

* Add ComplexNode for context-aware indentation (including a proof of concept for assignment statements in rust)

* Add switch statements to Go indents.toml (fixes the second half of issue #1523)
Remove commented-out code

* Migrate all existing indentation queries.
Add more options to ComplexNode and use them to improve C/C++ indentation.

* Add comments & replace Option<Vec<_>> with Vec<_>

* Add more detailed documentation for tree-sitter indentation

* Improve code style in indent.rs

* Use tree-sitter queries for indentation instead of TOML config.
Migrate existing indent queries.

* Add documentation for the new indent queries.
Change xtask docgen to look for indents.scm instead of indents.toml

* Improve code style in indent.rs.
Fix an issue with the rust indent query.

* Move indentation test sources to separate files.
Add `#not-kind-eq?`, `#same-line?` and `#not-same-line` custom predicates.
Improve the rust and c indent queries.

* Fix indent test.
Improve rust indent queries.

* Move indentation tests to integration test folder.

* Improve code style in indent.rs.
Reuse tree-sitter cursors for indentation queries.

* Migrate HCL indent query

* Replace custom loading in indent tests with a designated languages.toml

* Update indent query file name for --health command.

* Fix single-space formatting in indent queries.

* Add explanation for unwrapping.

Co-authored-by: Triton171 <triton0171@gmail.com>
2022-03-31 00:08:07 +09:00
Michael Davis
7cd6050235 add tree-sitter-gleam 2022-03-30 13:24:53 +09:00
Michael Davis
e2a50711d5 update tree-sitter-erlang
changes:

- typed fields within records which do not declare a default
  value are now correctly highlighted as record fields
- the EEP49 'maybe' form is now parsed
- fixes for highlights for 'begin' and 'after' tokens
2022-03-30 13:24:53 +09:00
Gokul Soumya
7b3a3d562c
Move top level lsp config to editor.lsp (#1868)
* Move top level lsp config to editor.lsp

This is mainly done to accomodate the new lsp.signature-help config
option that will be introduced in https://github.com/helix-editor/helix/pull/1755
which will have to be accessed by commands. The top level config
struct is split and moved to different places, making the relocation
necessary

* Revert rebase slipup
2022-03-28 10:11:52 +09:00
Joe
bee05dd32a
Add refresh-config and open-config command (#1803)
* Add refresh-config and open-config command

* clippy

* Use dynamic dispatch for editor config

* Refactor Result::Ok to Ok

* Remove unused import

* cargo fmt

* Modify config error handling

* cargo xtask docgen

* impl display for ConfigLoadError

* cargo fmt

* Put keymaps behind dyn access, refactor config.load()

* Update command names

* Update helix-term/src/application.rs

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

* Switch to unbounded_channel

* Remove --edit-config command

* Update configuration docs

* Revert "Put keymaps behind dyn access", too hard

This reverts commit 06bad8cf492b9331d0a2d1e9242f3ad4e2c1cf79.

* Add refresh for keys

* Refactor default_keymaps, fix config default, add test

* swap -> store, remove unneeded clone

* cargo fmt

* Rename default_keymaps to default

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2022-03-25 18:05:20 +09:00
Slin Lee
3e78b8fdad
Add syntax highlighting for Solidity (#1854) 2022-03-22 11:38:49 -05:00
Slin Lee
3c79bf5117
Add LSP support for Solidity (#1848)
* Add LSP support for Solidity

This requires a recent version of Solidity 0.8.11+

* Add Solidity to docs

* Update the docs
2022-03-22 11:22:34 +09:00
zetashift
7eb013c6fb
Initial basic Org markup support thanks to tree-sitter-org (#1845) 2022-03-20 17:14:30 -05:00
Joe
c0dbd6dc3f
Add horizontal and vertical split scratch buffers (#1763)
Make subcommand name more descriptive

Fix vsplit completer

Run cargo xtask docgen
2022-03-14 11:47:52 +09:00
Gokul Soumya
85492e587c
Deploy docs for master separately (#1783)
* Deploy docs for master separately

* Output docs for every tagged release

* Update .github/workflows/gh-pages.yml

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2022-03-14 11:46:40 +09:00
Blaž Hrastnik
610ce93600
fix #1808 2022-03-14 11:34:21 +09:00
Daniel S Poulin
e8cc7ace75
Update keymap documentation in the book (#1745)
* 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>
2022-03-13 17:12:13 +09:00
Aaron Housh
0712eb3e3b
Add csharp lsp support (#1788)
* add csharp lsp support

* remove hostPID

* update docs
2022-03-12 09:19:31 +09:00
Michael Davis
7044d7d804 rename '--fetch/build-grammars' flags into '--grammar fetch/build'
The old flags were a bit long. --grammar is also aliased to -g to make
it even easier.
2022-03-10 17:31:57 +09:00
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.
2022-03-10 17:31:57 +09:00
Michael Davis
08ee949dcb add 'use-grammars' to languages.toml
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.
2022-03-10 17:31:57 +09:00
Michael Davis
8081e9f052 replace all submodule documentation with flags documentation 2022-03-10 17:31:57 +09:00
Joe
8d7a25b4d4
Add --edit-config flag to directly open config.toml (#1771)
Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
2022-03-10 00:04:12 +05:30
Daniel S Poulin
24352b2729
Add arrow key mappings for tree-sitter parent/child/sibling nav (#1724)
* 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
2022-03-08 14:02:03 +09:00
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.
2022-03-07 16:46:14 +09:00
Daniel S Poulin
9bfb0caf1b
Add comment textobject for surround selection and navigation (#1605) 2022-03-06 10:54:24 +05:30
Gokul Soumya
c484b08923
Rename infobox theme scopes (#1741)
This makes it play nicely with https://github.com/helix-editor/helix/pull/1714
2022-03-04 09:31:51 +09:00
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
2022-03-02 11:12:50 +09:00
Michael Daffin
a76e94848a
Add terraform lsp support (#1726)
Using terraform-ls and enables auto-formate support. Also adds tfvars as an extra filetype.
2022-03-01 20:59:03 +09:00
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?
2022-03-01 10:31:24 +09:00
Philipp Mildenberger
7bb1db3ab5
Bring configuration documentation up to date (missing editor.search section) (#1719) 2022-03-01 10:06:14 +09:00
Michael Daffin
93ec42d06e
Add support for HCL language (#1705)
Queries based on the neovims ones: https://github.com/nvim-treesitter/nvim-treesitter/tree/master/queries/hcl and modified for helix support.
2022-02-25 17:48:20 +09:00
Skyler Hawthorne
a494f47a5d
Configurable auto pairs (#1624)
* impl auto pairs config

Implements configuration for which pairs of tokens get auto completed.

In order to help with this, the logic for when *not* to auto complete
has been generalized from a specific hardcoded list of characters to
simply testing if the next/prev char is alphanumeric.

It is possible to configure a global list of pairs as well as at the
language level. The language config will take precedence over the
global config.

* rename AutoPair -> Pair

* clean up insert_char command

* remove Rc

* remove some explicit cloning with another impl

* fix lint

* review comments

* global auto-pairs = false takes precedence over language settings

* make clippy happy

* print out editor config on startup

* move auto pairs accessor into Document

* rearrange auto pair doc comment

* use pattern in Froms
2022-02-25 17:36:54 +09:00
Michael Daffin
f83843ceba
Add kotlin language (#1689)
* Add kotlin language

Queries taken from https://github.com/nvim-treesitter/nvim-treesitter/blob/master/queries/kotlin seem to work well enough for my needs though I don't use kotlin heavily.

* Update lang-support doc

* Updates the kotlin highlight query to use helixs scopes

* Updates the queries from PR feedback

* Adds 'shallow = true' to gitmodules

* Removes kotlin locals.scm

* Remove blank line

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

Co-authored-by: Ivan Tham <pickfire@riseup.net>
2022-02-23 23:25:44 +09:00
Alex
d5ba0b5162
Allow separate styles for markup headings (#1618)
* update markdown highlighting to use separate heading themes

* remove markdown theme scopes in ui
2022-02-21 16:45:48 +09:00
Gokul Soumya
ab2a0f325b Add object.movement for tree-sitter navigation 2022-02-15 14:04:46 +09:00
Gokul Soumya
989407f190 Add docs for tree-sitter based navigation 2022-02-15 14:04:46 +09:00
Ludwig Stecher
4429993842
Add PageUp, PageDown, Ctrl-u, Ctrl-d, Home, End keyboard shortcuts to file picker (#1612)
* Add `PageUp`, `PageDown`, `Ctrl-u`, `Ctrl-d`, `Home`, `End` keyboard shortcuts to file picker

* Refactor file picker paging logic

* change key mapping

* Add overlay component

* Use closure instead of margin to calculate size

* Don't wrap file picker in `Overlay` automatically
2022-02-15 10:24:03 +09:00
Michael Davis
3a83a764e3
add tree-sitter-erlang (#1657) 2022-02-15 10:14:02 +09:00
Gokul Soumya
59acee308d
Add new dap commands to docs (#1660) 2022-02-14 11:32:22 +09:00
Maximilian Schoenenberg
a19a6ca01e
Added docs for ensure_selections_forward (#1651) 2022-02-11 20:25:59 +05:30
Gokul Soumya
f0cd02d5ef
Update keybind docs for treesitter, view mode (#1628) 2022-02-08 13:45:40 +09:00
Jared Ramirez
f5b95beef6
feat(languages): rescript (#1616)
* Add rescript language support

* cargo xtask docgen

* Add textobjects & file line ending

* Fix text objects & rerun docgen

* Fix textobjects queries
2022-02-06 14:24:01 +09:00
Daniel S Poulin
d6b6ad879e
epocsquadron/add tree sitter twig (#1602)
* Add tree-sitter-twig grammer and highlights

The gammar itself is quite basic, but is much better than nothing
for working with real files consisting mostly of html.

* Docgen for newly added grammar
2022-02-01 12:35:07 +09:00
Daniel S Poulin
e2833b5853
Add textobjects queries for php (#1601)
* Add textobjects queries for php

* Missing EOL fix

* Update generated docs after adding textobjects to php
2022-01-30 11:04:36 +09:00
Andrew Neth
333c2949c2
feat(helix-view): dynamic line numbers (#1522)
* feat(helix-view): dynamic line numbers

* docs: describe editor.line-number in more detail

* Make dynamic numbers the default behavior of `relative`
2022-01-26 00:18:01 +09:00
Michael Davis
7bce91556a
add tree-sitter-iex (#1576)
* add tree-sitter-iex

* run docgen task

* fix url for iex submodule
2022-01-25 15:50:34 +09:00
CossonLeo
d49e5323f9
Use markup scopes for the Markdown component (#1363) 2022-01-24 10:41:25 +09:00
Blaž Hrastnik
e2d2f19fd0
Merge pull request #1154 from sudormrfbin/cursor-shape-new
Change cursor shape on mode change
2022-01-23 16:35:22 +09:00
Kyra
a8e69e12f4
Add haskell-language-server-wrapper --lsp to default languages.toml (#1556)
After the changes to upgrade and reenable tree-sitter-haskell #1417
for the purpose of enabling Haskell syntax highlighting #1384, we
might as well take the final step.
2022-01-23 16:22:31 +09:00
Daniel Flanagan
b8cafee9f5
docs: Fix typo in book (#1537)
* docs: Fix typo in book

* Update book/src/usage.md

Co-authored-by: Eric Crosson <EricCrosson@users.noreply.github.com>

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Co-authored-by: Eric Crosson <EricCrosson@users.noreply.github.com>
2022-01-23 00:34:19 +09:00
Jared Ramirez
0b55b21f30
feat(languages): GraphQL (#1515)
* Add Graphql language support

* Fix docs gen

* Add JS Graphql injection query

* Updates based on PR feedback

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2022-01-21 23:16:40 +09:00
Michael Davis
f453f8724d
change show_subtree command into ':tree-sitter-subtree' typable command (#1524)
* add default keymap for show_subtree command

* remove space+t keymap

* add a typable command ':show-subtree'

* generate documentation for ':show-subtree'

* remove non-typable show_subtree command

* ':show-subtree'->':tree-sitter-subtree'
2022-01-21 23:15:35 +09:00
Michael Davis
392dfa0841
add select_next_sibling and select_prev_sibling commands (#1495)
* add select_next_sibling and select_prev_sibling commands

* refactor objects to use higher order functions

* address clippy feedback

* move selection cloning into commands

* add default keybindings under left/right brackets

* use [+t,]+t for selecting sibling syntax nodes

* setup Alt-{j,k,h,l} default keymaps for syntax selection commands

* reduce boilerplate of select_next/prev_sibling in commands

* import tree-sitter Node type in commands
2022-01-21 00:52:33 +09:00
Jared Ramirez
b2c8aa1ee7
feat(languages): Elm (#1514)
* Add Elm language support

* Fix docs gen

* Updates based on PR feedback
2022-01-21 00:47:23 +09:00
Anders Christiansen Sørby
8ea5742b08
feat(languages): Lean experimental tree-sitter-lean (#1422)
* Add experimental tree-sitter-lean

* Run docgen

* Copy over the queries from lean.nvim

* Update .gitmodules

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

* Update lean highlights and run docgen

* Update runtime/queries/lean/injections.scm

Co-authored-by: Michael Davis <michael.davis@nfiindustries.com>

* Lean: Move variable matcher to bottom

* Update runtime/queries/lean/locals.scm

Co-authored-by: Michael Davis <michael.davis@nfiindustries.com>

Co-authored-by: Ivan Tham <pickfire@riseup.net>
Co-authored-by: Michael Davis <michael.davis@nfiindustries.com>
2022-01-17 23:05:17 +09:00
Kirawi
a7b0cc730c
Re-enable haskell in languages.toml (#1520) 2022-01-16 10:11:31 +09:00
NexiNov
f77dbc7c83
Minor(book): Add G in normal mode (#1482) 2022-01-12 23:43:03 +08:00
Michael Davis
e0a99ae51a
add tree-sitter-git-config (#1426)
* add tree-sitter-git-config

* add todo comment for improving filetype check
2022-01-09 22:10:20 +08:00
Gokul Soumya
b3b4e78585 Merge branch 'master' into cursor-shape-new 2022-01-09 10:38:58 +05:30
Cottser
97e12f5c5a
docs: editor.filepicker -> editor.file-picker (#1465) 2022-01-09 11:45:54 +09:00
Eric Crosson
5b45bdd80f docs: document @keyword.control.exception scope
As identified in [this GitHub comment](https://github.com/helix-editor/helix/pull/1433#discussion_r777786140)
2022-01-09 00:30:22 +09:00
Eric Crosson
1c6bc6d455 feat: add tree-sitter-make
This commit adds syntax highlighting for GNU Make[^1] makefiles
via tree-sitter-make[^2].

[^1]: https://www.gnu.org/software/make/
[^2]: https://github.com/alemuller/tree-sitter-make
2022-01-09 00:30:22 +09:00
Michael Davis
b799b0d50e
capture markdown link text as markup.link.text (#1456) 2022-01-09 00:27:50 +09:00
Kevin Sjöberg
5e22694865
Add default language server for JavaScript (#1457)
* Add default language server for JavaScript

* Update lang support documentation
2022-01-09 00:27:10 +09:00
CJ van den Berg
1af8dd9912 Rework beginning of themes chapter
The specifics of configuring themes has caused some confusion. Hopefully this will clarify things a little.
2022-01-07 16:04:34 -05:00
Michael Davis
a8fd33ac01
add tree-sitter-regex (#1362)
* add tree-sitter-regex

* adapt regex highlights from upstream

* inject regex into elixir sigil_r/2 and sigil_R/2

* generate lang-support docs

* capture interesting nodes in character-ranges

* make $.character_class captures more consistent

* fix fallthrough behavior for character classes

* capture pattern characters as 'string'

* use latest tree-sitter-regex

* set elixir regex injections as combined

* add link to upstream queries

* inject regex in rust into 'Regex::new' raw string literals
2022-01-06 23:00:00 +08:00
Gokul Soumya
449624965b Merge branch 'master' into cursor-shape-new 2022-01-06 11:32:03 +05:30
Matouš Dzivjak
2e02a1d6bc
feat(commands): shrink_selection (#1340)
* feat(commands): shrink_selection

Add `shrink_selection` command that can be used to shrink
previously expanded selection.

To make `shrink_selection` work it was necessary to add
selection history to the Document since we want to shrink
the selection towards the syntax tree node that was initially
selected.

Selection history is cleared any time the user changes
selection other way than by `expand_selection`. This ensures
that we don't get some funky edge cases when user calls
`shrink_selection`.

Related: https://github.com/helix-editor/helix/discussions/1328

* Refactor shrink_selection, move history to view

* Remove useless comment

* Add default key mapping for extend&shrink selection

* Rework contains_selection method

* Shrink selection without expand selects first child
2022-01-06 11:12:02 +09:00
Sebastian Neubauer
5b1a628e81
Add textobjects and indents to c and cpp (#1293)
Indentation of single line statements doesn't work, i.e.

  for (;;)<hit enter>
leads to
  for(;;)
  <cursor here>

Only blocks with curly braces are indented.
2022-01-04 10:53:04 +09:00
Sebastian Neubauer
641255ccc8
Add llvm-mir highlighting (#1398)
* Add injection regex for more languages

To support embedding them in other languages like markdown.

* Add llvm-mir highlighting

LLVM Machine IR is dumped as yaml files that can embed LLVM IR and
Machine IR.

To support this, add a llvm-mir-yaml language that uses the yaml
parser, but uses different injections to highlight IR and MIR.

* Update submodule with fixed multiline comments

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2022-01-04 10:52:34 +09:00
Omnikar
ed97ecceb8
Add :cquit! command and prevent :cquit from ignoring unsaved changes (#1414)
* Add `:cquit!` command and prevent `:cquit` from ignoring unsaved changes

* `cargo xtask docgen`
2022-01-03 11:31:24 +09:00
Sebastian Neubauer
8f2af71340
Add LLVM TableGen highlighting (#1409)
Add a tree-sitter grammar and highlights for TableGen files.
TableGen and its grammar are described here:
https://llvm.org/docs/TableGen/index.html

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2022-01-03 10:57:55 +09:00
Michael Davis
8fda87af2b
add tree-sitter-git-rebase (#1402)
* add submodule on tree-sitter-rebase, add to languages

* add basic highlights query

* inject bash in execute statements

* update tree-sitter-rebase

* tree-sitter-rebase->tree-sitter-git-rebase

* get injection working with tree-sitter-git-commit

* set scope under source.gitrebase

* unset include-children on commit message injections

* Revert "unset include-children on commit message injections"

This reverts commit 2ecee155ea8e229651920b291062c2ee84b47944.

* fix generated language docs

* use rebase_command scopes from tree-sitter-git-commit
2021-12-31 06:58:47 +08:00
Michael Davis
bcf3808e97
Add tree-sitter-git-diff (#1373)
* add submodule on tree-sitter-git-diff

* add git-diff highlights

* inject git-diff into git-commit

* update tree-sitter-git-commit with fix for bad diff case

* add git-diff to language support docs

* include-children in diff injections

This ensures that children nodes of $.message are included in the
injection, such as $.user or issue/pr numbers. Without this change,
diffs containing '#' or '@' characters can trip up the injection and
be parsed separately.

See https://github.com/helix-editor/helix/pull/1373#issuecomment-1001215629

* set diff language's scope as source.diff
2021-12-30 00:31:23 +09:00
Sebastian Neubauer
8c29b76bcc
Improve llvm highlighting and queries (#1388)
* Improve llvm highlighting and queries

The llvm tree-sitter parser was updated to support scopes and more
accurate highlighting.

* Group highlight expressions better
2021-12-29 18:30:44 +09:00
Matouš Dzivjak
a4641a8613
feat(commands): sort command (#1288)
* feat(commands): sort/rsort  command

Add basic implementation of sort command.

* Sort by selections instead, implement reverse sort

* Generate docs

* Rename sort! to rsort
2021-12-27 13:11:06 +09:00
Stuart Hinson
7001665342
Add ruby indents (#1372)
* Add ruby indents

* Include ruby in generated docs
2021-12-27 13:07:09 +09:00
Ivan Tham
b9cb3930e2 Mark macros as experimental in docs
Given that currently macro does not integrate well with registers and
the internal representation of macros is expected to be changed.
2021-12-27 10:13:18 +09:00
Ivan Tham
9a32617b30 Rename play macro to replay macro
Macro needs to be defined first before playing so replay is more accurate.
Also, replay have the same length as record which makes it looks nice.
2021-12-27 10:13:18 +09:00
Ivan Tham
c7a59e24e6 Switch macro Q and q 2021-12-27 10:13:18 +09:00
Tamo
a306a1052a
Update settings at runtime (#798)
* feat: Update settings at runtime

fix the clippy warning

* update the documentation

* use to_value instead of to_vec+from_value

* drop the equal

* remove an useless comment

* apply suggestion
2021-12-26 10:04:33 +09:00
Michael Davis
c3fb86cbaa tree-sitter-gitcommit->tree-sitter-git-commit 2021-12-26 00:12:49 +09:00
Michael Davis
c1f4c0e67a add new scopes to themes docs 2021-12-26 00:12:49 +09:00
Michael Davis
fd31662b70 add gitcommit grammar and language configuration 2021-12-26 00:12:49 +09:00
Sebastian Neubauer
ec878e4011
Add textobjects and indents to cmake (#1307) 2021-12-26 00:10:19 +09:00