2022-04-20 11:56:13 +00:00
|
|
|
#
|
|
|
|
# spec file for package helix
|
|
|
|
#
|
2023-02-11 00:22:01 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2022-04-20 11:56:13 +00:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
2023-03-06 10:31:07 +00:00
|
|
|
# Workaround for quilt to work
|
|
|
|
%if "x%{?rust_arches}" == "x"
|
|
|
|
%global rust_arches x86_64
|
|
|
|
%endif
|
2022-05-19 01:49:22 +00:00
|
|
|
|
2023-03-06 10:31:07 +00:00
|
|
|
%global _helix_runtimedir %{_libdir}/%{name}/runtime
|
2022-04-20 11:56:13 +00:00
|
|
|
|
|
|
|
Name: helix
|
Accepting request 1163703 from home:smolsheep:upgrades
- Remove obsolete cargo_config and references in spec
- Update to version 24.03:
Breaking changes:
* suffix file-types in the file-types key in language
configuration have been removed
* The file-types key in language configuration no longer matches
full filenames without a glob pattern
Features:
* Open URLs with the goto_file command
* Support drawing a border around popups and menus
* Track long lived diagnostic sources like Clippy or rustc
* This improves the handling of diagnostics from sources that
only update the diagnostic positions on save.
* Add support for LSP window/showDocument requests
* Refactor ad-hoc hooks to use a new generic event system
* This improves the behavior of autocompletions. For example
navigating in insert mode no longer automatically triggers
completions.
* Allow using globs in the language configuration file-types key
* Allow specifying required roots for situational LSP activation
* Extend selections using mouse clicks in select mode
* Toggle block comments
* Support LSP diagnostic tags
* Add a file-absolute-path statusline element
* Cross injection layers in tree-sitter motions (A-p/A-o/A-i/A-n)
* Add a Amp-editor-like jumping command
Commands:
* :move - move buffers with LSP support
* page_cursor_up, page_cursor_down, page_cursor_half_up,
page_cursor_half_down - commands for scrolling the cursor and
page together
* :yank-diagnostic - yank the diagnostic(s) under the primary
cursor
* select_line_above / select_line_below - extend or shrink a
selection based on the direction and anchor
Usability improvements:
* Make roots key of [[language]] entries in languages.toml
configuration optional
* Exit select mode in commands that modify the buffer
* Use crossterm cursor when out of focus
* Join empty lines with only one space in join_selections
* Introduce a hybrid tree-sitter and contextual indentation
heuristic
* Allow configuring the indentation heuristic
* Check for LSP rename support before showing rename prompt
* Normalize S-<lower-ascii> keymaps to uppercase ascii
* Add formatter status to --health output
* Change path normalization strategy to not resolve symlinks
* Select subtree within injections in :tree-sitter-subtree
* Use tilde expansion and normalization for $HELIX_RUNTIME paths
* Improve failure message for LSP goto references
* Use injection syntax trees for bracket matching
* Respect injections in :tree-sitter-highlight-name
* Respect injections in move_parent_node_end
* Use gix pipeline filter instead of manual CRLF implementation
* Follow Neovim's truecolor detection
* Reload language configuration with :reload, SIGHUP
* Allow numbers as bindings
* Respect undercurl config when terminfo is not available
* Ignore .pijul, .hg, .jj in addition to .git in file pickers
configured to show hidden files
* Add completion for registers to :clear-register and
:yank-diagnostic
* Repeat last motion for goto next/prev diagnostic
* Allow configuring a character to use when rendering narrow
no-breaking space
* Switch to a streaming regex engine
Fixes:
* Swap * and + registers
* Use terminfo to reset terminal cursor style
* Fix precedence of @align captures in indentat computation
* Only render the preview if a Picker has a preview function
* Fix the precedence of ui.virtual.whitespace
* Fix crash in :indent-style
* Fix didSave text inclusion when sync capability is a kind
variant
* Update the history of newly focused views
* Initialize diagnostics when opening a document
* Sync views when applying edits to unfocused views
* Treat non-numeric +args passed in the CLI args as filenames
* Fix crash when using mm on an empty plaintext file
* Ignore empty tree-sitter nodes in match bracket
* Exit a language server if it sends a message with invalid JSON
* Handle failures to enable bracketed paste
* Gate all captures in a pattern behind #is-not? local predicates
* Make path changes LSP spec conformant
* Use range positions to determine insert_newline motion
* Fix division by zero when prompt completion area is too small
* Add changes to history in clipboard replacement typable
commands
* Fix a crash in DAP with an unspecified line in breakpoints
* Fix space handling for filenames in bash completion
* Key diagnostics off of paths instead of LSP URIs
* Fix panic when using join_selections_space
* Fix panic when using surround_replace, surround_delete
* Fix panic in surround_replace, surround_delete with nested
surrounds and multiple cursors
* Fix panic in select_textobject_around
* Don't stop reloading documents when reloading fails in
:reload-all
* Prevent shell_keep_pipe from stopping on nonzero exit status
codes
Themes:
* Added gruber-dark, polmandres, starlight, modus operandi
themes, modus vivendi themes, horizon-dark, ttox, voxed,
gruvbox_light_soft, gruvbox_light_hard, curzon, monokai_soda,
term16_dark, term16_light, jetbrains_dark
* Updated rose_pine, darcula, everblush, papercolor, naysayer,
noctis, nord, monokai pro themes, tokyonight themes, sonokai,
onedark, onedarker, cyan_light, GitHub themes, Zed themes,
catppuccin themes, rasmus, dark_plus, gruvbox themes, material
themes
* Added jump label themeing to dracula, horizon-dark, catppuccin
themes, onedark themes, rose-pine themes, Nord themes, Monokai
themes, gruvbox themes, kanagawa
New languages:
* Typst, LPF, GN, DBML, log, Janet, Agda, Avro, Smali, HOCON,
Tact, PKL, CEL, SpiceDB, Hoon, DockerCompose, Groovy, FIDL,
Powershell, ld, Hyperland config, JSONC, PHP Blade,
SuperCollider, Koka, PKGBUILD, Ada, Helm charts, Ember.js
templates, Ohm
Updated languages and queries:
* Add HTML injection queries for Rust
* Switch to tree-sitter-ron for RON
* Update and improve comment highlighting
* Highlight type parameters in Rust
* Change KDL tree-sitter parsers
* Update tree-sitter-markdown
* Update tree-sitter-purescript
* Add type parameter highlighting to TypeScript, Go, Haskell,
OCaml and Kotlin
* Add indentation queries for Scheme and lisps using
tree-sitter-scheme
* Recognize meson_options.txt as Meson
* Add language server configuration for Nushell
* Recognize musicxml as XML
* Update tree-sitter-rescript
* Update tree-sitter-python
* Recognize .envrc.local and .envrc.private as env
* Update tree-sitter-gleam
* Update tree-sitter-d
* Fix R-markdown language name for LSP detection
* Add haskell-language-server LSP configuration
* Recognize glif as XML
* Recognize .prettierrc as JSON
* Add auto-pairs configuration for scheme
* Add textobject queries for Scala
* Add textobject queries for Protobuf
* Update tree-sitter-wren
* Add spago.yaml as an LSP root for PureScript
* Improve highlight and indent queries for Bash, Make and CSS
* Update tree-sitter-scala
* Recognize .bash_history as Bash
* Recognize Helix ignore files as ignore
* Inject SQL into Scala SQL strings
* Update gdscript textobjects
* Update Go queries
* Update tree-sitter-nushell
* Update tree-sitter-unison, add indent queries
* Update tree-sitter-slint
* Update tree-sitter-swift
* Add fish_indent as formatter for fish
* Recognize zon as Zig
* Add a formatter for Odin
* Update tree-sitter-erlang
* Capture Rust fields as argument textobjects
* Improve Dart textobjects
* Recognize tmux.conf as a bash file-type
* Add textobjects queries for Nix
* Add textobjects queries for HCL
* Recognize osm and osc extensions as XML
* Update tree-sitter-sql
* Recognize pde Processing files as Java
* Update tree-sitter-lua
* Switch tree-sitter-nim parsers
* Recognize GTK builder ui files as XML
* Add configuration for markdown-oxide language server
* Add a shebang for elvish
* Fix precedence of Svelte TypeScript injection
* Recognize common Dockerfile file types
* Recognize NUON files as Nu
* Add textobjects for Java native functions and constructors
* Fix "braket" typeo in JSX highlights
* Update tree-sitter-hurl
* Add textobjects queries for Vala
* Update tree-sitter-git-config
* Recognize 'mmd' as Mermaid
* Highlight Rust extern crate aliases
* Improve parameter highlighting in C++
* Recognize 'rclone.conf' as INI
* Add injections for GraphQL and ERB in Ruby heredocs
* Add main.odin to Odin LSP roots
OBS-URL: https://build.opensuse.org/request/show/1163703
OBS-URL: https://build.opensuse.org/package/show/editors/helix?expand=0&rev=85
2024-03-30 15:23:56 +00:00
|
|
|
Version: 24.03
|
2022-04-20 11:56:13 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: A post-modern modal text editor written in Rust
|
2023-04-06 09:38:59 +00:00
|
|
|
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
|
2022-05-19 01:49:22 +00:00
|
|
|
URL: https://github.com/helix-editor/helix
|
2023-03-06 10:31:07 +00:00
|
|
|
# This tarball includes fetched grammars
|
2023-04-06 09:38:59 +00:00
|
|
|
Source0: https://github.com/helix-editor/helix/releases/download/%{version}/%{name}-%{version}-source.tar.xz#/%{name}-%{version}.tar.xz
|
2023-10-28 09:52:02 +00:00
|
|
|
Source1: vendor.tar.zst
|
2022-12-07 13:09:50 +00:00
|
|
|
Source3: README-suse-maint.md
|
2022-12-07 13:24:38 +00:00
|
|
|
Source4: helix-rpmlintrc
|
2022-05-30 14:50:15 +00:00
|
|
|
BuildRequires: c++_compiler
|
|
|
|
BuildRequires: c_compiler
|
2023-08-31 23:44:52 +00:00
|
|
|
BuildRequires: cargo-packaging
|
2022-12-07 12:39:46 +00:00
|
|
|
BuildRequires: hicolor-icon-theme
|
2023-03-01 00:05:14 +00:00
|
|
|
BuildRequires: update-desktop-files
|
2023-10-28 10:22:50 +00:00
|
|
|
BuildRequires: git
|
2023-04-16 01:08:44 +00:00
|
|
|
Recommends: %{name}-runtime = %{version}
|
2022-05-19 01:45:13 +00:00
|
|
|
ExclusiveArch: %{rust_arches}
|
2022-04-20 11:56:13 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
A kakoune/neovim inspired modal text editor with built-in LSP and
|
|
|
|
has treesitter support for syntax highlighting and improved navigation
|
|
|
|
|
2022-10-15 10:18:45 +00:00
|
|
|
%package bash-completion
|
|
|
|
Summary: Bash Completion for %{name}
|
|
|
|
Group: System/Shells
|
|
|
|
Supplements: (%{name} and 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)
|
|
|
|
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)
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description zsh-completion
|
|
|
|
Zsh command-line completion support for %{name}.
|
|
|
|
|
2022-08-28 14:06:56 +00:00
|
|
|
%package runtime
|
|
|
|
Summary: Runtime files for %{name}
|
2023-04-16 01:08:44 +00:00
|
|
|
Version: %{version}
|
2023-06-22 12:40:49 +00:00
|
|
|
Requires: %{name}
|
2022-08-28 13:34:19 +00:00
|
|
|
|
|
|
|
%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`.
|
|
|
|
|
2023-03-06 10:31:07 +00:00
|
|
|
%prep
|
|
|
|
%autosetup -a1 -p1 -c -n %{name}-%{version}
|
|
|
|
|
|
|
|
# Remove shell definitions
|
|
|
|
sed -e '/^\#\!\/usr\/bin\/env .*/d' -i contrib/completion/hx.*
|
|
|
|
|
2022-04-20 11:56:13 +00:00
|
|
|
%build
|
2023-05-22 14:44:08 +00:00
|
|
|
export HELIX_DISABLE_AUTO_GRAMMAR_BUILD=true
|
2023-05-22 23:22:20 +00:00
|
|
|
export TARGET="%_arch"
|
2023-08-31 23:44:52 +00:00
|
|
|
%{cargo_build}
|
2023-08-30 12:52:08 +00:00
|
|
|
cargo run --release --offline -- --grammar build
|
2022-04-20 11:56:13 +00:00
|
|
|
|
2022-10-15 10:18:45 +00:00
|
|
|
# Shell completions
|
|
|
|
sed -i "s|hx|helix|g" contrib/completion/hx.*
|
|
|
|
|
|
|
|
# Desktop file
|
|
|
|
sed -i "s|hx|helix|g" contrib/Helix.desktop
|
|
|
|
|
2022-04-20 11:56:13 +00:00
|
|
|
%install
|
2023-03-06 10:31:07 +00:00
|
|
|
install -d -m 0755 %{buildroot}%{_bindir}
|
2023-05-16 07:06:16 +00:00
|
|
|
install -d -m 0755 %{buildroot}%{_helix_runtimedir}
|
|
|
|
|
2023-05-16 04:59:10 +00:00
|
|
|
install -m 0755 target/release/hx %{buildroot}%{_libdir}/%{name}/hx
|
2023-05-23 05:40:54 +00:00
|
|
|
ln -sfv "%{_libdir}/%{name}/hx" "%{buildroot}%{_bindir}/helix"
|
2023-03-06 10:31:07 +00:00
|
|
|
|
|
|
|
cp -av "runtime/queries" %{buildroot}%{_helix_runtimedir}
|
|
|
|
cp -av "runtime/themes" %{buildroot}%{_helix_runtimedir}
|
2022-08-28 14:23:29 +00:00
|
|
|
find "%{_builddir}/%{name}-%{version}/runtime/grammars" -type f -name '*.so' -exec \
|
2022-05-30 23:08:10 +00:00
|
|
|
install --verbose -Dm 755 {} -t "%{buildroot}%{_helix_runtimedir}/grammars" \;
|
2022-12-07 12:04:22 +00:00
|
|
|
install -Dm644 runtime/tutor -t %{buildroot}%{_helix_runtimedir}
|
2022-04-20 11:56:13 +00:00
|
|
|
|
2023-04-06 13:28:56 +00:00
|
|
|
# Not needed during runtime
|
|
|
|
rm -rfv %{buildroot}%{_helix_runtimedir}/grammars/sources
|
|
|
|
|
2022-10-15 10:18:45 +00:00
|
|
|
# Desktop application file
|
|
|
|
install -Dm644 -T %{_builddir}/%{name}-%{version}/contrib/Helix.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
|
2023-03-01 00:05:14 +00:00
|
|
|
%suse_update_desktop_file %{name}
|
2022-10-15 10:18:45 +00:00
|
|
|
|
|
|
|
# Icon
|
2022-12-07 12:39:46 +00:00
|
|
|
install -Dm644 -T %{_builddir}/%{name}-%{version}/logo.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
|
2022-10-15 10:18:45 +00:00
|
|
|
|
|
|
|
# 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}
|
|
|
|
|
2022-04-20 11:56:13 +00:00
|
|
|
%files
|
|
|
|
%license LICENSE
|
2022-05-30 14:50:15 +00:00
|
|
|
%doc README.md CHANGELOG.md languages.toml docs/CONTRIBUTING.md docs/architecture.md docs/vision.md
|
2023-03-06 10:31:07 +00:00
|
|
|
%{_bindir}/%{name}
|
2022-10-15 10:18:45 +00:00
|
|
|
|
|
|
|
# Desktop application file
|
2022-12-07 12:45:49 +00:00
|
|
|
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
|
2022-10-15 10:18:45 +00:00
|
|
|
%{_datadir}/applications/*
|
|
|
|
|
2023-03-06 10:31:07 +00:00
|
|
|
%dir %{_libdir}/helix
|
2022-10-15 10:18:45 +00:00
|
|
|
|
2022-09-07 22:13:21 +00:00
|
|
|
# Tutor
|
2023-03-06 10:31:07 +00:00
|
|
|
%dir %{_helix_runtimedir}
|
2022-12-07 12:04:22 +00:00
|
|
|
%{_helix_runtimedir}/tutor
|
2022-05-30 14:50:15 +00:00
|
|
|
|
2023-05-16 07:11:28 +00:00
|
|
|
# Executable
|
|
|
|
%{_libdir}/%{name}/hx
|
|
|
|
|
2022-08-28 13:34:19 +00:00
|
|
|
%files runtime
|
2022-05-30 14:50:15 +00:00
|
|
|
# Runtimes and runtime files
|
2022-05-30 14:59:42 +00:00
|
|
|
# Grammars
|
2023-03-06 10:31:07 +00:00
|
|
|
%dir %{_helix_runtimedir}/grammars
|
2022-09-03 13:34:47 +00:00
|
|
|
%{_helix_runtimedir}/grammars/*
|
2022-05-30 14:59:42 +00:00
|
|
|
# Queries
|
2023-03-06 10:31:07 +00:00
|
|
|
%dir %{_helix_runtimedir}/queries
|
2022-09-03 13:34:47 +00:00
|
|
|
%{_helix_runtimedir}/queries/*
|
2022-05-30 14:59:42 +00:00
|
|
|
# Themes
|
2023-03-06 10:31:07 +00:00
|
|
|
%dir %{_helix_runtimedir}/themes
|
2022-09-03 13:34:47 +00:00
|
|
|
%{_helix_runtimedir}/themes/*
|
|
|
|
|
2022-10-15 10:18:45 +00:00
|
|
|
%files bash-completion
|
|
|
|
%{_datadir}/bash-completion/*
|
|
|
|
|
|
|
|
%files fish-completion
|
|
|
|
%dir %{_datadir}/fish
|
|
|
|
%{_datadir}/fish/*
|
|
|
|
|
|
|
|
%files zsh-completion
|
|
|
|
%dir %{_datadir}/zsh
|
|
|
|
%{_datadir}/zsh/*
|
|
|
|
|
2022-04-20 11:56:13 +00:00
|
|
|
%changelog
|