Merge remote-tracking branch 'RoloEdits/icons-v2'
This commit is contained in:
commit
4762371504
13 changed files with 801 additions and 38 deletions
242
CHANGELOG.md
242
CHANGELOG.md
|
@ -1,3 +1,245 @@
|
|||
<!--
|
||||
# YY.0M (YYYY-0M-0D)
|
||||
|
||||
Breaking changes:
|
||||
|
||||
Features:
|
||||
|
||||
Commands:
|
||||
|
||||
Usability improvements:
|
||||
|
||||
Fixes:
|
||||
|
||||
Themes:
|
||||
|
||||
New languages:
|
||||
|
||||
Updated languages and queries:
|
||||
|
||||
Packaging:
|
||||
-->
|
||||
|
||||
# 25.01 (2025-01-03)
|
||||
|
||||
As always, a big thank you to all of the contributors! This release saw changes from 171 contributors.
|
||||
|
||||
Features:
|
||||
|
||||
* Big refactor for `Picker`s ([#9647](https://github.com/helix-editor/helix/pull/9647), [#11209](https://github.com/helix-editor/helix/pull/11209), [#11216](https://github.com/helix-editor/helix/pull/11216), [#11211](https://github.com/helix-editor/helix/pull/11211), [#11343](https://github.com/helix-editor/helix/pull/11343), [#11406](https://github.com/helix-editor/helix/pull/11406))
|
||||
* Use a table layout and allow filtering by column
|
||||
* Reimplement `global_search` to allow changing the query dynamically
|
||||
* Add an alternative "inline" display for LSP diagnostics ([#6417](https://github.com/helix-editor/helix/pull/6417), [#11815](https://github.com/helix-editor/helix/pull/11815))
|
||||
* Support defining keybindings as macros ([#4709](https://github.com/helix-editor/helix/pull/4709))
|
||||
* Continue line comments in `o`/`O` and on `<ret>` in insert mode ([#10996](https://github.com/helix-editor/helix/pull/10996), [#12213](https://github.com/helix-editor/helix/pull/12213), [#12215](https://github.com/helix-editor/helix/pull/12215))
|
||||
* Allow configuring and switching clipboard providers at runtime ([#10839](https://github.com/helix-editor/helix/pull/10839), [b855cd0](https://github.com/helix-editor/helix/commit/b855cd0), [467fad5](https://github.com/helix-editor/helix/commit/467fad5), [191b0f0](https://github.com/helix-editor/helix/commit/191b0f0))
|
||||
* Add support for path completion ([#2608](https://github.com/helix-editor/helix/pull/2608))
|
||||
* Support bindings with the Super (Cmd/Win/Meta) modifier ([#6592](https://github.com/helix-editor/helix/pull/6592))
|
||||
* Support rendering and jumping between tabstops in snippet completions ([#9801](https://github.com/helix-editor/helix/pull/9801))
|
||||
* Allow theming directory completions ([#12205](https://github.com/helix-editor/helix/pull/12205), [#12295](https://github.com/helix-editor/helix/pull/12295))
|
||||
|
||||
Commands:
|
||||
|
||||
* Add commands to move within snake_case or camelCase words ([#8147](https://github.com/helix-editor/helix/pull/8147))
|
||||
* Add `search_selection_detect_word_boundaries` ([#12126](https://github.com/helix-editor/helix/pull/12126))
|
||||
* This command takes the `*` key in normal and select mode, replacing `search_selection` which was moved to `A-*`.
|
||||
|
||||
Usability improvements:
|
||||
|
||||
* Add `:edit` and `:e` aliases for `:open` ([#11186](https://github.com/helix-editor/helix/pull/11186), [#11196](https://github.com/helix-editor/helix/pull/11196))
|
||||
* Trim trailing newline from pipe command outputs when the input doesn't have a trailing newline ([#11183](https://github.com/helix-editor/helix/pull/11183), [4f63a46](https://github.com/helix-editor/helix/commit/4f63a46))
|
||||
* Add `:mv` alias for `:move` ([#11256](https://github.com/helix-editor/helix/pull/11256))
|
||||
* Return document display name instead of absolute path from the `%` special register ([#11275](https://github.com/helix-editor/helix/pull/11275))
|
||||
* Track view position on a per-view instead of per-document basis ([#10559](https://github.com/helix-editor/helix/pull/10559))
|
||||
* Improve scrolloff calculation to leave a gap in the middle ([#11323](https://github.com/helix-editor/helix/pull/11323))
|
||||
* Show a popup for stderr printed by failed `:sh` commands ([#11239](https://github.com/helix-editor/helix/pull/11239))
|
||||
* Add statusline errors when nothing is selected with `s`, `K`, `A-K` ([#11370](https://github.com/helix-editor/helix/pull/11370))
|
||||
* Add `.svn` as a workspace root marker ([#11429](https://github.com/helix-editor/helix/pull/11429))
|
||||
* Trim the end of `:sh` outputs ([#11161](https://github.com/helix-editor/helix/pull/11161))
|
||||
* Show LSP `window/showMessage` messages in the statusline ([#5535](https://github.com/helix-editor/helix/pull/5535))
|
||||
* Support finding workspace directories via `.jj` directories ([#11685](https://github.com/helix-editor/helix/pull/11685))
|
||||
* Join single-line comments with `join_selections` (`J`) ([#11742](https://github.com/helix-editor/helix/pull/11742))
|
||||
* Show anonymous syntax tree nodes in `:tree-sitter-subtree` ([#11663](https://github.com/helix-editor/helix/pull/11663), [38e8382](https://github.com/helix-editor/helix/commit/38e8382))
|
||||
* Save an undo checkpoint before paste in insert mode ([#8121](https://github.com/helix-editor/helix/pull/8121))
|
||||
* Only break on ASCII spaces in `:reflow` ([#12048](https://github.com/helix-editor/helix/pull/12048))
|
||||
* Add a `default-yank-register` config option ([#11430](https://github.com/helix-editor/helix/pull/11430))
|
||||
* Show a statusline error for `:format` when a formatter is not available ([#12183](https://github.com/helix-editor/helix/pull/12183))
|
||||
* Change to the home directory with `:cd` with no arguments ([#12042](https://github.com/helix-editor/helix/pull/12042))
|
||||
* Change default comment token to `#` for unrecognized files ([#12080](https://github.com/helix-editor/helix/pull/12080), [#12266](https://github.com/helix-editor/helix/pull/12266), [bae6a58](https://github.com/helix-editor/helix/commit/bae6a58))
|
||||
* Trim all trailing whitespace on `insert_newline` ([#12177](https://github.com/helix-editor/helix/pull/12177))
|
||||
* Change to the prior directory with `:cd -` ([#12194](https://github.com/helix-editor/helix/pull/12194))
|
||||
* Allow parsing `-` (with no modifiers) as a keybinding ([#12191](https://github.com/helix-editor/helix/pull/12191))
|
||||
* Improve opening statusline and error messages when opening duplicate files or directories ([#12199](https://github.com/helix-editor/helix/pull/12199))
|
||||
* Trim trailing colons in paths passed on the argv ([#9963](https://github.com/helix-editor/helix/pull/9963))
|
||||
* Show tree-sitter parser availability in `hx --health <lang>` ([#12228](https://github.com/helix-editor/helix/pull/12228))
|
||||
* Show a preview block for colors in the LSP completion menu ([#12299](https://github.com/helix-editor/helix/pull/12299))
|
||||
* Add infobox help for `surround_add`, `surround_replace` and `surround_delete` ([#12262](https://github.com/helix-editor/helix/pull/12262))
|
||||
|
||||
Fixes:
|
||||
|
||||
* Respect document indentation settings in `format_selections` (`=`) ([#11169](https://github.com/helix-editor/helix/pull/11169))
|
||||
* Avoid switching the current document to normal mode during an LSP `workspace/applyEdit` operation ([#11176](https://github.com/helix-editor/helix/pull/11176))
|
||||
* Fix off-by-one in LSP `find_completion_range` ([#11266](https://github.com/helix-editor/helix/pull/11266))
|
||||
* Prefer file-system mtime to local system time for detecting external modifications ([#11142](https://github.com/helix-editor/helix/pull/11142), [#11352](https://github.com/helix-editor/helix/pull/11352), [#11358](https://github.com/helix-editor/helix/pull/11358), [#11361](https://github.com/helix-editor/helix/pull/11361))
|
||||
* Fix writing of hardlinks ([#11340](https://github.com/helix-editor/helix/pull/11340))
|
||||
* Prevent language servers from being automatically restarted when stopped with `:lsp-stop` ([#11321](https://github.com/helix-editor/helix/pull/11321))
|
||||
* Stable-sort LSP text edits ([#11357](https://github.com/helix-editor/helix/pull/11357))
|
||||
* Fix determination of current language layer in documents with nested language injections ([#11365](https://github.com/helix-editor/helix/pull/11365))
|
||||
* Fix a panic from `:move`ing a file to a new extension which starts a language server ([#11387](https://github.com/helix-editor/helix/pull/11387))
|
||||
* Fix a panic from duplicating the diff gutter ([#11092](https://github.com/helix-editor/helix/pull/11092))
|
||||
* Keep cursor position when exactly replacing text ([#5930](https://github.com/helix-editor/helix/pull/5930))
|
||||
* Fix a panic from `jump_backward` on a newly opened split ([#11508](https://github.com/helix-editor/helix/pull/11508))
|
||||
* Fix a panic from language servers sending an unknown diagnostic severity ([#11569](https://github.com/helix-editor/helix/pull/11569))
|
||||
* Fix a panic when drawing at the edge of the screen ([#11737](https://github.com/helix-editor/helix/pull/11737))
|
||||
* Fix git repo detection on symlinks ([#11732](https://github.com/helix-editor/helix/pull/11732))
|
||||
* Fix a panic from a language server sending an out-of-range active signature index in `textDocument/signatureHelp` ([#11825](https://github.com/helix-editor/helix/pull/11825))
|
||||
* Fix a panic from using `C-k` in a prompt ending in a multi-byte character ([#12237](https://github.com/helix-editor/helix/pull/12237))
|
||||
* Expand tildes in paths passed to `:read` ([#12271](https://github.com/helix-editor/helix/pull/12271))
|
||||
* Respect per-language `workspace-lsp-roots` configuration when opening new documents ([#12223](https://github.com/helix-editor/helix/pull/12223))
|
||||
* Consistently replace line-endings in paste/replace commands ([c262fe4](https://github.com/helix-editor/helix/commit/c262fe4))
|
||||
* Fix formatting in error statusline messages when inspecting variables in DAP ([#12354](https://github.com/helix-editor/helix/pull/12354))
|
||||
* Fix invisible printing of headers in `--health` output on light terminals ([#12355](https://github.com/helix-editor/helix/pull/12355))
|
||||
* Accept integers serialized as floats in the JSONRPC `id` field ([#12376](https://github.com/helix-editor/helix/pull/12376))
|
||||
|
||||
Themes:
|
||||
|
||||
* Bring `kanagawa` colors better in line with neovim version ([#11187](https://github.com/helix-editor/helix/pull/11187), [#11270](https://github.com/helix-editor/helix/pull/11270))
|
||||
* Add `ao` ([#11063](https://github.com/helix-editor/helix/pull/11063))
|
||||
* Update `dark_plus` ([#11415](https://github.com/helix-editor/helix/pull/11415))
|
||||
* Add `iceberg-light` and `iceberg-dark` ([#10674](https://github.com/helix-editor/helix/pull/10674))
|
||||
* Update everforest themes ([#11459](https://github.com/helix-editor/helix/pull/11459))
|
||||
* Update gruvbox themes ([#11477](https://github.com/helix-editor/helix/pull/11477))
|
||||
* Change primary selection cursor color for `naysayer` ([#11617](https://github.com/helix-editor/helix/pull/11617))
|
||||
* Style picker column names in `horizon-dark` ([#11649](https://github.com/helix-editor/helix/pull/11649))
|
||||
* Style picker column names in Darcula themes ([#11649](https://github.com/helix-editor/helix/pull/11649))
|
||||
* Update diagnostics colors in `snazzy` ([#11731](https://github.com/helix-editor/helix/pull/11731))
|
||||
* Update bogster themes ([#11353](https://github.com/helix-editor/helix/pull/11353))
|
||||
* Highlight `keyword.storage` in `onedark` ([#11802](https://github.com/helix-editor/helix/pull/11802))
|
||||
* Add `ui.virtual.jump-label` to `serika-dark` ([#11911](https://github.com/helix-editor/helix/pull/11911))
|
||||
* Add `adwaita-light` ([#10869](https://github.com/helix-editor/helix/pull/10869))
|
||||
* Add seoul256 themes ([#11466](https://github.com/helix-editor/helix/pull/11466))
|
||||
* Add yo themes ([#11703](https://github.com/helix-editor/helix/pull/11703))
|
||||
* Add `eiffel` ([#11679](https://github.com/helix-editor/helix/pull/11679))
|
||||
* Add `carbonfox` ([#11558](https://github.com/helix-editor/helix/pull/11558))
|
||||
* Set tags color in monokai themes ([#11917](https://github.com/helix-editor/helix/pull/11917))
|
||||
* Improve readability of spacebones picker selection ([#12064](https://github.com/helix-editor/helix/pull/12064))
|
||||
* Update modus themes ([#11949](https://github.com/helix-editor/helix/pull/11949))
|
||||
* Use bold for statusline mode indicator in `onedarker` ([#11958](https://github.com/helix-editor/helix/pull/11958))
|
||||
* Update hex themes, add a new hex theme ([#10849](https://github.com/helix-editor/helix/pull/10849))
|
||||
* Add `sunset` ([#12093](https://github.com/helix-editor/helix/pull/12093))
|
||||
* Add bufferline highlighting for flexoki themes ([#12146](https://github.com/helix-editor/helix/pull/12146))
|
||||
* Add colors for (un)checked list items to catppuccin themes ([#12167](https://github.com/helix-editor/helix/pull/12167))
|
||||
* Update `voxed` ([#9328](https://github.com/helix-editor/helix/pull/9328))
|
||||
* Add `vintage` ([#9361](https://github.com/helix-editor/helix/pull/9361))
|
||||
* Add directory style to everforest themes ([#12287](https://github.com/helix-editor/helix/pull/12287))
|
||||
* Add inactive text and update jump label highlights in `dark_plus` ([#12289](https://github.com/helix-editor/helix/pull/12289))
|
||||
* Sync changes with catppuccin themes ([#12304](https://github.com/helix-editor/helix/pull/12304))
|
||||
* Add `ui.text.directory` to `nightfox` ([#12328](https://github.com/helix-editor/helix/pull/12328))
|
||||
* Add `ui.text.directory` to `sunset` ([#12328](https://github.com/helix-editor/helix/pull/12328))
|
||||
* Add `diagnostic.unnecessary` to Catppuccin themes ([#12391](https://github.com/helix-editor/helix/pull/12391))
|
||||
|
||||
New languages:
|
||||
|
||||
* `jjdescription` ([#11271](https://github.com/helix-editor/helix/pull/11271), [#11857](https://github.com/helix-editor/helix/pull/11857), [#12305](https://github.com/helix-editor/helix/pull/12305))
|
||||
* i3wm and Sway configs ([#11424](https://github.com/helix-editor/helix/pull/11424))
|
||||
* TypeSpec ([#11412](https://github.com/helix-editor/helix/pull/11412))
|
||||
* jq ([#11393](https://github.com/helix-editor/helix/pull/11393))
|
||||
* Thrift ([#11367](https://github.com/helix-editor/helix/pull/11367))
|
||||
* Gherkin ([#11083](https://github.com/helix-editor/helix/pull/11083))
|
||||
* Circom ([#11676](https://github.com/helix-editor/helix/pull/11676))
|
||||
* Dune ([#11829](https://github.com/helix-editor/helix/pull/11829))
|
||||
* Snakemake ([#11858](https://github.com/helix-editor/helix/pull/11858), [#11936](https://github.com/helix-editor/helix/pull/11936))
|
||||
* Cylc ([#11830](https://github.com/helix-editor/helix/pull/11830))
|
||||
* textproto ([#11874](https://github.com/helix-editor/helix/pull/11874))
|
||||
* Spade ([#11448](https://github.com/helix-editor/helix/pull/11448), [#12276](https://github.com/helix-editor/helix/pull/12276))
|
||||
* NestedText ([#11987](https://github.com/helix-editor/helix/pull/11987))
|
||||
* Quint ([#11898](https://github.com/helix-editor/helix/pull/11898))
|
||||
* Amber-lang ([#12021](https://github.com/helix-editor/helix/pull/12021))
|
||||
* Vento ([#12147](https://github.com/helix-editor/helix/pull/12147))
|
||||
* Teal ([#12081](https://github.com/helix-editor/helix/pull/12081))
|
||||
* Koto ([#12307](https://github.com/helix-editor/helix/pull/12307))
|
||||
* NGINX ([#12309](https://github.com/helix-editor/helix/pull/12309))
|
||||
|
||||
Updated languages and queries:
|
||||
|
||||
* Add comment injections for Hare ([#11173](https://github.com/helix-editor/helix/pull/11173))
|
||||
* Improve highlights for `blade.php` files ([#11138](https://github.com/helix-editor/helix/pull/11138))
|
||||
* Update tree-sitter-slint ([#11224](https://github.com/helix-editor/helix/pull/11224), [#11757](https://github.com/helix-editor/helix/pull/11757), [#12297](https://github.com/helix-editor/helix/pull/12297))
|
||||
* Recognize `just` files as Just ([#11286](https://github.com/helix-editor/helix/pull/11286))
|
||||
* Recognize `mdx` as Markdown ([#11122](https://github.com/helix-editor/helix/pull/11122))
|
||||
* Update Just grammar and queries ([#11306](https://github.com/helix-editor/helix/pull/11306))
|
||||
* Recognize `tclsh` as TCL ([#11236](https://github.com/helix-editor/helix/pull/11236))
|
||||
* Update Godot grammar and queries ([#11235](https://github.com/helix-editor/helix/pull/11235))
|
||||
* Update Gleam grammar and queries ([#11427](https://github.com/helix-editor/helix/pull/11427))
|
||||
* Add `mesonlsp` for Meson ([#11416](https://github.com/helix-editor/helix/pull/11416))
|
||||
* Update HTML highlights ([#11400](https://github.com/helix-editor/helix/pull/11400))
|
||||
* Add comment textobjects for Verilog ([#11388](https://github.com/helix-editor/helix/pull/11388))
|
||||
* Switch tree-sitter-just grammar ([#11380](https://github.com/helix-editor/helix/pull/11380), [#11606](https://github.com/helix-editor/helix/pull/11606), [#12141](https://github.com/helix-editor/helix/pull/12141))
|
||||
* Update tree-sitter-fsharp ([#11061](https://github.com/helix-editor/helix/pull/11061))
|
||||
* Add `nixd` for Nix ([#10767](https://github.com/helix-editor/helix/pull/10767))
|
||||
* Highlight types and enum members from the Rust prelude ([#8535](https://github.com/helix-editor/helix/pull/8535))
|
||||
* Improve textobjects for HCL, Nix ([#11513](https://github.com/helix-editor/helix/pull/11513))
|
||||
* Add textobjects queries for docker-compose, dockerfile, env, git-config, hcl, hocon, prisma, SQL and YAML ([#11513](https://github.com/helix-editor/helix/pull/11513))
|
||||
* Recognize cshtml files as HTML ([#11540](https://github.com/helix-editor/helix/pull/11540))
|
||||
* Set a memory limit for the Lean language server ([#11683](https://github.com/helix-editor/helix/pull/11683))
|
||||
* Add configurations for jedi and ruff language servers ([#11630](https://github.com/helix-editor/helix/pull/11630))
|
||||
* Update Vue highlights ([#11706](https://github.com/helix-editor/helix/pull/11706))
|
||||
* Switch tree-sitter-hcl grammar ([#11749](https://github.com/helix-editor/helix/pull/11749))
|
||||
* Fix `odinfmt` formatter configuration ([#11759](https://github.com/helix-editor/helix/pull/11759))
|
||||
* Recognize `rbs` files as Ruby ([#11786](https://github.com/helix-editor/helix/pull/11786))
|
||||
* Update tree-sitter-nickel ([#11771](https://github.com/helix-editor/helix/pull/11771))
|
||||
* Recognize `ldtk` and `ldtkl` files as JSON ([#11793](https://github.com/helix-editor/helix/pull/11793))
|
||||
* Fix highlights for builtin functions in Fish ([#11792](https://github.com/helix-editor/helix/pull/11792))
|
||||
* Add `superhtml` for HTML ([#11609](https://github.com/helix-editor/helix/pull/11609))
|
||||
* Add a configuration for the Vale language server ([#11636](https://github.com/helix-editor/helix/pull/11636))
|
||||
* Add Erlang Language Platform (`elp`) for Erlang ([#11499](https://github.com/helix-editor/helix/pull/11499))
|
||||
* Update Odin highlights ([#11804](https://github.com/helix-editor/helix/pull/11804))
|
||||
* Remove auto-pairs for single quotes in SML ([#11838](https://github.com/helix-editor/helix/pull/11838))
|
||||
* Add `glsl_analyzer` for GLSL ([#11891](https://github.com/helix-editor/helix/pull/11891))
|
||||
* Recognize `.prettierrc` as YAML ([#11997](https://github.com/helix-editor/helix/pull/11997))
|
||||
* Fix `swift-format` formatter configuration ([#12052](https://github.com/helix-editor/helix/pull/12052))
|
||||
* Add `package.json` and `tsconfig.json` as JS/TS workspace roots ([#10652](https://github.com/helix-editor/helix/pull/10652))
|
||||
* Add "INVARIANT" to comment error highlights ([#12094](https://github.com/helix-editor/helix/pull/12094))
|
||||
* Update Rescript grammar and queries ([#11165](https://github.com/helix-editor/helix/pull/11165))
|
||||
* Update tree-sitter-nasm ([#11795](https://github.com/helix-editor/helix/pull/11795))
|
||||
* Update LLVM grammars ([#11851](https://github.com/helix-editor/helix/pull/11851))
|
||||
* Update Perl and Pod grammars ([#11848](https://github.com/helix-editor/helix/pull/11848))
|
||||
* Add Nim injections in Nix ([#11837](https://github.com/helix-editor/helix/pull/11837))
|
||||
* Recognize `livemd` as Markdown ([#12034](https://github.com/helix-editor/helix/pull/12034))
|
||||
* Update Unison grammar and queries ([#12039](https://github.com/helix-editor/helix/pull/12039))
|
||||
* Turn off Swift auto-format by default ([#12071](https://github.com/helix-editor/helix/pull/12071))
|
||||
* Recognize `.swift-format` as JSON ([#12071](https://github.com/helix-editor/helix/pull/12071))
|
||||
* Recognize `.clangd` and `.clang-format` as YAML ([#12032](https://github.com/helix-editor/helix/pull/12032))
|
||||
* Recognize `ssh_config.d/*.conf` as sshclientconfig ([#11947](https://github.com/helix-editor/helix/pull/11947))
|
||||
* Update comment token configs for Zig ([#12049](https://github.com/helix-editor/helix/pull/12049))
|
||||
* Update tree-sitter-bicep ([#11525](https://github.com/helix-editor/helix/pull/11525))
|
||||
* Add `hyperls` for Hyperlang ([#11056](https://github.com/helix-editor/helix/pull/11056))
|
||||
* Add highlight queries for Solidity ([#12102](https://github.com/helix-editor/helix/pull/12102))
|
||||
* Recognize `WORKSPACE.bzlmod` as Starlark ([#12103](https://github.com/helix-editor/helix/pull/12103))
|
||||
* Update Ada grammar and queries ([#12131](https://github.com/helix-editor/helix/pull/12131))
|
||||
* Restrict Hocon file-types glob patterns ([#12156](https://github.com/helix-editor/helix/pull/12156))
|
||||
* Update Mojo language server to Magic ([#12195](https://github.com/helix-editor/helix/pull/12195))
|
||||
* Switch tree-sitter-v grammar ([#12236](https://github.com/helix-editor/helix/pull/12236))
|
||||
* Add "COMPLIANCE" to comment error highlights ([#12094](https://github.com/helix-editor/helix/pull/12094))
|
||||
* Add a language server configuration for `ltex-ls-plus` ([#12251](https://github.com/helix-editor/helix/pull/12251))
|
||||
* Update tree-sitter-dockerfile ([#12230](https://github.com/helix-editor/helix/pull/12230))
|
||||
* Add `]` to PHP outdents ([#12286](https://github.com/helix-editor/helix/pull/12286))
|
||||
* Add textobjects for Odin ([#12302](https://github.com/helix-editor/helix/pull/12302))
|
||||
* Update tree-sitter-heex and queries ([#12334](https://github.com/helix-editor/helix/pull/12334))
|
||||
* Update protobuf highlights ([#12339](https://github.com/helix-editor/helix/pull/12339))
|
||||
* Switch tree-sitter-query (TSQ) grammar ([#12148](https://github.com/helix-editor/helix/pull/12148), [e0bccd2](https://github.com/helix-editor/helix/commit/e0bccd2))
|
||||
* Add block comment configurations for jinja and nunjucks ([#12348](https://github.com/helix-editor/helix/pull/12348))
|
||||
* Add `uv` shebang for python ([#12360](https://github.com/helix-editor/helix/pull/12360))
|
||||
* Update tree-sitter-vento ([#12368](https://github.com/helix-editor/helix/pull/12368))
|
||||
* Switch Protobuf tree-sitter grammar ([#12225](https://github.com/helix-editor/helix/pull/12225))
|
||||
* Recognize `hypr/*.conf` as Hyprland ([#12384](https://github.com/helix-editor/helix/pull/12384))
|
||||
|
||||
Packaging:
|
||||
|
||||
* Add completions for Nushell ([#11262](https://github.com/helix-editor/helix/pull/11262), [#11346](https://github.com/helix-editor/helix/pull/11346))
|
||||
* Fix completion of flags in Bash completions ([#11246](https://github.com/helix-editor/helix/pull/11246))
|
||||
* Include shell completions in Nix outputs ([#11518](https://github.com/helix-editor/helix/pull/11518))
|
||||
|
||||
# 24.07 (2024-07-14)
|
||||
|
||||
Thanks to all of the contributors! This release has changes from 160 contributors.
|
||||
|
|
26
Cargo.lock
generated
26
Cargo.lock
generated
|
@ -1285,7 +1285,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "helix-core"
|
||||
version = "24.7.0"
|
||||
version = "25.1.0"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"anyhow",
|
||||
|
@ -1326,7 +1326,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "helix-dap"
|
||||
version = "24.7.0"
|
||||
version = "25.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"fern",
|
||||
|
@ -1341,7 +1341,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "helix-event"
|
||||
version = "24.7.0"
|
||||
version = "25.1.0"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"anyhow",
|
||||
|
@ -1355,7 +1355,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "helix-loader"
|
||||
version = "24.7.0"
|
||||
version = "25.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"cc",
|
||||
|
@ -1374,7 +1374,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "helix-lsp"
|
||||
version = "24.7.0"
|
||||
version = "25.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arc-swap",
|
||||
|
@ -1409,11 +1409,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "helix-parsec"
|
||||
version = "24.7.0"
|
||||
version = "25.1.0"
|
||||
|
||||
[[package]]
|
||||
name = "helix-stdx"
|
||||
version = "24.7.0"
|
||||
version = "25.1.0"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"dunce",
|
||||
|
@ -1430,7 +1430,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "helix-term"
|
||||
version = "24.7.0"
|
||||
version = "25.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arc-swap",
|
||||
|
@ -1475,7 +1475,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "helix-tui"
|
||||
version = "24.7.0"
|
||||
version = "25.1.0"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cassowary",
|
||||
|
@ -1491,7 +1491,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "helix-vcs"
|
||||
version = "24.7.0"
|
||||
version = "25.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arc-swap",
|
||||
|
@ -1507,7 +1507,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "helix-view"
|
||||
version = "24.7.0"
|
||||
version = "25.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arc-swap",
|
||||
|
@ -1534,6 +1534,7 @@ dependencies = [
|
|||
"serde",
|
||||
"serde_json",
|
||||
"slotmap",
|
||||
"smartstring",
|
||||
"tempfile",
|
||||
"thiserror 2.0.9",
|
||||
"tokio",
|
||||
|
@ -2390,6 +2391,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"serde",
|
||||
"static_assertions",
|
||||
"version_check",
|
||||
]
|
||||
|
@ -3025,7 +3027,7 @@ checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51"
|
|||
|
||||
[[package]]
|
||||
name = "xtask"
|
||||
version = "24.7.0"
|
||||
version = "25.1.0"
|
||||
dependencies = [
|
||||
"helix-core",
|
||||
"helix-loader",
|
||||
|
|
|
@ -44,7 +44,7 @@ slotmap = "1.0.7"
|
|||
thiserror = "2.0"
|
||||
|
||||
[workspace.package]
|
||||
version = "24.7.0"
|
||||
version = "25.1.0"
|
||||
edition = "2021"
|
||||
authors = ["Blaž Hrastnik <blaz@mxxn.io>"]
|
||||
categories = ["editor"]
|
||||
|
|
|
@ -210,7 +210,7 @@
|
|||
| tact | ✓ | ✓ | ✓ | |
|
||||
| task | ✓ | | | |
|
||||
| tcl | ✓ | | ✓ | |
|
||||
| teal | ✓ | | | |
|
||||
| teal | ✓ | | | `teal-language-server` |
|
||||
| templ | ✓ | | | `templ` |
|
||||
| textproto | ✓ | ✓ | ✓ | |
|
||||
| tfvars | ✓ | | ✓ | `terraform-ls` |
|
||||
|
|
|
@ -47,6 +47,9 @@
|
|||
<content_rating type="oars-1.1" />
|
||||
|
||||
<releases>
|
||||
<release version="25.01" date="2025-01-03">
|
||||
<url>https://helix-editor.com/news/release-25-01-highlights/</url>
|
||||
</release>
|
||||
<release version="24.07" date="2024-07-14">
|
||||
<url>https://github.com/helix-editor/helix/releases/tag/24.07</url>
|
||||
</release>
|
||||
|
|
|
@ -24,7 +24,7 @@ use helix_core::{
|
|||
};
|
||||
use helix_view::{
|
||||
annotations::diagnostics::DiagnosticFilter,
|
||||
document::{Mode, SavePoint, SCRATCH_BUFFER_NAME},
|
||||
document::{Mode, SavePoint, DEFAULT_LANGUAGE_NAME, SCRATCH_BUFFER_NAME},
|
||||
editor::{CompleteAction, CursorShapeConfig},
|
||||
graphics::{Color, CursorKind, Modifier, Rect, Style},
|
||||
input::{KeyEvent, MouseButton, MouseEvent, MouseEventKind},
|
||||
|
@ -690,7 +690,20 @@ impl EditorView {
|
|||
bufferline_inactive
|
||||
};
|
||||
|
||||
let text = format!(" {}{} ", fname, if doc.is_modified() { "[+]" } else { "" });
|
||||
let lang = doc.language_name().unwrap_or(DEFAULT_LANGUAGE_NAME);
|
||||
let config = editor.config();
|
||||
let icon = config.icons.mime.get(lang);
|
||||
|
||||
let text = if lang == icon {
|
||||
format!(" {} {}", fname, if doc.is_modified() { "[+] " } else { "" })
|
||||
} else {
|
||||
format!(
|
||||
" {icon} {} {}",
|
||||
fname,
|
||||
if doc.is_modified() { "[+] " } else { "" }
|
||||
)
|
||||
};
|
||||
|
||||
let used_width = viewport.x.saturating_sub(x);
|
||||
let rem_width = surface.area.width.saturating_sub(used_width);
|
||||
|
||||
|
|
|
@ -243,7 +243,13 @@ where
|
|||
if warnings > 0 {
|
||||
write(
|
||||
context,
|
||||
"●".to_string(),
|
||||
context
|
||||
.editor
|
||||
.config()
|
||||
.icons
|
||||
.diagnostic
|
||||
.warning()
|
||||
.to_string(),
|
||||
Some(context.editor.theme.get("warning")),
|
||||
);
|
||||
write(context, format!(" {} ", warnings), None);
|
||||
|
@ -252,7 +258,7 @@ where
|
|||
if errors > 0 {
|
||||
write(
|
||||
context,
|
||||
"●".to_string(),
|
||||
context.editor.config().icons.diagnostic.error().to_string(),
|
||||
Some(context.editor.theme.get("error")),
|
||||
);
|
||||
write(context, format!(" {} ", errors), None);
|
||||
|
@ -285,7 +291,13 @@ where
|
|||
if warnings > 0 {
|
||||
write(
|
||||
context,
|
||||
"●".to_string(),
|
||||
context
|
||||
.editor
|
||||
.config()
|
||||
.icons
|
||||
.diagnostic
|
||||
.warning()
|
||||
.to_string(),
|
||||
Some(context.editor.theme.get("warning")),
|
||||
);
|
||||
write(context, format!(" {} ", warnings), None);
|
||||
|
@ -294,7 +306,7 @@ where
|
|||
if errors > 0 {
|
||||
write(
|
||||
context,
|
||||
"●".to_string(),
|
||||
context.editor.config().icons.diagnostic.error().to_string(),
|
||||
Some(context.editor.theme.get("error")),
|
||||
);
|
||||
write(context, format!(" {} ", errors), None);
|
||||
|
@ -410,9 +422,13 @@ fn render_file_type<F>(context: &mut RenderContext, write: F)
|
|||
where
|
||||
F: Fn(&mut RenderContext, String, Option<Style>) + Copy,
|
||||
{
|
||||
let file_type = context.doc.language_name().unwrap_or(DEFAULT_LANGUAGE_NAME);
|
||||
let icons = &context.editor.config().icons;
|
||||
|
||||
write(context, format!(" {} ", file_type), None);
|
||||
let icon = icons
|
||||
.mime
|
||||
.get(context.doc.language_name().unwrap_or(DEFAULT_LANGUAGE_NAME));
|
||||
|
||||
write(context, format!(" {} ", icon), None);
|
||||
}
|
||||
|
||||
fn render_file_name<F>(context: &mut RenderContext, write: F)
|
||||
|
@ -514,13 +530,18 @@ fn render_version_control<F>(context: &mut RenderContext, write: F)
|
|||
where
|
||||
F: Fn(&mut RenderContext, String, Option<Style>) + Copy,
|
||||
{
|
||||
let head = context
|
||||
.doc
|
||||
.version_control_head()
|
||||
.unwrap_or_default()
|
||||
.to_string();
|
||||
let head = context.doc.version_control_head().unwrap_or_default();
|
||||
|
||||
write(context, head, None);
|
||||
let icons = &context.editor.config().icons;
|
||||
let icon = icons.vcs.icon();
|
||||
|
||||
let vcs = if head.is_empty() {
|
||||
format!("{head}")
|
||||
} else {
|
||||
format!("{icon} {head}")
|
||||
};
|
||||
|
||||
write(context, vcs, None);
|
||||
}
|
||||
|
||||
fn render_register<F>(context: &mut RenderContext, write: F)
|
||||
|
|
|
@ -54,6 +54,8 @@ log = "~0.4"
|
|||
parking_lot = "0.12.3"
|
||||
thiserror.workspace = true
|
||||
|
||||
smartstring = { version = "1.0.1", features = ["serde"]}
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
clipboard-win = { version = "5.4", features = ["std"] }
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ use crate::{
|
|||
events::{DocumentDidOpen, DocumentFocusLost},
|
||||
graphics::{CursorKind, Rect},
|
||||
handlers::Handlers,
|
||||
icons,
|
||||
info::Info,
|
||||
input::KeyEvent,
|
||||
register::Registers,
|
||||
|
@ -17,6 +18,7 @@ use crate::{
|
|||
use dap::StackFrame;
|
||||
use helix_event::dispatch;
|
||||
use helix_vcs::DiffProviderRegistry;
|
||||
use icons::Icons;
|
||||
|
||||
use futures_util::stream::select_all::SelectAll;
|
||||
use futures_util::{future, StreamExt};
|
||||
|
@ -362,6 +364,7 @@ pub struct Config {
|
|||
// Set to override the default clipboard provider
|
||||
pub clipboard_provider: ClipboardProvider,
|
||||
pub backup: BackupConfig,
|
||||
pub icons: Icons,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize, Eq, PartialOrd, Ord)]
|
||||
|
@ -1065,6 +1068,7 @@ impl Default for Config {
|
|||
end_of_line_diagnostics: DiagnosticFilter::Disable,
|
||||
clipboard_provider: ClipboardProvider::default(),
|
||||
backup: BackupConfig::default(),
|
||||
icons: Icons::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ impl GutterType {
|
|||
}
|
||||
|
||||
pub fn diagnostic<'doc>(
|
||||
_editor: &'doc Editor,
|
||||
editor: &'doc Editor,
|
||||
doc: &'doc Document,
|
||||
_view: &View,
|
||||
theme: &Theme,
|
||||
|
@ -57,6 +57,7 @@ pub fn diagnostic<'doc>(
|
|||
let info = theme.get("info");
|
||||
let hint = theme.get("hint");
|
||||
let diagnostics = &doc.diagnostics;
|
||||
let symbols = editor.config().icons.diagnostic.clone();
|
||||
|
||||
Box::new(
|
||||
move |line: usize, _selected: bool, first_visual_line: bool, out: &mut String| {
|
||||
|
@ -74,13 +75,14 @@ pub fn diagnostic<'doc>(
|
|||
.any(|ls| ls.id() == d.provider)
|
||||
});
|
||||
diagnostics_on_line.max_by_key(|d| d.severity).map(|d| {
|
||||
write!(out, "●").ok();
|
||||
match d.severity {
|
||||
Some(Severity::Error) => error,
|
||||
Some(Severity::Warning) | None => warning,
|
||||
Some(Severity::Info) => info,
|
||||
Some(Severity::Hint) => hint,
|
||||
}
|
||||
let (style, symbol) = match d.severity {
|
||||
Some(Severity::Error) => (error, symbols.error()),
|
||||
Some(Severity::Warning) | None => (warning, symbols.warning()),
|
||||
Some(Severity::Info) => (info, symbols.info()),
|
||||
Some(Severity::Hint) => (hint, symbols.hint()),
|
||||
};
|
||||
out.push_str(symbol);
|
||||
style
|
||||
})
|
||||
},
|
||||
)
|
||||
|
@ -272,7 +274,13 @@ pub fn breakpoints<'doc>(
|
|||
breakpoint_style
|
||||
};
|
||||
|
||||
let sym = if breakpoint.verified { "●" } else { "◯" };
|
||||
let config = editor.config();
|
||||
|
||||
let sym = if breakpoint.verified {
|
||||
config.icons.dap.verified()
|
||||
} else {
|
||||
config.icons.dap.unverified()
|
||||
};
|
||||
write!(out, "{}", sym).unwrap();
|
||||
Some(style)
|
||||
},
|
||||
|
|
467
helix-view/src/icons.rs
Normal file
467
helix-view/src/icons.rs
Normal file
|
@ -0,0 +1,467 @@
|
|||
use std::collections::HashMap;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use smartstring::{LazyCompact, SmartString};
|
||||
|
||||
type String = SmartString<LazyCompact>;
|
||||
|
||||
// TODO: Vcs { added , removed , ignored , modified , renamed }
|
||||
// TODO: Snippet {enabled, icon }
|
||||
// TODO: Text/Spellcheck { enabled, icon }
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone)]
|
||||
#[serde(default)]
|
||||
pub struct Icons {
|
||||
pub mime: Mime,
|
||||
pub lsp: Lsp,
|
||||
pub diagnostic: Diagnostic,
|
||||
pub vcs: Vcs,
|
||||
pub dap: Dap,
|
||||
}
|
||||
|
||||
// https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_documentSymbol
|
||||
#[derive(Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone)]
|
||||
pub struct Lsp {
|
||||
enabled: bool,
|
||||
|
||||
file: Option<String>,
|
||||
module: Option<String>,
|
||||
namespace: Option<String>,
|
||||
package: Option<String>,
|
||||
class: Option<String>,
|
||||
method: Option<String>,
|
||||
property: Option<String>,
|
||||
field: Option<String>,
|
||||
constructor: Option<String>,
|
||||
#[serde(rename = "enum")]
|
||||
r#enum: Option<String>,
|
||||
interface: Option<String>,
|
||||
function: Option<String>,
|
||||
variable: Option<String>,
|
||||
constant: Option<String>,
|
||||
string: Option<String>,
|
||||
number: Option<String>,
|
||||
boolean: Option<String>,
|
||||
array: Option<String>,
|
||||
object: Option<String>,
|
||||
key: Option<String>,
|
||||
null: Option<String>,
|
||||
enum_member: Option<String>,
|
||||
#[serde(rename = "struct")]
|
||||
r#struct: Option<String>,
|
||||
event: Option<String>,
|
||||
operator: Option<String>,
|
||||
type_parameter: Option<String>,
|
||||
}
|
||||
|
||||
impl Lsp {
|
||||
#[inline]
|
||||
pub fn file(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self.file.as_ref().map_or("", |file| file);
|
||||
}
|
||||
""
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn module(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self.module.as_ref().map_or("", |module| module);
|
||||
}
|
||||
""
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn namespace(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self.namespace.as_ref().map_or("", |namespace| namespace);
|
||||
}
|
||||
""
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn package(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self.package.as_ref().map_or("", |package| package);
|
||||
}
|
||||
""
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn class(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self.class.as_ref().map_or("", |class| class);
|
||||
}
|
||||
""
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn method(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self.method.as_ref().map_or("", |method| method);
|
||||
}
|
||||
""
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn property(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self.property.as_ref().map_or("", |property| property);
|
||||
}
|
||||
""
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn field(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self.field.as_ref().map_or("", |field| field);
|
||||
}
|
||||
""
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn constructor(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self
|
||||
.constructor
|
||||
.as_ref()
|
||||
.map_or("", |constructor| constructor);
|
||||
}
|
||||
""
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn r#enum(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self.r#enum.as_ref().map_or("", |r#enum| r#enum);
|
||||
}
|
||||
""
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn interface(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self.interface.as_ref().map_or("", |interface| interface);
|
||||
}
|
||||
""
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn function(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self.function.as_ref().map_or("", |function| function);
|
||||
}
|
||||
""
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn variable(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self.variable.as_ref().map_or("", |variable| variable);
|
||||
}
|
||||
""
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn constant(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self.constant.as_ref().map_or("", |constant| constant);
|
||||
}
|
||||
""
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn string(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self.string.as_ref().map_or("", |string| string);
|
||||
}
|
||||
""
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn number(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self.number.as_ref().map_or("", |number| number);
|
||||
}
|
||||
""
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn boolean(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self.boolean.as_ref().map_or("", |boolean| boolean);
|
||||
}
|
||||
""
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn array(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self.array.as_ref().map_or("", |array| array);
|
||||
}
|
||||
""
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn object(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self.object.as_ref().map_or("", |object| object);
|
||||
}
|
||||
""
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn key(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self.key.as_ref().map_or("", |key| key);
|
||||
}
|
||||
""
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn null(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self.null.as_ref().map_or("", |null| null);
|
||||
}
|
||||
""
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn enum_member(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self
|
||||
.enum_member
|
||||
.as_ref()
|
||||
.map_or("", |enum_member| enum_member);
|
||||
}
|
||||
""
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn r#struct(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self.r#struct.as_ref().map_or("", |r#struct| r#struct);
|
||||
}
|
||||
""
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn event(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self.event.as_ref().map_or("", |event| event);
|
||||
}
|
||||
""
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn operator(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self.operator.as_ref().map_or("", |operator| operator);
|
||||
}
|
||||
""
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn type_parameter(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self
|
||||
.type_parameter
|
||||
.as_ref()
|
||||
.map_or("", |type_parameter| type_parameter);
|
||||
}
|
||||
""
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone, Default)]
|
||||
pub struct Diagnostic {
|
||||
hint: Option<String>,
|
||||
info: Option<String>,
|
||||
warning: Option<String>,
|
||||
error: Option<String>,
|
||||
}
|
||||
|
||||
impl Diagnostic {
|
||||
#[inline]
|
||||
pub fn hint(&self) -> &str {
|
||||
self.hint.as_ref().map_or("○", |hint| hint)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn info(&self) -> &str {
|
||||
self.info.as_ref().map_or("●", |info| info)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn warning(&self) -> &str {
|
||||
self.warning.as_ref().map_or("▲", |warning| warning)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn error(&self) -> &str {
|
||||
self.error.as_ref().map_or("■", |error| error)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone, Default)]
|
||||
pub struct Vcs {
|
||||
enabled: bool,
|
||||
icon: Option<String>,
|
||||
}
|
||||
|
||||
impl Vcs {
|
||||
#[inline]
|
||||
pub fn icon(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self.icon.as_ref().map_or("", |icon| icon.as_str());
|
||||
}
|
||||
""
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone, Default)]
|
||||
pub struct Mime {
|
||||
enabled: bool,
|
||||
directory: Option<String>,
|
||||
#[serde(flatten)]
|
||||
mime: HashMap<String, String>,
|
||||
}
|
||||
|
||||
static MIMES: once_cell::sync::Lazy<HashMap<String, String>> = once_cell::sync::Lazy::new(|| {
|
||||
let mut mimes = HashMap::new();
|
||||
|
||||
mimes.insert(String::from("rust"), String::from(""));
|
||||
mimes.insert(String::from("python"), String::from(""));
|
||||
mimes.insert(String::from("c"), String::from(""));
|
||||
mimes.insert(String::from("cpp"), String::from(""));
|
||||
mimes.insert(String::from("c-sharp"), String::from(""));
|
||||
mimes.insert(String::from("d"), String::from(""));
|
||||
mimes.insert(String::from("elixir"), String::from(""));
|
||||
mimes.insert(String::from("fsharp"), String::from(""));
|
||||
mimes.insert(String::from("go"), String::from(""));
|
||||
mimes.insert(String::from("haskell"), String::from(""));
|
||||
mimes.insert(String::from("java"), String::from(""));
|
||||
mimes.insert(String::from("javascript"), String::from(""));
|
||||
mimes.insert(String::from("kotlin"), String::from(""));
|
||||
mimes.insert(String::from("html"), String::from(""));
|
||||
mimes.insert(String::from("css"), String::from(""));
|
||||
mimes.insert(String::from("scss"), String::from(""));
|
||||
mimes.insert(String::from("typescript"), String::from(""));
|
||||
mimes.insert(String::from("bash"), String::from(""));
|
||||
mimes.insert(String::from("php"), String::from(""));
|
||||
mimes.insert(String::from("powershell"), String::from(""));
|
||||
mimes.insert(String::from("dart"), String::from(""));
|
||||
mimes.insert(String::from("ruby"), String::from(""));
|
||||
mimes.insert(String::from("swift"), String::from(""));
|
||||
mimes.insert(String::from("r"), String::from(""));
|
||||
mimes.insert(String::from("groovy"), String::from(""));
|
||||
mimes.insert(String::from("scala"), String::from(""));
|
||||
mimes.insert(String::from("perl"), String::from(""));
|
||||
mimes.insert(String::from("clojure"), String::from(""));
|
||||
mimes.insert(String::from("julia"), String::from(""));
|
||||
mimes.insert(String::from("zig"), String::from(""));
|
||||
mimes.insert(String::from("fortran"), String::from(""));
|
||||
mimes.insert(String::from("erlang"), String::from(""));
|
||||
mimes.insert(String::from("ocaml"), String::from(""));
|
||||
mimes.insert(String::from("crystal"), String::from(""));
|
||||
mimes.insert(String::from("svelte"), String::from(""));
|
||||
mimes.insert(String::from("gdscript"), String::from(""));
|
||||
mimes.insert(String::from("nim"), String::from(""));
|
||||
mimes.insert(String::from("jsx"), String::from(""));
|
||||
mimes.insert(String::from("tsx"), String::from(""));
|
||||
mimes.insert(String::from("twig"), String::from(""));
|
||||
mimes.insert(String::from("lua"), String::from(""));
|
||||
mimes.insert(String::from("vue"), String::from(""));
|
||||
mimes.insert(String::from("prolog"), String::from(""));
|
||||
mimes.insert(String::from("common-lisp"), String::from(""));
|
||||
mimes.insert(String::from("elm"), String::from(""));
|
||||
mimes.insert(String::from("rescript"), String::from(""));
|
||||
mimes.insert(String::from("solidity"), String::from(""));
|
||||
mimes.insert(String::from("vala"), String::from(""));
|
||||
mimes.insert(String::from("scheme"), String::from(""));
|
||||
mimes.insert(String::from("v"), String::from(""));
|
||||
mimes.insert(String::from("prisma"), String::from(""));
|
||||
mimes.insert(String::from("ada"), String::from(""));
|
||||
mimes.insert(String::from("astro"), String::from(""));
|
||||
mimes.insert(String::from("matlab"), String::from(""));
|
||||
mimes.insert(String::from("rst"), String::from(""));
|
||||
mimes.insert(String::from("opencl"), String::from(""));
|
||||
mimes.insert(String::from("nunjuks"), String::from(""));
|
||||
mimes.insert(String::from("jinja"), String::from(""));
|
||||
|
||||
mimes.insert(String::from("bicep"), String::from(""));
|
||||
|
||||
mimes.insert(String::from("wasm"), String::from(""));
|
||||
|
||||
mimes.insert(String::from("docker"), String::from(""));
|
||||
mimes.insert(String::from("docker-compose"), String::from(""));
|
||||
mimes.insert(String::from("make"), String::from(""));
|
||||
mimes.insert(String::from("cmake"), String::from(""));
|
||||
mimes.insert(String::from("nix"), String::from(""));
|
||||
mimes.insert(String::from("awk"), String::from(""));
|
||||
mimes.insert(String::from("llvm"), String::from(""));
|
||||
mimes.insert(String::from("llvm-mir"), String::from(""));
|
||||
mimes.insert(String::from("regex"), String::from(""));
|
||||
mimes.insert(String::from("graphql"), String::from(""));
|
||||
|
||||
mimes.insert(String::from("text"), String::from(""));
|
||||
mimes.insert(String::from("markdown"), String::from(""));
|
||||
mimes.insert(String::from("typst"), String::from(""));
|
||||
mimes.insert(String::from("json"), String::from(""));
|
||||
mimes.insert(String::from("toml"), String::from(""));
|
||||
mimes.insert(String::from("xml"), String::from(""));
|
||||
mimes.insert(String::from("latex"), String::from(""));
|
||||
mimes.insert(String::from("git-commit"), String::from(""));
|
||||
mimes.insert(String::from("git-rebase"), String::from(""));
|
||||
mimes.insert(String::from("git-config"), String::from(""));
|
||||
mimes.insert(String::from("todotxt"), String::from(""));
|
||||
mimes.insert(String::from("hyprlang"), String::from(""));
|
||||
mimes.insert(String::from("helm"), String::from(""));
|
||||
mimes.insert(String::from("nginx"), String::from(""));
|
||||
|
||||
mimes
|
||||
});
|
||||
|
||||
impl Mime {
|
||||
#[inline]
|
||||
pub fn directory(&self) -> &str {
|
||||
if self.enabled {
|
||||
return self.directory.as_ref().map_or("", |directory| directory);
|
||||
} else if let Some(directory) = &self.directory {
|
||||
return directory;
|
||||
}
|
||||
""
|
||||
}
|
||||
|
||||
// Returns the symbol that matches the name, if any, otherwise returns the name back.
|
||||
#[inline]
|
||||
pub fn get<'name, 'mime: 'name>(&'mime self, name: &'name str) -> &'name str {
|
||||
if self.enabled {
|
||||
if let Some(symbol) = self.mime.get(name) {
|
||||
return symbol;
|
||||
} else if let Some(symbol) = MIMES.get(name) {
|
||||
return symbol;
|
||||
}
|
||||
}
|
||||
name
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone, Default)]
|
||||
pub struct Dap {
|
||||
verified: Option<String>,
|
||||
unverified: Option<String>,
|
||||
}
|
||||
|
||||
impl Dap {
|
||||
#[inline]
|
||||
pub fn verified(&self) -> &str {
|
||||
self.verified.as_ref().map_or("●", |verified| verified)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn unverified(&self) -> &str {
|
||||
self.verified.as_ref().map_or("◯", |verified| verified)
|
||||
}
|
||||
}
|
|
@ -10,6 +10,7 @@ pub mod events;
|
|||
pub mod graphics;
|
||||
pub mod gutter;
|
||||
pub mod handlers;
|
||||
pub mod icons;
|
||||
pub mod info;
|
||||
pub mod input;
|
||||
pub mod keyboard;
|
||||
|
|
|
@ -1316,7 +1316,7 @@ file-types = ["tl"]
|
|||
comment-tokens = "--"
|
||||
block-comment-tokens = { start = "--[[", end = "--]]" }
|
||||
roots = [ "tlconfig.lua" ]
|
||||
language-servers = [ "teal-lsp" ]
|
||||
language-servers = [ "teal-language-server" ]
|
||||
|
||||
[[language]]
|
||||
name = "svelte"
|
||||
|
|
Loading…
Reference in a new issue