Add naga linter for WGSL support (#4047)

* Add WGSL support using `naga` command

* Add documents for wgsl

* Add test for `naga` linter

* Separate naga handler callback to hanlder/naga.vim
This commit is contained in:
Linda_pp
2022-02-04 16:29:28 +09:00
committed by GitHub
parent d1e2aaf85d
commit 0d529d9b94
8 changed files with 98 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
" Author: rhysd <https://github.com/rhysd>
" Description: naga-cli linter for WGSL syntax.
call ale#Set('wgsl_naga_executable', 'naga')
call ale#linter#Define('wgsl', {
\ 'name': 'naga',
\ 'executable': {b -> ale#Var(b, 'wgsl_naga_executable')},
\ 'output_stream': 'stderr',
\ 'command': {b -> '%e --stdin-file-path %s'},
\ 'callback': 'ale#handlers#naga#Handle',
\})