Skyler Hawthorne
0623a72599
move config parsing back into main
2022-06-18 23:54:03 -04:00
Kirawi
c2a40d9d52
Add support for local language configuration ( #1249 )
...
* add local configuration
* move config loading to Application::new
* simplify find_root_impl
2022-04-18 12:10:51 +09:00
Nirmal Patel
8702aaaefc
Handle BrokenPipe when piping hx --health through head ( #1876 )
...
Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
2022-03-30 10:39:25 +05:30
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
Michael Davis
37fed4de80
fix '--grammar' flag in help text ( #1784 )
2022-03-10 22:33:51 +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
00b2d616eb
implement build_grammars and fetch_grammars
...
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 .
2022-03-10 17:31:57 +09:00
Michael Davis
8330f6af20
add --fetch-grammars and --build-grammars CLI flags
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
Gokul Soumya
194b09fbc1
Add --health command for troubleshooting ( #1669 )
...
* 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>
2022-03-08 14:25:46 +09:00
Ivan Tham
759b850859
Allow specifying file start position ( #445 )
...
Like helix-term/src/commands.rs:3426:15
2022-01-23 16:54:03 +09:00
Kirawi
ed76cdf238
revert log truncation ( #895 ) ( #1130 )
2021-11-19 13:26:39 +09:00
Cole Helbling
87e61a0894
helix-term/commands: implement cquit ( #1096 )
...
This allows you to exit helix with an exit code, e.g. `:cq 2`.
2021-11-15 13:06:12 +09:00
Gygaxis Vainhardt
0949a0de7f
Add commit hash to version info, if present ( #957 )
...
* Add commit hash to version info, if present
* Rename GIT_HASH to indicate that it includes version, fix linter error
* Add whitespace after use statement
Co-authored-by: Ivan Tham <pickfire@riseup.net>
Co-authored-by: Ivan Tham <pickfire@riseup.net>
2021-11-15 00:09:02 +09:00
Omnikar
ed23057ff8
Launch with defaults upon invalid config/theme ( #982 )
...
* Launch with defaults upon invalid config/theme
* Startup message if there is a problematic config
* Statusline error if trying to switch to an invalid theme
* Use serde `deny_unknown_fields` for config
2021-11-07 00:57:14 +09:00
Omnikar
db56de589a
Add --tutor
option to hx --help
output ( #924 )
...
* Add `--tutor` option to `hx --help` output
* Adjust `--tutor` location in help output
2021-10-28 16:27:28 +09:00
Kirawi
0cb5e0b2ca
log syntax highlighting init errors ( #895 )
2021-10-23 21:52:18 +09:00
Ivan Tham
10548bf0e3
Fix previous broken refactor key into helix-view
...
Need to be used for autoinfo
Revert "Revert "Refactor key into helix-view""
This reverts commit 10f9f72232
.
2021-06-25 00:39:03 +09:00
Blaž Hrastnik
20f33ead67
minor: Remove old TODOs
2021-06-22 23:26:34 +09:00
Blaž Hrastnik
10f9f72232
Revert "Refactor key into helix-view"
...
Did not use defaults when custom keymap was used
This reverts commit ca806d4f85
.
2021-06-19 23:59:19 +09:00
Ivan Tham
ca806d4f85
Refactor key into helix-view
...
Now also make use of Deserialize for Config.
2021-06-19 16:37:15 +09:00
PabloMansanet
f7e00cf720
Configurable keys 2 (Mapping keys to commands) ( #268 )
...
* Add convenience/clarity wrapper for Range initialization
* Add keycode parse and display methods
* Add remapping functions and tests
* Implement key remapping
* Add remapping book entry
* Use raw string literal for toml
* Add command constants
* Make command functions private
* Map directly to commands
* Match key parsing/displaying to Kakoune
* Formatting pass
* Update documentation
* Formatting
* Fix example in the book
* Refactor into single config file
* Formatting
* Refactor configuration and add keymap newtype wrappers
* Address first batch of PR comments
* Replace FromStr with custom deserialize
2021-06-17 20:08:05 +09:00
Wojciech Kępka
037f45f24e
Create all parent directories for config and cache
2021-06-08 01:07:30 +09:00
Ivan Tham
b5682f984b
Separate helix-term as a library
...
helix-term stuff will now be documented in rustdoc.
2021-06-07 21:35:31 +08:00
Ethan Bodzioney
843c2cdebd
Install instructions and version number corrections ( #148 )
...
* Add MacOS install instructions
* Change version name argument
When using the -V command to get the version you are given 'helix-term x.x.x', I changed this to just helix as it makes more sense.
* Fixed version number
* Fixed version number
* Fixed version number
* Fixed version number
* Fixed version number
* Fixed version number
2021-06-07 09:14:06 +09:00
Blaž Hrastnik
06d8d3f55f
Try to detect language when document file path is set
...
Fixes #91
2021-06-04 11:03:40 +09:00
Ivan Tham
d664d1dec0
Default log file to cache
2021-06-03 10:15:17 +08:00
Corey Powell
f0018280cb
Refactored parse_args loop
...
Thanks @PabloMansanet
2021-06-02 14:26:20 -05:00
Corey Powell
7202953e69
Dropped pico-args in favour of a simpler hand roller parser
...
Not the greatest looking, but it gets the job done
2021-06-02 14:26:13 -05:00
Ivan Tham
eab6e53511
Fix panic opening rust file
...
Application::new will use stuff that requires tokio runtime.
2021-06-02 23:49:26 +08:00
Wojciech Kępka
e88383d990
Use config_dir for logging, create config_dir
2021-06-02 12:25:25 +02:00
Danilo Spinella
ea824ed05d
Improve errors handling in main by adding context
...
Return a anyhow::Result in main function so that Context can be used
there too.
2021-06-01 23:27:16 +02:00
Blaž Hrastnik
b8d6e6ad28
Allow setting verbosity to info again
2021-05-31 17:14:49 +09:00
Blaž Hrastnik
138787f76e
Drop clap for pico-args
...
We barely have any flags so it's not worth the compilation time or
binary size to use clap.
2021-05-31 17:07:43 +09:00
Blaž Hrastnik
35606a3daa
Inline tui as helix-tui fork.
...
We only rely on some of the rendering primitives and implement our
Cursive-style compositor on top.
2021-05-09 17:52:55 +09:00
Blaž Hrastnik
355ad3cb82
Tokio migration.
2021-05-06 13:56:34 +09:00
Blaž Hrastnik
bc4e54c0c4
Load config files from ~/.config/helix, fallback to defaults.
2021-04-07 23:56:20 +09:00
Blaž Hrastnik
91462af546
Allow starting hx without a file. A new blank file will be created.
2021-04-06 19:02:22 +09:00
Blaž Hrastnik
ceea5eacd8
clippy lint
2021-03-31 23:42:16 +09:00
Blaž Hrastnik
e3c4edae32
Add the machinery to load syntax config from TOML.
...
It's embedded into the binary at build time for now, but it's progress.
2021-03-25 15:26:25 +09:00
Blaž Hrastnik
3f6f82b0c4
Always store the log file under home dir.
2021-02-19 16:48:51 +09:00
Blaž Hrastnik
777a80917d
Address clippy lints.
2021-01-08 16:37:36 +09:00
Blaž Hrastnik
7dc24a25ba
Move ui modules under a ui:: namespace.
2020-12-13 13:44:51 +09:00
Blaž Hrastnik
8695415fbf
wip: Move to new rendering structure.
2020-12-13 12:23:50 +09:00
Blaž Hrastnik
5103dc9617
move commands and keymap back to terminal.
...
Command needs to be able to deal with UI. We'll separate it again later
on.
2020-12-10 18:13:42 +09:00
Blaž Hrastnik
83f2c24115
wip: Compositor
2020-12-06 11:53:58 +09:00
Blaž Hrastnik
3f707c19f4
Save command
2020-12-03 13:12:05 +09:00
Blaž Hrastnik
af1924404a
Configure logging (-vv for debug level logs)
2020-12-03 13:10:35 +09:00
Blaž Hrastnik
f9bfba4d96
Reroute LSP notification events into the main app event loop.
2020-12-03 13:10:32 +09:00