Add WebGPU Shading Language (WGSL) filetype (#12723)

Commit: 
https://github.com/vim/vim/commit/a13eb2b147915e7e92a6de6c19ce448c7def4057
Author: Gergő Sályi <[email protected]>
Date:   Wed Aug 9 16:49:01 2023 +0200

    Add WebGPU Shading Language (WGSL) filetype 
(https://github.com/vim/vim/issues/12723)
    
    The current W3C Working Draft for the WebGPU Shading Language (WGSL) 
specifies
    'text/wgsl' media type for WGSL modules with the '.wgsl' file extension:
    https://www.w3.org/TR/WGSL/#text-wgsl-media-type
    
    It has also been registered at the Internet Assigned Numbers Authority 
(IANA):
    https://www.iana.org/assignments/media-types/text/wgsl
    
    Neovim's nvim-lspconfig already associates wgsl language servers
    with 'filetype wgsl':
    
https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#wgsl_analyzer
    
    However currenly setting 'filetype wgsl' for *.wgsl files by defalut in 
Neovim
    is blocked by adding this filetype to the vim project first:
    https://github.com/neovim/neovim/pull/23331
    
    This commit adds this missing wgsl filetype.

diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index d0ee535f5..f63a1461a 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -2399,6 +2399,9 @@ au BufNewFile,BufRead .wgetrc,wgetrc              setf 
wget
 " Wget2 config
 au BufNewFile,BufRead .wget2rc,wget2rc         setf wget2
 
+" WebGPU Shading Language (WGSL)
+au BufNewFile,BufRead *.wgsl                   setf wgsl
+
 " Website MetaLanguage
 au BufNewFile,BufRead *.wml                    setf wml
 
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index 778e840d0..1540f92fd 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -775,6 +775,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     webmacro: ['file.wm'],
     wget: ['.wgetrc', 'wgetrc'],
     wget2: ['.wget2rc', 'wget2rc'],
+    wgsl: ['file.wgsl'],
     winbatch: ['file.wbt'],
     wit: ['file.wit'],
     wml: ['file.wml'],

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1qTkfN-00BnUg-9k%40256bit.org.

Raspunde prin e-mail lui