patch 9.1.1647: filetype: Cangjie files are not recognized
Problem: filetype: Cangjie files are not recognized
Solution: Detect *.cj files as cangjie filetype, include a syntax plugin
(WuJunkai2004)
This commit introduces a new syntax highlighting file for the Cangjie
programming language, includes 4 parts as required:
- The main syntax file: runtime/syntax/cangjie.vim
- The filetype detection rule in: runtime/filetype.vim
- The documentation update in: runtime/doc/syntax.txt
- Some menus
References:
- https://gitcode.com/Cangjie
- https://cangjie-lang.cn/
fixes: 18014
closes: #18027
Signed-off-by: WuJunkai2004 <wujunkai20041123@outlook.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
a2f13bf782
commit
0c4405a6b2
@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 9.1. Last change: 2025 Aug 10
|
||||
*syntax.txt* For Vim version 9.1. Last change: 2025 Aug 18
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1116,6 +1116,23 @@ in the "after" directory in 'runtimepath'. For Unix this would be
|
||||
syn sync fromstart
|
||||
set foldmethod=syntax
|
||||
|
||||
CANGJIE *cangjie.vim* *ft-cangjie-syntax*
|
||||
|
||||
This file provides syntax highlighting for the Cangjie programming language, a
|
||||
new-generation language oriented to full-scenario intelligence.
|
||||
|
||||
All highlighting is enabled by default. To disable highlighting for a
|
||||
specific group, set the corresponding variable to 0 in your |vimrc|.
|
||||
All options to disable highlighting are: >
|
||||
:let g:cangjie_comment_color = 0
|
||||
:let g:cangjie_identifier_color = 0
|
||||
:let g:cangjie_keyword_color = 0
|
||||
:let g:cangjie_macro_color = 0
|
||||
:let g:cangjie_number_color = 0
|
||||
:let g:cangjie_operator_color = 0
|
||||
:let g:cangjie_string_color = 0
|
||||
:let g:cangjie_type_color = 0
|
||||
|
||||
CH *ch.vim* *ft-ch-syntax*
|
||||
|
||||
C/C++ interpreter. Ch has similar syntax highlighting to C and builds upon
|
||||
|
||||
@ -6486,6 +6486,7 @@ c_space_errors syntax.txt /*c_space_errors*
|
||||
c_syntax_for_h syntax.txt /*c_syntax_for_h*
|
||||
c_wildchar cmdline.txt /*c_wildchar*
|
||||
call() builtin.txt /*call()*
|
||||
cangjie.vim syntax.txt /*cangjie.vim*
|
||||
carriage-return intro.txt /*carriage-return*
|
||||
case change.txt /*case*
|
||||
catch-all eval.txt /*catch-all*
|
||||
@ -7424,6 +7425,7 @@ ft-bash-syntax syntax.txt /*ft-bash-syntax*
|
||||
ft-basic-syntax syntax.txt /*ft-basic-syntax*
|
||||
ft-c-omni insert.txt /*ft-c-omni*
|
||||
ft-c-syntax syntax.txt /*ft-c-syntax*
|
||||
ft-cangjie-syntax syntax.txt /*ft-cangjie-syntax*
|
||||
ft-ch-syntax syntax.txt /*ft-ch-syntax*
|
||||
ft-changelog-plugin filetype.txt /*ft-changelog-plugin*
|
||||
ft-changelog-syntax syntax.txt /*ft-changelog-syntax*
|
||||
|
||||
Reference in New Issue
Block a user