]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0421: filetype: hyprlang files are not recognized v9.1.0421
authorRiley Bruins <ribru17@hotmail.com>
Sun, 19 May 2024 09:26:44 +0000 (11:26 +0200)
committerChristian Brabandt <cb@256bit.org>
Sun, 19 May 2024 09:26:44 +0000 (11:26 +0200)
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>
.github/MAINTAINERS
runtime/filetype.vim
runtime/ftplugin/hyprlang.vim [new file with mode: 0644]
src/testdir/test_filetype.vim
src/version.c

index 1fcebe69a33fe923e54256939b520dfaf06bd321..d905618f722bf27afdf3472bdeb38666ec309d11 100644 (file)
@@ -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
index 3fc2e159de9f74b0586b38b1732b3687acbb23f5..35c9e2031351a9f7f5b48b1fe66c85d4875542c2 100644 (file)
@@ -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
 
diff --git a/runtime/ftplugin/hyprlang.vim b/runtime/ftplugin/hyprlang.vim
new file mode 100644 (file)
index 0000000..5c186c3
--- /dev/null
@@ -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<'
index 9e2253b240ea155b6875433cda00f6813e28d489..eeca7a106f8a5c30d5db8c1f4e4a3048c69f1c2c 100644 (file)
@@ -336,6 +336,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     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'],
index aafbddcd8e0c4dbe70543db6e90c20ae2688d23b..df50a43032887b6794d09ec7873b53f21c3530b8 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    421,
 /**/
     420,
 /**/