SHA256
1
0
forked from pool/helix
helix/helix.spec
Soc Virnyl Estela 225b1ae015 - Update to version 22.12:
* Breaking changes:
    - Remove readline-like navigation bindings from the default insert mode keymap (e12690e, #3811, #3827, #3915, #4088)
    - Rename append_to_line as insert_at_line_end and prepend_to_line as insert_at_line_start (#3753)
    - Swap diagnostic picker and debug mode bindings in the space keymap (#4229)
    - Select newly inserted text on paste or from shell commands (#4458, #4608, #4619, #4824)
    - Select newly inserted surrounding characters on ms<char> (#4752)
    - Exit select-mode after executing replace_* commands (#4554)
    - Exit select-mode after executing surround commands (#4858)
    - Change tree-sitter text-object keys (#3782)
    - Rename fleetish theme to fleet_dark (#4997)
  * Features:
    - Bufferline (#2759)
    - Support underline styles and colors (#4061, 98c121c)
    - Inheritance for themes (#3067, #4096)
    - Cursorcolumn (#4084)
    - Overhauled system for writing files and quiting (#2267, #4397)
    - Autosave when terminal loses focus (#3178)
    - Use OSC52 as a fallback for the system clipboard (#3220)
    - Show git diffs in the gutter (#3890, #5012, #4995)
    - Add a logo (dc1ec56)
    - Multi-cursor completion (#4496)
  * Commands:
    - file_picker_in_current_directory (<space>F) (#3701)
    - :lsp-restart to restart the current document's language server (#3435, #3972)
    - join_selections_space (A-j) which joins selections and selects the joining whitespace (#3549)
    - :update to write the current file if it is modified (#4426)
    - :lsp-workspace-command for picking LSP commands to execute (#3140)
    - extend_prev_word_end - the extend variant for move_prev_word_end (7468fa2)
    - make_search_word_bounded which adds regex word boundaries to the current search register value (#4322)
    - :reload-all - :reload for all open buffers (#4663, #4901)
    - goto_next_change (]g), goto_prev_change ([g), goto_first_change ([G), goto_last_change (]G) textobjects for jumping between VCS changes (#4650)
  * Usability improvements and fixes:
    - Don't log 'LSP not defined' errors in the logfile (1caba2d)
    - Look for the external formatter program before invoking it (#3670)
    - Don't send LSP didOpen events for documents without URLs (44b4479)
    - Fix off-by-one in extend_line_above command (#3689)
    - Use the original scroll offset when opening a split (1acdfaa)
    - Handle auto-formatting failures and save the file anyway (#3684)
    - Ensure the cursor is in view after :reflow (#3733)
    - Add default rulers and reflow config for git commit messages (#3738)
    - Improve grammar fetching and building output (#3773)
    - Add a text language to language completion (cc47d3f)
    - Improve error handling for :set-language (e8add6f)
    - Improve error handling for :config-reload (#3668)
    - Improve error handling when passing improper ranges to syntax highlighting (#3826)
    - Render <code> tags as raw markup in markdown (#3425)
    - Remove border around the LSP code-actions popup (#3444)
    - Canonicalize the path to the runtime directory (#3794)
    - Add a themelint xtask for linting themes (#3234)
    - Re-sort LSP diagnostics after applying transactions (#3895, #4319)
    - Add a command-line flag to specify the log file (#3807)
    - Track source and tag information in LSP diagnostics (#3898, 1df32c9)
    - Fix theme returning to normal when exiting the :theme completion (#3644)
    - Improve error messages for invalid commands in the keymap (#3931)
    - Deduplicate regexs in search_selection command (#3941)
    - Split the finding of LSP root and config roots (#3929)
    - Ensure that the cursor is within view after auto-formatting (#4047)
    - Add pseudo-pending to commands with on-next-key callbacks (#4062, #4077)
    - Add live preview to :goto (#2982)
    - Show regex compilation failure in a popup (#3049)
    - Add 'cycled to end' and 'no more matches' for search (#3176, #4101)
    - Add extending behavior to tree-sitter textobjects (#3266)
    - Add ui.gutter.selected option for themes (#3303)
    - Make statusline mode names configurable (#3311)
    - Add a statusline element for total line count (#3960)
    - Add extending behavior to goto_window_* commands (#3985)
    - Fix a panic in signature help when the preview is too large (#4030)
    - Add command names to the command palette (#4071, #4223, #4495)
    - Find the LSP workspace root from the current document's path (#3553)
    - Add an option to skip indent-guide levels (#3819, 2c36e33)
    - Change focus to modified docs on quit (#3872)
    - Respond to USR1 signal by reloading config (#3952)
    - Exit gracefully when the close operation fails (#4081)
    - Fix goto/view center mismatch (#4135)
    - Highlight the current file picker document on idle-timeout (#3172, a85e386)
    - Apply transactions to jumplist selections (#4186, #4227, #4733, #4865, #4912, #4965, #4981)
    - Use space as a separator for fuzzy matcher (#3969)
    - Overlay all diagnostics with highest severity on top (#4113)
    - Avoid re-parsing unmodified tree-sitter injections (#4146)
    - Add extending captures for indentation, re-enable python indentation (#3382, 3e84434)
    - Only allow either --vsplit or --hsplit CLI flags at once (#4202)
    - Fix append cursor location when selection anchor is at the end of the document (#4147)
    - Improve selection yanking message (#4275)
    - Log failures to load tree-sitter grammars as errors (#4315)
    - Fix rendering of lines longer than 65,536 columns (#4172)
    - Skip searching .git in global_search (#4334)
    - Display tree-sitter scopes in a popup (#4337)
    - Fix deleting a word from the end of the buffer (#4328)
    - Pretty print the syntax tree in :tree-sitter-subtree (#4295, #4606)
    - Allow specifying suffixes for file-type detection (#2455, #4414)
    - Fix multi-byte auto-pairs (#4024)
    - Improve sort scoring for LSP code-actions and completions (#4134)
    - Fix the handling of quotes within shellwords (#4098)
    - Fix delete_word_backward and delete_word_forward on newlines (#4392)
    - Fix 'no entry found for key' crash on :write-all (#4384)
    - Remove lowercase requirement for tree-sitter grammars (#4346)
    - Resolve LSP completion items on idle-timeout (#4406, #4797)
    - Render diagnostics in the file picker preview (#4324)
    - Fix terminal freezing on shell_insert_output (#4156)
    - Allow use of the count in the repeat operator (.) (#4450)
    - Show the current theme name on :theme with no arguments (#3740)
    - Fix rendering in very large terminals (#4318)
    - Sort LSP preselected items to the top of the completion menu (#4480)
    - Trim braces and quotes from paths in goto-file (#4370)
    - Prevent automatic signature help outside of insert mode (#4456)
    - Fix freezes with external programs that process stdin and stdout concurrently (#4180)
    - Make scroll aware of tabs and wide characters (#4519)
    - Correctly handle escaping in command_mode completion (#4316, #4587, #4632)
    - Fix delete_char_backward for paired characters (#4558)
    - Fix crash from two windows editing the same document (#4570)
    - Fix pasting from the blackhole register (#4497)
    - Support LSP insertReplace completion items (1312682)
    - Dynamically resize the line number gutter width (#3469)
    - Fix crash for unknown completion item kinds (#4658)
    - Re-enable format_selections for single selection ranges (d4f5cab)
    - Limit the number of in-progress tree-sitter query matches (#4707, #4830)
    - Use the special # register with increment/decrement to change by range number (#4418)
    - Add a statusline element to show number of selected chars (#4682)
    - Add a statusline element showing global LSP diagnostic warning and error counts (#4569)
    - Add a scrollbar to popups (#4449)
    - Prefer shorter matches in fuzzy matcher scoring (#4698)
    - Use key-sequence format for command palette keybinds (#4712)
    - Remove prefix filtering from autocompletion menu (#4578)
    - Focus on the parent buffer when closing a split (#4766)
    - Handle language server termination (#4797, #4852)
    - Allow r/t/f to work on tab characters (#4817)
    - Show a preview for scratch buffers in the buffer picker (#3454)
    - Set a limit of entries in the jumplist (#4750)
    - Re-use shell outputs when inserting or appending shell output (#3465)
    - Check LSP server provider capabilities (#3554)
    - Improve tree-sitter parsing performance on files with many language layers (#4716)
    - Move indentation to the next line when using <ret> on a line with only whitespace (#4854)
    - Remove selections for closed views from all documents (#4888)
    - Improve performance of the :reload command (#4457)
    - Properly handle media keys (#4887)
    - Support LSP diagnostic data field (#4935)
    - Handle C-i keycode as tab (#4961)
    - Fix view alignment for jumplist picker jumps (#3743)
    - Use OSC52 for tmux clipboard provider (#5027)
  * Other new changes can be found in https://github.com/helix-editor/helix/blob/master/CHANGELOG.md#2212-2022-12-06
- Improve _service file
- Remove helix.png since new logo is now shipped in the tarball

OBS-URL: https://build.opensuse.org/package/show/editors/helix?expand=0&rev=39
2022-12-07 11:57:39 +00:00

173 lines
5.5 KiB
RPMSpec

#
# spec file for package helix
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global _helix_runtimedir %{_sharedstatedir}/%{name}/runtime
Name: helix
Version: 22.12
Release: 0
Summary: A post-modern modal text editor written in Rust
License: (Apache-2.0 OR MIT) AND BSD-3-Clause AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT or Unlicense) AND (Zlib OR Apache-2.0 OR MIT) AND Apache-2.0 AND BSL-1.0 AND ISC AND MIT AND MPL-2.0+ AND Zlib AND MPL-2.0
URL: https://github.com/helix-editor/helix
Source0: %{url}/releases/download/%{version}/%{name}-%{version}-source.tar.xz#/%{name}-%{version}.tar.xz
Source1: vendor.tar.xz
Source2: cargo_config
Source3: helix-rpmlintrc
Source4: README-suse-maint.md
BuildRequires: c++_compiler
BuildRequires: c_compiler
BuildRequires: cargo-packaging
Suggests: %{name}-runtime
ExclusiveArch: %{rust_arches}
%description
A kakoune/neovim inspired modal text editor with built-in LSP and
has treesitter support for syntax highlighting and improved navigation
%package bash-completion
Summary: Bash Completion for %{name}
Group: System/Shells
Supplements: (%{name} and bash-completion)
Requires: bash-completion
BuildArch: noarch
%description bash-completion
Bash command-line completion support for %{name}.
%package fish-completion
Summary: Fish Completion for %{name}
Group: System/Shells
Supplements: (%{name} and fish)
Requires: fish
BuildArch: noarch
%description fish-completion
Fish command-line completion support for %{name}.
%package zsh-completion
Summary: Zsh Completion for %{name}
Group: System/Shells
Supplements: (%{name} and zsh)
Requires: zsh
BuildArch: noarch
%description zsh-completion
Zsh command-line completion support for %{name}.
%prep
%autosetup -a1 -c -n %{name}-%{version}
mkdir -p .cargo
cp %{SOURCE2} .cargo/config
%package runtime
Summary: Runtime files for %{name}
Suggests: %{name}
%description runtime
Helix runtime files. Separated due to how huge the runtime files are.
The runtime contains tree-sitter and grammars that makes run helix normally
if there is no runtime present in the users config directory specifically
`XDG_CONFIG_HOME/helix`.
%build
export HELIX_DISABLE_AUTO_GRAMMAR_BUILD=true
%{cargo_build}
HELIX_RUNTIME="$PWD/runtime" ./target/release/hx --grammar build
# Shell completions
sed -i "s|hx|helix|g" contrib/completion/hx.*
# Desktop file
sed -i "s|hx|helix|g" contrib/Helix.desktop
%install
mkdir -p %{buildroot}%{_libdir}/%{name}
mkdir -p %{buildroot}%{_helix_runtimedir}
install -m 0755 %{_builddir}/%{name}-%{version}/target/release/hx %{buildroot}%{_libdir}/%{name}/hx
cp -rv "runtime/queries" %{buildroot}%{_helix_runtimedir}
cp -rv "runtime/themes" %{buildroot}%{_helix_runtimedir}
find "%{_builddir}/%{name}-%{version}/runtime/grammars" -type f -name '*.so' -exec \
install --verbose -Dm 755 {} -t "%{buildroot}%{_helix_runtimedir}/grammars" \;
install -Dm644 runtime/tutor.txt -t %{buildroot}%{_helix_runtimedir}
ln -sv %{_helix_runtimedir} %{buildroot}%{_libdir}/%{name}/runtime
install -D -d -m 0755 %{buildroot}%{_bindir}
ln -sv %{_libdir}/%{name}/hx %{buildroot}%{_bindir}/%{name}
# Desktop application file
install -Dm644 -T %{_builddir}/%{name}-%{version}/contrib/Helix.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
# Icon
install -Dm644 -T %{_builddir}/%{name}-%{version}/contrib/%{name}.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
# Shell completions
install -Dm644 -T %{_builddir}/%{name}-%{version}/contrib/completion/hx.bash %{buildroot}%{_datadir}/bash-completion/completions/%{name}
install -Dm644 -T %{_builddir}/%{name}-%{version}/contrib/completion/hx.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/%{name}.fish
install -Dm644 -T %{_builddir}/%{name}-%{version}/contrib/completion/hx.zsh %{buildroot}%{_datadir}/zsh/site-functions/_%{name}
%files
%license LICENSE
%doc README.md CHANGELOG.md languages.toml docs/CONTRIBUTING.md docs/architecture.md docs/vision.md
%dir %{_libdir}/%{name}
# Desktop application file
%{_datadir}/pixmaps/*
%{_datadir}/applications/*
# hx symlinked as helix
%{_bindir}/%{name}
# The real hx binary
%{_libdir}/%{name}/hx
# Tutor
%{_helix_runtimedir}/tutor.txt
%files runtime
# Runtimes and runtime files
%dir %{_sharedstatedir}/%{name}
%dir %{_helix_runtimedir}
%dir %{_helix_runtimedir}/queries
%dir %{_helix_runtimedir}/themes
%dir %{_helix_runtimedir}/grammars
# Grammars
%{_helix_runtimedir}/grammars/*
# Queries
%{_helix_runtimedir}/queries/*
# Themes
%{_helix_runtimedir}/themes/*
# Symlinked runtime directory
%{_libdir}/%{name}/runtime
%files bash-completion
%{_datadir}/bash-completion/*
%files fish-completion
%dir %{_datadir}/fish
%{_datadir}/fish/*
%files zsh-completion
%dir %{_datadir}/zsh
%{_datadir}/zsh/*
%changelog