[gentoo-commits] proj/gentoo-syntax:master commit in: ftdetect/, syntax/, doc/, ftplugin/

2023-03-11 Thread Michał Górny
commit: d4659a919096a0488694338a9cf4fbb749080779
Author: Anna Vyalkova  sysrq  in>
AuthorDate: Sat Mar 11 15:25:21 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Mar 11 20:42:15 2023 +
URL:https://gitweb.gentoo.org/proj/gentoo-syntax.git/commit/?id=d4659a91

Drop support for Gentoo style ChaneLogs

They haven't been used anywhere for ages.

Signed-off-by: Anna Vyalkova  sysrq.in>
Closes: https://github.com/gentoo/gentoo-syntax/pull/57
Signed-off-by: Michał Górny  gentoo.org>

 doc/gentoo-syntax.txt | 20 +
 ftdetect/gentoo.vim   | 10 ++---
 ftplugin/gentoo-changelog.vim | 15 -
 syntax/gentoo-changelog.vim   | 52 ---
 4 files changed, 7 insertions(+), 90 deletions(-)

diff --git a/doc/gentoo-syntax.txt b/doc/gentoo-syntax.txt
index 854241f..8e68f7a 100644
--- a/doc/gentoo-syntax.txt
+++ b/doc/gentoo-syntax.txt
@@ -18,7 +18,6 @@ Authors:  Ciaran McCreesh 
Common Syntax Rules |gentoo-common-syntax|
Ebuild and Eclass Files |gentoo-ebuild-syntax|
GLEP Files|gentoo-glep-syntax|
-   ChangeLogs   |gentoo-changelog-syntax|
conf.d Files|gentoo-conf.d-syntax|
cron.d Files|gentoo-cron.d-syntax|
env.d Files  |gentoo-env.d-syntax|
@@ -43,8 +42,8 @@ Authors:  Ciaran McCreesh 
 
The gentoo-syntax package provides a collection of syntax, ftdetect,
ftplugin and indent files to help Gentoo developers and users work
-   with ebuilds, eclasses, GLEPs, Gentoo style ChangeLogs, init.d /
-   conf.d / env.d / cron.d entries, /etc/portage/ files and so on.
+   with ebuilds, eclasses, GLEPs, init.d / conf.d / env.d / cron.d entries,
+   /etc/portage/ files and so on.
 
 Detection Specifics 
*gentoo-syntax-detection*
 
@@ -56,9 +55,6 @@ Authors:  Ciaran McCreesh 
the first line of the file starts with "GLEP: ". They are assigned the
'glep' filetype.
 
-   Gentoo ChangeLogs are detected by the 'ChangeLog' filename and a
-   copyright header on the second line.
-
init.d scripts are detected by being in /etc/init.d/ . They are also
detected if they are under a files/ directory and include a
'#!/sbin/runscript' header.
@@ -79,8 +75,8 @@ Authors:  Ciaran McCreesh 
 
 Highlighting Specifics   *gentoo-syntax-highlighting*
 
-   Syntax highlighting is provided for ebuild/eclass, GLEP files,
-   Gentoo ChangeLogs and init.d / conf.d / env.d / cron.d scripts.
+   Syntax highlighting is provided for ebuild/eclass, GLEP files and
+   init.d / conf.d / env.d / cron.d scripts.
 
*gentoo-common-syntax*
 
@@ -106,11 +102,6 @@ Authors:  Ciaran McCreesh 
syntax file. Additional highlighting is available for the headers at
the top of the file and for heading sections.
 
-*gentoo-changelog-syntax*
-
-   Syntax highlighting for Gentoo ChangeLogs is implemented from scratch
-   (some rules come from |gentoo-common-syntax|).
-
*gentoo-conf.d-syntax*
 
Syntax highlighting for conf.d files is based upon the vim-provided
@@ -183,8 +174,7 @@ Authors:  Ciaran McCreesh 
the hyphen character is added as a valid keyword character
(|'iskeyword'|).
 
-   For ebuilds, eclasses and ChangeLogs, UTF-8 is used for fileencoding
-   as per GLEP 31.
+   For ebuilds, eclasses, UTF-8 is used for fileencoding as per GLEP 31.
 
 Indent Specifics *gentoo-indent-settings*
 

diff --git a/ftdetect/gentoo.vim b/ftdetect/gentoo.vim
index b2ed1bd..d63d88c 100644
--- a/ftdetect/gentoo.vim
+++ b/ftdetect/gentoo.vim
@@ -4,8 +4,8 @@
 " Copyright:   Copyright (c) 2004-2005 Ciaran McCreesh
 " Licence: You may redistribute this under the same terms as Vim itself
 "
-" This sets up syntax highlighting for Gentoo ebuilds, eclasses, GLEPs and
-" Gentoo style ChangeLogs.
+" This sets up syntax highlighting for Gentoo ebuilds, eclasses, GLEPs, init.d 
/
+" conf.d / env.d / cron.d entries,  /etc/portage/ files and so on.
 "
 
 if &compatible || v:version < 603
@@ -23,12 +23,6 @@ au BufNewFile,BufRead *.txt,*.rst
 \ set filetype=glep |
 \ endif
 
-" ChangeLogs
-au BufNewFile,BufRead ChangeLog*
-\ if (getline(2) =~? "^# Copyright \\d\\+-\\d\\+ Gentoo Foundation") |
-\ set filetype=gentoo-changelog |
-\ endif
-
 " /etc/init.d/ scripts
 au BufNewFile,BufRead /etc/init.d/*
 \ set filetype=gentoo-init-d.sh |

diff --git a/ftplugin/gentoo-changelog.vim b/ftplugin/gentoo-changel

[gentoo-commits] proj/gentoo-syntax:master commit in: ftdetect/

2023-02-08 Thread Michał Górny
commit: 8340095e5a8263494abadf5a81970ff92091e004
Author: Richard-Rogalski  tutanota  com>
AuthorDate: Sun Feb  5 13:17:54 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Wed Feb  8 16:43:09 2023 +
URL:https://gitweb.gentoo.org/proj/gentoo-syntax.git/commit/?id=8340095e

Enable syntax detection for make.conf as a directory

Technically, make.conf can be a directory, and I use it as
one :). Niche use case but works \o/

Signed-off-by: Richard Rogalski  tutanota.com>
Closes: https://github.com/gentoo/gentoo-syntax/pull/54
Signed-off-by: Michał Górny  gentoo.org>

 ftdetect/gentoo.vim | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ftdetect/gentoo.vim b/ftdetect/gentoo.vim
index b89f058..b2ed1bd 100644
--- a/ftdetect/gentoo.vim
+++ b/ftdetect/gentoo.vim
@@ -75,7 +75,7 @@ au BufNewFile,BufRead {*/thirdpartymirrors,*/portage/mirrors}
 \ set filetype=gentoo-mirrors
 
 " make.conf
-au BufNewFile,BufRead make.{conf,globals}
+au BufNewFile,BufRead {*/make.{conf,globals},*/portage/make.conf/*}
 \ set filetype=gentoo-make-conf
 
 " use.desc



[gentoo-commits] proj/gentoo-syntax:master commit in: ftdetect/, plugin/

2022-02-21 Thread Michał Górny
commit: e5a55b7fa046e3b23b7f7e5e2224fa9dc74c1052
Author: Anna “CyberTailor”  sysrq  in>
AuthorDate: Sat Feb 19 07:40:04 2022 +
Commit: Michał Górny  gentoo  org>
CommitDate: Mon Feb 21 18:15:00 2022 +
URL:https://gitweb.gentoo.org/proj/gentoo-syntax.git/commit/?id=e5a55b7f

ftdetect/gentoo.vim: set multiple file types

So basically Syntastic shell checks (most importantly "sh" and
"checkbashisms") works for init.d, conf.d and env.d files now. Yay!

Signed-off-by: Anna Vyalkova  sysrq.in>
Closes: https://github.com/gentoo/gentoo-syntax/pull/44
Signed-off-by: Michał Górny  gentoo.org>

 ftdetect/gentoo.vim | 8 
 plugin/newinitd.vim | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/ftdetect/gentoo.vim b/ftdetect/gentoo.vim
index b8c14ac..b89f058 100644
--- a/ftdetect/gentoo.vim
+++ b/ftdetect/gentoo.vim
@@ -31,20 +31,20 @@ au BufNewFile,BufRead ChangeLog*
 
 " /etc/init.d/ scripts
 au BufNewFile,BufRead /etc/init.d/*
-\ set filetype=gentoo-init-d |
+\ set filetype=gentoo-init-d.sh |
 
 au BufNewFile,BufRead *
 \ if (getline(1) =~? "#!/sbin/\\(runscript\\|openrc-run\\)") |
-\ set filetype=gentoo-init-d |
+\ set filetype=gentoo-init-d.sh |
 \ endif
 
 " /etc/conf.d/ scripts
 au BufNewFile,BufRead /etc/conf.d/*
-\ set filetype=gentoo-conf-d
+\ set filetype=gentoo-conf-d.sh
 
 " /etc/env.d/ scripts
 au BufNewFile,BufRead /etc/env.d/*
-\ set filetype=gentoo-env-d
+\ set filetype=gentoo-env-d.sh
 
 " /etc/cron.d/ scripts
 au BufNewFile,BufRead /etc/cron.d/*

diff --git a/plugin/newinitd.vim b/plugin/newinitd.vim
index f11dd0f..dcc2e1a 100644
--- a/plugin/newinitd.vim
+++ b/plugin/newinitd.vim
@@ -37,12 +37,12 @@ fun! MakeNewInitd()
 0
 endfun
 
-com! -nargs=0 NewInitd call MakeNewInitd() | set filetype=gentoo-init-d
+com! -nargs=0 NewInitd call MakeNewInitd() | set filetype=gentoo-init-d.sh
 
 augroup NewInitd
 au!
 autocmd BufNewFile {/*/files/*.{rc*,init*},/etc/init.d/*}
-\ call MakeNewInitd() | set filetype=gentoo-init-d
+\ call MakeNewInitd() | set filetype=gentoo-init-d.sh
 augroup END
 
 " vim: set et foldmethod=marker : "



[gentoo-commits] proj/gentoo-syntax:master commit in: ftdetect/

2021-02-06 Thread Vadim Misbakh-Soloviov
commit: 33dfc1c4f3676b10f3980089d1c41d45514ae7a3
Author: Vadim Misbakh-Soloviov  gentoo  org>
AuthorDate: Sat Nov 14 23:49:03 2020 +
Commit: Vadim Misbakh-Soloviov  gentoo  org>
CommitDate: Sun Feb  7 00:25:11 2021 +
URL:https://gitweb.gentoo.org/proj/gentoo-syntax.git/commit/?id=33dfc1c4

package.env also uses package.use-like syntax

Signed-off-by: Vadim Misbakh-Soloviov  gentoo.org>

 ftdetect/gentoo.vim | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ftdetect/gentoo.vim b/ftdetect/gentoo.vim
index a7ae000..b8f169f 100644
--- a/ftdetect/gentoo.vim
+++ b/ftdetect/gentoo.vim
@@ -59,7 +59,7 @@ au BufNewFile,BufRead 
{*/package.{accept_,}keywords,*/portage/package.{accept_,}
 \ set filetype=gentoo-package-keywords
 
 " package.use
-au BufNewFile,BufRead {*/package.use,*/portage/package.use/*}
+au BufNewFile,BufRead 
{*/package.use,*/portage/package.use/*,*/package.env,*/portage/package.env/*}
 \ set filetype=gentoo-package-use
 
 " package.license



[gentoo-commits] proj/gentoo-syntax:master commit in: ftdetect/

2021-02-06 Thread Vadim Misbakh-Soloviov
commit: 1b6d372fd407c82de927dcd669b901d55c488c52
Author: Vadim Misbakh-Soloviov  gentoo  org>
AuthorDate: Sun Nov 15 00:06:07 2020 +
Commit: Vadim Misbakh-Soloviov  gentoo  org>
CommitDate: Sun Feb  7 00:25:11 2021 +
URL:https://gitweb.gentoo.org/proj/gentoo-syntax.git/commit/?id=1b6d372f

env and bashrc would benefit from ft=ebuild

Signed-off-by: Vadim Misbakh-Soloviov  gentoo.org>

 ftdetect/gentoo.vim | 4 
 1 file changed, 4 insertions(+)

diff --git a/ftdetect/gentoo.vim b/ftdetect/gentoo.vim
index 0c0db40..b8c14ac 100644
--- a/ftdetect/gentoo.vim
+++ b/ftdetect/gentoo.vim
@@ -90,6 +90,10 @@ au BufNewFile,BufRead metadata.xml
 au BufNewFile,BufRead {*/portage/repos.conf,*/portage/repos.conf/*.conf}
 \ set filetype=dosini
 
+" portage/env/*
+au BufNewFile,BufRead */portage/{env/*,bashrc}
+\ set filetype=ebuild
+
 " guidexml
 au BufNewFile,BufRead *.xml
 \ if getline(1) =~ "

[gentoo-commits] proj/gentoo-syntax:master commit in: ftdetect/

2021-02-06 Thread Vadim Misbakh-Soloviov
commit: c37db2bbf264ec221e4c47c722524de59641371c
Author: Vadim Misbakh-Soloviov  gentoo  org>
AuthorDate: Sat Nov 14 23:50:08 2020 +
Commit: Vadim Misbakh-Soloviov  gentoo  org>
CommitDate: Sun Feb  7 00:25:11 2021 +
URL:https://gitweb.gentoo.org/proj/gentoo-syntax.git/commit/?id=c37db2bb

repos.conf also uses ini-like syntax

Signed-off-by: Vadim Misbakh-Soloviov  gentoo.org>

 ftdetect/gentoo.vim | 4 
 1 file changed, 4 insertions(+)

diff --git a/ftdetect/gentoo.vim b/ftdetect/gentoo.vim
index b8f169f..0c0db40 100644
--- a/ftdetect/gentoo.vim
+++ b/ftdetect/gentoo.vim
@@ -86,6 +86,10 @@ au BufNewFile,BufRead use.{local.,}desc
 au BufNewFile,BufRead metadata.xml
 \ set filetype=gentoo-metadata
 
+" repos.conf
+au BufNewFile,BufRead {*/portage/repos.conf,*/portage/repos.conf/*.conf}
+\ set filetype=dosini
+
 " guidexml
 au BufNewFile,BufRead *.xml
 \ if getline(1) =~ "

[gentoo-commits] proj/gentoo-syntax:master commit in: ftdetect/

2018-08-14 Thread Michał Górny
commit: 8236f36bc4ba12104bbf06b1f5ea03e8c4ff2c18
Author: sluidfoe  gmail  com>
AuthorDate: Thu Sep 21 21:50:51 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Tue Aug 14 13:56:55 2018 +
URL:https://gitweb.gentoo.org/proj/gentoo-syntax.git/commit/?id=8236f36b

ftdetect/gentoo.vim: detect init files by shebang

Use only the shebang/interpreter value to detect
/sbin/{openrc-run,runscript} files, do not only detect them underneath
a directory called "files."

Closes: https://github.com/gentoo/gentoo-syntax/pull/16

 ftdetect/gentoo.vim | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ftdetect/gentoo.vim b/ftdetect/gentoo.vim
index d5f6808..a7ae000 100644
--- a/ftdetect/gentoo.vim
+++ b/ftdetect/gentoo.vim
@@ -33,7 +33,7 @@ au BufNewFile,BufRead ChangeLog*
 au BufNewFile,BufRead /etc/init.d/*
 \ set filetype=gentoo-init-d |
 
-au BufNewFile,BufRead /*/files/*
+au BufNewFile,BufRead *
 \ if (getline(1) =~? "#!/sbin/\\(runscript\\|openrc-run\\)") |
 \ set filetype=gentoo-init-d |
 \ endif



[gentoo-commits] proj/gentoo-syntax:master commit in: ftdetect/

2018-08-14 Thread Michał Górny
commit: 507a0c9bda6a63abf74d4eb62f0d55171609e724
Author: Michał Górny  gentoo  org>
AuthorDate: Fri Sep 15 12:43:58 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Tue Aug 14 13:55:25 2018 +
URL:https://gitweb.gentoo.org/proj/gentoo-syntax.git/commit/?id=507a0c9b

ftdetect: Account for GLEPs using YAML-compatible preamble

 ftdetect/gentoo.vim | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ftdetect/gentoo.vim b/ftdetect/gentoo.vim
index 610c6ef..d5f6808 100644
--- a/ftdetect/gentoo.vim
+++ b/ftdetect/gentoo.vim
@@ -19,7 +19,7 @@ au BufNewFile,BufRead *.e{build,class}
 
 " GLEPs
 au BufNewFile,BufRead *.txt,*.rst
-\ if (getline(1) =~? "^GLEP: ") |
+\ if (getline(1) =~? "^GLEP: " || getline(2) =~? "^GLEP: ") |
 \ set filetype=glep |
 \ endif
 



[gentoo-commits] proj/gentoo-syntax:master commit in: ftdetect/

2018-08-14 Thread Michał Górny
commit: 604d85f810300b04dbe5139c65f31ebe3055eea8
Author: Michał Górny  gentoo  org>
AuthorDate: Fri Sep 15 12:43:11 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Tue Aug 14 13:55:25 2018 +
URL:https://gitweb.gentoo.org/proj/gentoo-syntax.git/commit/?id=604d85f8

ftdetect: Account for GLEPs using .rst suffix

 ftdetect/gentoo.vim | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ftdetect/gentoo.vim b/ftdetect/gentoo.vim
index 305d567..610c6ef 100644
--- a/ftdetect/gentoo.vim
+++ b/ftdetect/gentoo.vim
@@ -18,7 +18,7 @@ au BufNewFile,BufRead *.e{build,class}
 \ set filetype=ebuild
 
 " GLEPs
-au BufNewFile,BufRead *.txt
+au BufNewFile,BufRead *.txt,*.rst
 \ if (getline(1) =~? "^GLEP: ") |
 \ set filetype=glep |
 \ endif



[gentoo-commits] proj/gentoo-syntax:master commit in: ftdetect/

2016-05-29 Thread Tim Harder
commit: 2355e6c5f50d14534d8885f8619f1d4241aa1596
Author: Tim Harder  gentoo  org>
AuthorDate: Mon May 30 03:04:55 2016 +
Commit: Tim Harder  gentoo  org>
CommitDate: Mon May 30 03:06:55 2016 +
URL:https://gitweb.gentoo.org/proj/gentoo-syntax.git/commit/?id=2355e6c5

ftdetect: detect both runscript and openrc-run shebangs as init scripts

Fixes #6.

 ftdetect/gentoo.vim | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ftdetect/gentoo.vim b/ftdetect/gentoo.vim
index ba425fe..305d567 100644
--- a/ftdetect/gentoo.vim
+++ b/ftdetect/gentoo.vim
@@ -34,7 +34,7 @@ au BufNewFile,BufRead /etc/init.d/*
 \ set filetype=gentoo-init-d |
 
 au BufNewFile,BufRead /*/files/*
-\ if (getline(1) ==? "#!/sbin/runscript") |
+\ if (getline(1) =~? "#!/sbin/\\(runscript\\|openrc-run\\)") |
 \ set filetype=gentoo-init-d |
 \ endif