aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-12-29 15:33:40 +0100
committerChristian Clason <ch.clason+github@icloud.com>2024-12-29 16:15:00 +0100
commit0e880b5612b0dece2863c70ee608971726ec5f2c (patch)
treef303925cfc09dddafc1a02f030fe504309b03f2b /runtime/syntax
parent493b6899ee898ec43217a8ae270b24bcc3b47281 (diff)
downloadrneovim-0e880b5612b0dece2863c70ee608971726ec5f2c.tar.gz
rneovim-0e880b5612b0dece2863c70ee608971726ec5f2c.tar.bz2
rneovim-0e880b5612b0dece2863c70ee608971726ec5f2c.zip
vim-patch:9.1.0972: filetype: TI linker map files are not recognized
Problem: filetype: TI linker map files are not recognized Solution: detect TI linker map files as lnkmap filetype (Wu, Zhenyu) References: https://downloads.ti.com/docs/esd/SPRUI03A/Content/SPRUI03A_HTML/linker_description.html closes: vim/vim#16324 https://github.com/vim/vim/commit/5113831d16c05f3a8b47da0c6f95a641d5fc7b2e Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Diffstat (limited to 'runtime/syntax')
-rw-r--r--runtime/syntax/lnkmap.vim35
1 files changed, 35 insertions, 0 deletions
diff --git a/runtime/syntax/lnkmap.vim b/runtime/syntax/lnkmap.vim
new file mode 100644
index 0000000000..a1d109ef0d
--- /dev/null
+++ b/runtime/syntax/lnkmap.vim
@@ -0,0 +1,35 @@
+" Vim syntax file
+" Language: TI Linker map
+" Document: https://downloads.ti.com/docs/esd/SPRUI03A/Content/SPRUI03A_HTML/linker_description.html
+" Maintainer: Wu, Zhenyu <wuzhenyu@ustc.edu>
+" Last Change: 2024 Dec 25
+
+if exists("b:current_syntax")
+ finish
+endif
+
+syn match lnkmapTime ">> .*$"
+syn region lnkmapHeadline start="^\*\+$" end="^\*\+$"
+syn match lnkmapHeadline "^[A-Z][-A-Z0-9 ']*\ze\%(:\|$\)"
+syn match lnkmapSectionDelim "^=\+$"
+syn match lnkmapTableDelim "\%(^\|\s\)\zs---*\ze\%($\|\s\)"
+syn match lnkmapNumber "\%(^\|\s\)\zs[0-9a-f]\+\ze\%($\|\s\)"
+syn match lnkmapSections '\<\.\k\+\>'
+syn match lnkmapFile '[^ =]\+\%(\.\S\+\)\+\>'
+syn match lnkmapLibFile '[^ =]\+\.lib\>'
+syn match lnkmapAttrib '\<[RWIX]\+\>'
+syn match lnkmapAttrib '\s\zs--HOLE--\ze\%\(\s\|$\)'
+syn keyword lnkmapAttrib UNINITIALIZED
+
+
+hi def link lnkmapTime Comment
+hi def link lnkmapHeadline Title
+hi def link lnkmapSectionDelim PreProc
+hi def link lnkmapTableDelim PreProc
+hi def link lnkmapNumber Number
+hi def link lnkmapSections Macro
+hi def link lnkmapFile String
+hi def link lnkmapLibFile Special
+hi def link lnkmapAttrib Type
+
+let b:current_syntax = "lnkmap"