neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit b16b287b8f36a8e25b27f3009d7fdd0d39348894
parent ee3c49a44ea0e8b42984cbbed83ac444c3d8ca2e
Author: Christian Clason <c.clason@uni-graz.at>
Date:   Sun, 19 May 2024 11:36:11 +0200

vim-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: vim/vim#14803

https://github.com/vim/vim/commit/5f1b115afd92544ce64d563da0d8ee9844abb10a

Co-authored-by: Riley Bruins <ribru17@hotmail.com>

Diffstat:
Aruntime/ftplugin/hyprlang.vim | 13+++++++++++++
Mruntime/lua/vim/filetype.lua | 4++++
Mtest/old/testdir/test_filetype.vim | 1+
3 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/runtime/ftplugin/hyprlang.vim 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<' diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua @@ -1431,6 +1431,10 @@ local filename = { ['/etc/host.conf'] = 'hostconf', ['/etc/hosts.allow'] = 'hostsaccess', ['/etc/hosts.deny'] = 'hostsaccess', + ['hyprland.conf'] = 'hyprlang', + ['hyprpaper.conf'] = 'hyprlang', + ['hypridle.conf'] = 'hyprlang', + ['hyprlock.conf'] = 'hyprlang', ['/.icewm/menu'] = 'icemenu', ['.indent.pro'] = 'indent', indentrc = 'indent', diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim @@ -337,6 +337,7 @@ func s:GetFilenameChecks() abort \ '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'],