changeset 35210:4c62575667d5 v9.1.0421

patch 9.1.0421: filetype: hyprlang files are not recognized Commit: https://github.com/vim/vim/commit/5f1b115afd92544ce64d563da0d8ee9844abb10a Author: Riley Bruins <ribru17@hotmail.com> Date: Sun May 19 11:26:44 2024 +0200 patch 9.1.0421: filetype: hyprlang files are not recognized Problem: filetype: hyprlang files are not recognized Solution: recognize 'hypr{land,paper,idle,lock}.conf' files as 'hyprlang' filetype, add hyprlang ftplugin (Riley Bruins) closes: #14803 Signed-off-by: Riley Bruins <ribru17@hotmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sun, 19 May 2024 11:45:03 +0200
parents c7799d9fd100
children a19de24700b3
files .github/MAINTAINERS runtime/filetype.vim runtime/ftplugin/hyprlang.vim src/testdir/test_filetype.vim src/version.c
diffstat 5 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/.github/MAINTAINERS
+++ b/.github/MAINTAINERS
@@ -155,6 +155,7 @@ runtime/ftplugin/heex.vim		@cvincent
 runtime/ftplugin/hgcommit.vim		@k-takata
 runtime/ftplugin/hog.vim		@wtfbbqhax
 runtime/ftplugin/html.vim		@dkearns
+runtime/ftplugin/hyprlang.vim		@ribru17
 runtime/ftplugin/i3config.vim		@hiqua
 runtime/ftplugin/icon.vim		@dkearns
 runtime/ftplugin/indent.vim		@dkearns
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1044,6 +1044,9 @@ au BufRead,BufNewFile *.hurl			setf hurl
 " Hyper Builder
 au BufNewFile,BufRead *.hb			setf hb
 
+" Hyprlang
+au BufNewFile,BufRead hypr\(land\|paper\|idle\|lock\).conf	setf hyprlang
+
 " Httest
 au BufNewFile,BufRead *.htt,*.htb		setf httest
 
new file mode 100644
--- /dev/null
+++ b/runtime/ftplugin/hyprlang.vim
@@ -0,0 +1,13 @@
+" Vim filetype plugin
+" Language:	hyprlang
+" Maintainer:	ribru17 <ribru17@gmail.com>
+" Last Change:	2024 May 18
+
+if exists('b:did_ftplugin')
+  finish
+endif
+let b:did_ftplugin = 1
+
+setl comments=:# commentstring=#\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -336,6 +336,7 @@ def s:GetFilenameChecks(): dict<list<str
     htmlm4: ['file.html.m4'],
     httest: ['file.htt', 'file.htb'],
     hurl: ['file.hurl'],
+    hyprlang: ['hyprlock.conf', 'hyprland.conf', 'hypridle.conf', 'hyprpaper.conf'],
     i3config: ['/home/user/.i3/config', '/home/user/.config/i3/config', '/etc/i3/config', '/etc/xdg/i3/config'],
     ibasic: ['file.iba', 'file.ibi'],
     icemenu: ['/.icewm/menu', 'any/.icewm/menu'],
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    421,
+/**/
     420,
 /**/
     419,