- remove the integration of vimplugins into neovim. If the user wants that
he needs to add it himself OBS-URL: https://build.opensuse.org/package/show/editors/neovim?expand=0&rev=158
This commit is contained in:
commit
d04a2f387c
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
43
make-tree-sitter-optional.patch
Normal file
43
make-tree-sitter-optional.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From: Jakub Jirutka <jakub@jirutka.cz>
|
||||
Date: Thu, 23 May 2024 20:07:15 +0200
|
||||
Subject: Fallback to classic syntax highlighting if tree-sitter parser
|
||||
is not available
|
||||
|
||||
See https://gitlab.alpinelinux.org/alpine/aports/-/issues/16132,
|
||||
https://github.com/neovim/neovim/pull/26824
|
||||
|
||||
--- a/runtime/ftplugin/help.lua
|
||||
+++ b/runtime/ftplugin/help.lua
|
||||
@@ -1,5 +1,8 @@
|
||||
-- use treesitter over syntax (for highlighted code blocks)
|
||||
-vim.treesitter.start()
|
||||
+local ok, _ = pcall(vim.treesitter.start)
|
||||
+if not ok then
|
||||
+ print('Note: tree-sitter-vimdoc package is not installed, some features will not work')
|
||||
+end
|
||||
|
||||
-- add custom highlights for list in `:h highlight-groups`
|
||||
local bufname = vim.fs.normalize(vim.api.nvim_buf_get_name(0))
|
||||
--- a/runtime/ftplugin/lua.lua
|
||||
+++ b/runtime/ftplugin/lua.lua
|
||||
@@ -1,2 +1,5 @@
|
||||
-- use treesitter over syntax
|
||||
-vim.treesitter.start()
|
||||
+local ok, _ = pcall(vim.treesitter.start)
|
||||
+if not ok then
|
||||
+ print('Note: tree-sitter-lua package is not installed, some features will not work')
|
||||
+end
|
||||
--- a/runtime/ftplugin/query.lua
|
||||
+++ b/runtime/ftplugin/query.lua
|
||||
@@ -9,7 +9,10 @@
|
||||
-- Do not set vim.b.did_ftplugin = 1 to allow loading of ftplugin/lisp.vim
|
||||
|
||||
-- use treesitter over syntax
|
||||
-vim.treesitter.start()
|
||||
+local ok, _ = pcall(vim.treesitter.start)
|
||||
+if not ok then
|
||||
+ print('Note: tree-sitter-query package is not installed, some features will not work')
|
||||
+end
|
||||
|
||||
-- set omnifunc
|
||||
vim.bo.omnifunc = 'v:lua.vim.treesitter.query.omnifunc'
|
3
neovim-0.10.0.tar.gz
Normal file
3
neovim-0.10.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:372ea2584b0ea2a5a765844d95206bda9e4a57eaa1a2412a9a0726bab750f828
|
||||
size 12792034
|
3
neovim-0.10.1.tar.gz
Normal file
3
neovim-0.10.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:edce96e79903adfcb3c41e9a8238511946325ea9568fde177a70a614501af689
|
||||
size 12796966
|
2196
neovim.changes
Normal file
2196
neovim.changes
Normal file
File diff suppressed because it is too large
Load Diff
191
neovim.spec
Normal file
191
neovim.spec
Normal file
@ -0,0 +1,191 @@
|
||||
#
|
||||
# spec file for package neovim
|
||||
#
|
||||
# Copyright (c) 2024 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/
|
||||
#
|
||||
|
||||
|
||||
%ifarch s390x
|
||||
%bcond_without make_optional
|
||||
%endif
|
||||
%ifarch ppc64le
|
||||
%bcond_with luajit
|
||||
%else
|
||||
%bcond_without luajit
|
||||
%endif
|
||||
Name: neovim
|
||||
Version: 0.10.1
|
||||
Release: 0
|
||||
Summary: Vim-fork focused on extensibility and agility
|
||||
License: Apache-2.0 AND Vim AND GPL-3.0-or-later AND CC-BY-3.0
|
||||
URL: https://neovim.io/
|
||||
Source0: https://github.com/neovim/neovim/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
Source1: sysinit.vim
|
||||
Source3: suse-spec-template
|
||||
Source4: spec.vim
|
||||
# This patch is from AlpineLinux, which enables us to reenable neovim on s390x or as an optional flag to build
|
||||
# This patch only makes the tree-sitter plugins optional, not tree-sitter in itself
|
||||
Patch0: make-tree-sitter-optional.patch
|
||||
BuildRequires: cmake
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: filesystem
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: gettext
|
||||
BuildRequires: git-core
|
||||
BuildRequires: gperf
|
||||
BuildRequires: hicolor-icon-theme
|
||||
BuildRequires: libtool
|
||||
BuildRequires: lua-macros
|
||||
BuildRequires: lua51-bit32
|
||||
BuildRequires: lua51-compat-5.3
|
||||
BuildRequires: lua51-lpeg
|
||||
BuildRequires: lua51-luarocks
|
||||
BuildRequires: lua51-luv
|
||||
BuildRequires: lua51-mpack
|
||||
BuildRequires: make
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: unzip
|
||||
BuildRequires: pkgconfig(libluv)
|
||||
BuildRequires: pkgconfig(libutf8proc)
|
||||
BuildRequires: pkgconfig(libuv) >= 1.42.0
|
||||
BuildRequires: pkgconfig(tree-sitter) >= 0.20.9
|
||||
%if %{with luajit}
|
||||
BuildRequires: pkgconfig(luajit)
|
||||
%else
|
||||
BuildRequires: lua51-BitOp
|
||||
BuildRequires: pkgconfig(lua5.1)
|
||||
%endif
|
||||
BuildRequires: pkgconfig(msgpack-c)
|
||||
BuildRequires: pkgconfig(termkey)
|
||||
BuildRequires: pkgconfig(unibilium) >= 2.0.0
|
||||
BuildRequires: pkgconfig(vterm) >= 0.3.3
|
||||
Requires: gperf
|
||||
Requires: libvterm0 >= 0.3
|
||||
Requires: lua51-bit32
|
||||
Requires: lua51-compat-5.3
|
||||
Requires: lua51-lpeg
|
||||
Requires: lua51-luarocks
|
||||
Requires: lua51-luv
|
||||
Requires: lua51-mpack
|
||||
Requires: xdg-utils
|
||||
%if %{without make_optional}
|
||||
Requires: tree-sitter-c >= 0.21.3
|
||||
Requires: tree-sitter-lua
|
||||
Requires: tree-sitter-markdown
|
||||
Requires: tree-sitter-python
|
||||
Requires: tree-sitter-query >= 0.4.0
|
||||
Requires: tree-sitter-vim
|
||||
Requires: tree-sitter-vimdoc >= 3.0.0
|
||||
%endif
|
||||
Recommends: python3-neovim
|
||||
Recommends: wl-clipboard
|
||||
Recommends: xsel
|
||||
Suggests: ripgrep
|
||||
Provides: nvim
|
||||
%lang_package
|
||||
|
||||
%description
|
||||
Neovim is a refactor - and sometimes redactor - in the tradition of
|
||||
Vim, which itself derives from Stevie. It is not a rewrite, but a
|
||||
continuation and extension of Vim. Many rewrites, clones, emulators
|
||||
and imitators exist; some are very clever, but none are Vim. Neovim
|
||||
strives to be a superset of Vim, notwithstanding some intentionally
|
||||
removed misfeatures; excepting those few and carefully-considered
|
||||
excisions, Neovim is Vim. It is built for users who want the good
|
||||
parts of Vim, without compromise, and more.
|
||||
|
||||
%prep
|
||||
%autosetup -N
|
||||
%if %{with make_optional}
|
||||
%patch -P0 -p1
|
||||
%endif
|
||||
|
||||
# Remove __DATE__ and __TIME__.
|
||||
BUILD_TIME=$(LC_ALL=C date -ur %{_sourcedir}/%{name}.changes +'%{H}:%{M}')
|
||||
BUILD_DATE=$(LC_ALL=C date -ur %{_sourcedir}/%{name}.changes +'%{b} %{d} %{Y}')
|
||||
sed -i "s/__TIME__/\"$BUILD_TIME\"/" $(grep -rl '__TIME__')
|
||||
sed -i "s/__DATE__/\"$BUILD_DATE\"/" $(grep -rl '__DATE__')
|
||||
|
||||
%build
|
||||
# set vars to make build reproducible in spite of config/CMakeLists.txt
|
||||
HOSTNAME=OBS
|
||||
USERNAME=OBS
|
||||
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DPREFER_LUA=%{?with_luajit:OFF}%{!?with_luajit:ON} \
|
||||
-DLUA_PRG=%{_bindir}/%{?with_luajit:luajit}%{!?with_luajit:lua} \
|
||||
%if %{with luajit}
|
||||
-DLUAJIT_INCLUDE_DIR:PATH=%(pkg-config --cflags-only-I luajit|cut -c 3-) \
|
||||
%endif
|
||||
-DUSE_BUNDLED=OFF -DLUAJIT_USE_BUNDLED=OFF \
|
||||
-DCMAKE_SKIP_RPATH=ON -DCMAKE_VERBOSE_MAKEFILE=ON \
|
||||
-DCMAKE_COLOR_MAKEFILE=OFF -DLTO_ENABLE=ON \
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO="$opts" \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
|
||||
-DLIBLUV_INCLUDE_DIR:PATH=%{lua_incdir}
|
||||
|
||||
%make_build
|
||||
|
||||
%install
|
||||
%cmake_install
|
||||
|
||||
# system-wide configuration file
|
||||
install -D -m 644 -p %{SOURCE1} %{buildroot}%{_sysconfdir}/nvim/sysinit.vim
|
||||
ln -sf %{_sysconfdir}/nvim/sysinit.vim %{buildroot}%{_datadir}/nvim/sysinit.vim
|
||||
|
||||
# install SUSE specific spec template
|
||||
install -p -m 644 %{SOURCE3} %{buildroot}%{_datadir}/nvim/template.spec
|
||||
install -p -m 644 %{SOURCE4} %{buildroot}%{_datadir}/nvim/runtime/plugin/spec.vim
|
||||
|
||||
desktop-file-install --dir=%{buildroot}%{_datadir}/applications \
|
||||
runtime/nvim.desktop
|
||||
install -Dm0644 runtime/nvim.png %{buildroot}%{_datadir}/pixmaps/nvim.png
|
||||
|
||||
# Fix exec bits
|
||||
find %{buildroot}%{_datadir} \( -name \*.bat -o -name \*.awk \) \
|
||||
-print -exec chmod -x '{}' \;
|
||||
|
||||
%fdupes %{buildroot}
|
||||
%find_lang nvim
|
||||
|
||||
# We have to have rpath
|
||||
# https://en.opensuse.org/openSUSE:Packaging_checks
|
||||
export NO_BRP_CHECK_RPATH=true
|
||||
|
||||
%post
|
||||
if [ -d %{_datadir}/nvim/runtime/parser ]; then
|
||||
if [ ! -h %{_datadir}/nvim/runtime/parser ]; then
|
||||
mv %{_datadir}/nvim/runtime/parser \
|
||||
%{_datadir}/nvim/runtime/parser.rpmsave
|
||||
fi
|
||||
else
|
||||
ln -sf %{_libdir}/tree_sitter %{_datadir}/nvim/runtime/parser
|
||||
fi
|
||||
|
||||
%files
|
||||
%license LICENSE.txt
|
||||
%doc CONTRIBUTING.md README.md
|
||||
%dir %{_sysconfdir}/nvim
|
||||
%config(noreplace) %{_sysconfdir}/nvim/sysinit.vim
|
||||
%{_bindir}/nvim
|
||||
%{_mandir}/man?/nvim.?%{?ext_man}
|
||||
%{_datadir}/nvim
|
||||
%{_datadir}/applications/nvim.desktop
|
||||
%{_datadir}/icons/hicolor/128x128/apps/nvim.png
|
||||
%{_datadir}/pixmaps/nvim.png
|
||||
|
||||
%files lang -f nvim.lang
|
||||
|
||||
%changelog
|
39
spec.vim
Normal file
39
spec.vim
Normal file
@ -0,0 +1,39 @@
|
||||
if exists("loaded_spec") || &cp
|
||||
finish
|
||||
endif
|
||||
let loaded_spec = 1
|
||||
|
||||
function! SKEL_spec()
|
||||
language time en_US
|
||||
if $USER != ''
|
||||
let login = $USER
|
||||
elseif $LOGNAME != ''
|
||||
let login = $LOGNAME
|
||||
else
|
||||
let login = 'unknown'
|
||||
endif
|
||||
let newline = stridx(login, "\n")
|
||||
if newline != -1
|
||||
let login = strpart(login, 0, newline)
|
||||
endif
|
||||
if $HOSTNAME != ''
|
||||
let hostname = $HOSTNAME
|
||||
else
|
||||
let hostname = system('hostname -f')
|
||||
if v:shell_error
|
||||
let hostname = 'localhost'
|
||||
endif
|
||||
endif
|
||||
let newline = stridx(hostname, "\n")
|
||||
if newline != -1
|
||||
let hostname = strpart(hostname, 0, newline)
|
||||
endif
|
||||
exe "%s/specCURRENT_YEAR/" . strftime("%Y") . "/ge"
|
||||
exe "%s/specRPM_CREATION_DATE/" . strftime("%a\ %b\ %d\ %Y") . "/ge"
|
||||
exe "%s/specRPM_CREATION_AUTHOR_MAIL/" . login . "@" . hostname . "/ge"
|
||||
exe "%s/specRPM_CREATION_NAME/" . expand("%:t:r") . "/ge"
|
||||
setf spec
|
||||
endfunction
|
||||
|
||||
" Skeleton for spec files
|
||||
autocmd BufNewFile *.spec call SKEL_spec()
|
45
suse-spec-template
Normal file
45
suse-spec-template
Normal file
@ -0,0 +1,45 @@
|
||||
#
|
||||
# spec file for package specRPM_CREATION_NAME
|
||||
#
|
||||
# Copyright (c) specCURRENT_YEAR 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/
|
||||
#
|
||||
|
||||
|
||||
Name: specRPM_CREATION_NAME
|
||||
Version:
|
||||
Release: 0
|
||||
Summary:
|
||||
# FIXME: Select a correct license from https://github.com/openSUSE/spec-cleaner#spdx-licenses
|
||||
License:
|
||||
URL:
|
||||
Source0:
|
||||
BuildRequires:
|
||||
|
||||
%description
|
||||
|
||||
%prep
|
||||
%autosetup
|
||||
|
||||
%build
|
||||
%configure
|
||||
%make_build
|
||||
|
||||
%install
|
||||
%make_install
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
|
||||
%changelog
|
7
sysinit.vim
Normal file
7
sysinit.vim
Normal file
@ -0,0 +1,7 @@
|
||||
augroup Fedora
|
||||
autocmd!
|
||||
" RPM spec file template
|
||||
autocmd BufNewFile *.spec silent! 0read /usr/share/nvim/template.spec
|
||||
augroup END
|
||||
|
||||
" vim: et ts=2 sw=2
|
Loading…
Reference in New Issue
Block a user