aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src
Commit message (Collapse)AuthorAge
...
* Fix edge-case in tree-sitter expand_selection selection command (#2877)Triton1712022-06-25
| | | Co-authored-by: Triton171 <triton0171@gmail.com>
* fixes showing the last prompt on empty input (#2870)Saber Haj Rabiee2022-06-24
|
* Merge pull request #2359 from dead10ck/test-harnessBlaž Hrastnik2022-06-21
|\ | | | | Integration testing harness
| * Merge branch 'master' into test-harnessBlaž Hrastnik2022-06-21
| |\
| * | use main application event loopSkyler Hawthorne2022-06-19
| | | | | | | | | | | | Use the Application's main event loop to allow LSP, file writes, etc
| * | Fix initial selection of Document in new viewSkyler Hawthorne2022-06-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a new View of a Document is created, a default cursor of 0, 0 is created, and it does not get normalized to a single width cursor until at least one movement of the cursor happens. This appears to have no practical negative effect that I could find, but it makes tests difficult to work with, since the initial selection is not what you expect it to be. This changes the initial selection of a new View to be the width of the first grapheme in the text.
* | | Enable shellwords for Windows (with escaping disabled) (#2767)ath32022-06-21
| |/ |/|
* | feat: make `move_vertically` aware of tabs and wide characters (#2620)Matthew Toohey2022-06-21
|/ | | | | | | | | | | | | * feat: make `move_vertically` aware of tabs and wide characters * refactor: replace unnecessary checked_sub with comparison * refactor: leave pos_at_coords unchanged and introduce separate pos_at_visual_coords * style: include comment to explain `pos_at_visual_coords` breaking condition * refactor: use `pos_at_visual_coords` in `text_pos_at_screen_coords` * feat: make `copy_selection_on_line` aware of wide characters
* Refactor textobject node capture (#2741)Gokul Soumya2022-06-11
|
* prompt: If submitting empty prompt, use default (last used)Blaž Hrastnik2022-06-06
|
* Passing extra formatting options to LSPs (#2635)farwyler2022-06-05
| | | | | | | | | | | | | * allows passing extra formatting options to LSPs - adds optional field 'format' to [[language]] sections in 'languages.toml' - passes specified options the LSPs via FormattingOptions * cleaner conversion of formatting properties * move formatting options inside lsp::Client * cleans up formatting properties merge
* Improve Readability (#2639)Ryan Russell2022-06-01
|
* Update to ropey 1.5Blaž Hrastnik2022-05-30
|
* Remove unnecessary `unwrap` (#2599)Hugo2022-05-29
| | | | `strip_prefix` will itself check whether the string starts with the prefix, so the extra call to `starts_with` was unnecessary.
* Include macro attributes to impls, structs, enums, functions etc. ↵Andrey Tkachenko2022-05-20
| | | | textobjects (#2494)
* configurable lsp request timeout (#2405)EmmChriss2022-05-11
|
* feat(languages): git-ignore and git-attributes (#2397)Matthew Toohey2022-05-05
|
* add reflow command (#2128)Vince Mutolo2022-05-02
| | | | | | | | | | | | | | | | | | | | | | | * add reflow command Users need to be able to hard-wrap text for many applications, including comments in code, git commit messages, plaintext documentation, etc. It often falls to the user to manually insert line breaks where appropriate in order to hard-wrap text. This commit introduces the "reflow" command (both in the TUI and core library) to automatically hard-wrap selected text to a given number of characters (defined by Unicode "extended grapheme clusters"). It handles lines with a repeated prefix, such as comments ("//") and indentation. * reflow: consider newlines to be word separators * replace custom reflow impl with textwrap crate * Sync reflow command docs with book * reflow: add default max_line_len language setting Co-authored-by: Vince Mutolo <vince@mutolo.org>
* Fix tests for surround primitivesGokul Soumya2022-04-29
|
* Support m in surround delete and replaceGokul Soumya2022-04-29
|
* Add `m` textobject to select closest surround pairGokul Soumya2022-04-29
|
* fix typos (#2304)chunghha2022-04-27
|
* Add rulers option (#2060)Thomas2022-04-20
| | | | | | | * Add color_column option * Rename to ruler Co-authored-by: DeviousStoat <devious@stoat.com>
* Fix Golang textobject queries (#2153)Michael Davis2022-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * log textobject query construction errors The current behavior is that invalid queries are discarded silently which makes it difficult to debug invalid textobjects (either invalid syntax or an update may have come through that changed the valid set of nodes). * fix golang textobject query `method_spec_list` used to be a named node but was removed (I think for Helix, it was when updated to pull in the support for generics). Instead of a named node for the list of method specs we have a bunch of `method_spec` children nodes now. We can match on the set of them with a `+` wildcard. Example go for this query: type Shape interface { area() float64 perimeter() float64 } Which is parsed as: (source_file (type_declaration (type_spec name: (type_identifier) type: (interface_type (method_spec name: (field_identifier) parameters: (parameter_list) result: (type_identifier)) (method_spec name: (field_identifier) parameters: (parameter_list) result: (type_identifier))))))
* Add support for local language configuration (#1249)Kirawi2022-04-18
| | | | | | | * add local configuration * move config loading to Application::new * simplify find_root_impl
* Make textobject select last paragraph (#1992)Ivan Tham2022-04-13
| | | | | | | | | | | | | | | | * Make textobject select last paragraph Last paragraph shoud be selected if the cursor was placed on the whitespace paragraph part and `map` is done, otherwise it would do nothing useful, but now we select backwards for the last paragraph which behaves similarly to kakoune, making `map` useful for the last paragraph with whitespace. Example usecase is to copy and paste last ledger cli paragraph quickly by `mapyp` to duplicate last entry. * Fix typo in core textobject Co-authored-by: Michael Davis <mcarsondavis@gmail.com> Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Remove usage of format ident feature from tests (#2028)Michael Davis2022-04-08
|
* Fix toggle_comments command on multiple selections (#1882)Danilo Spinella2022-04-05
|
* Add runtime language configuration (#1794) (#1866)Roland Kovacs2022-04-05
| | | | | | | | | | | | | | | | | | | | | * 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
* Fix next paragraph logic over muliple blank lines (#1951)Ivan Tham2022-04-05
| | | Fix #1928
* Add missing # back to test outputIvan Tham2022-04-02
|
* Rename _para to _paragraphIvan Tham2022-04-02
|
* Refactor test print to be more readableGokul Soumya2022-04-02
|
* Change test mark from ^@ to #[|]#Ivan Tham2022-04-02
|
* Add paragraph textobjectIvan Tham2022-04-02
| | | | | 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.
* Add next paragraphIvan Tham2022-04-02
|
* Add (prev) paragraph motionIvan Tham2022-04-02
| | | | | | Also improved testing facility. Fix #1580
* Jump to the next number on the line before incrementing (#1778)antoyo2022-04-01
| | | | | | | * Jump to the next number on the line before incrementing Partially fix #1645 * Refactor to avoid duplicating find_nth_next
* Fix an issue that caused an empty indentation query to be used instead of ↵Triton1712022-04-01
| | | | | using the fallback method of copying the indentation from the current line. (#1908) Co-authored-by: Triton171 <triton0171@gmail.com>
* Indentation rework (#1562)Triton1712022-03-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Fix typo in query parsing error message (#1856)Slin Lee2022-03-22
|
* ropey 1.4.1 fixes the issueBlaž Hrastnik2022-03-17
|
* Temporarily turn on unicode-linesBlaž Hrastnik2022-03-17
| | | | Ropey's non-unicode lines impl has some bugs still
* Put esoteric line endings behind a feature flagBlaž Hrastnik2022-03-17
|
* Optimize rendering by using Ropey::byte_sliceBlaž Hrastnik2022-03-17
| | | | | | | This avoids costly conversions via byte_to_char (which are then reversed back into bytes internally in Ropey). Reduces time spent in slice/byte_to_char from ~24% to ~5%.
* Refactor :set to parse by deserializing values (#1799)Gokul Soumya2022-03-15
| | | | | * Refactor :set to parse by deserializing values * Implement serialize for idle_timeout config
* 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.
* 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
|