]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(toml): update syntax and ftplugin.
authorAman Verma <amanraoverma@gmail.com>
Sun, 25 Jan 2026 18:01:31 +0000 (18:01 +0000)
committerChristian Brabandt <cb@256bit.org>
Sun, 25 Jan 2026 18:01:31 +0000 (18:01 +0000)
Add "-" to iskeyword. This required a change to the syntax files too
because they were using the word begin and end atoms.

closes: #17259

Co-authored-by: Teemu Ikonen <tpikonen@mailbox.org>
Co-authored-by: A4-Tacks <wdsjxhno1001@163.com>
Signed-off-by: Aman Verma <amanraoverma@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/ftplugin/toml.vim
runtime/syntax/toml.vim

index 6bd79b1c0aca9366c1cd5ca09d3ea02ffce2bf23..6565a7622375dab0e92081d979f2bf03d8f7afb7 100644 (file)
@@ -3,7 +3,7 @@
 " Homepage:    https://github.com/cespare/vim-toml
 " Maintainer:  Aman Verma
 " Author:      Lily Ballard <lily@ballards.net>
-" Last Change: Sep 21, 2021
+" Last Change: May 5, 2025
 
 if exists('b:did_ftplugin')
   finish
@@ -12,10 +12,11 @@ let b:did_ftplugin = 1
 
 let s:save_cpo = &cpo
 set cpo&vim
-let b:undo_ftplugin = 'setlocal commentstring< comments<'
+let b:undo_ftplugin = 'setlocal commentstring< comments< iskeyword<'
 
 setlocal commentstring=#\ %s
 setlocal comments=:#
+setlocal iskeyword+=-
 
 let &cpo = s:save_cpo
 unlet s:save_cpo
index bcb1b0b9c92a90acc60ea6f8e8fbcb227fc1073d..961e03340fcc7098f19117eee371be537dfc00bb 100644 (file)
@@ -3,7 +3,7 @@
 " Homepage:            https://github.com/cespare/vim-toml
 " Maintainer:          Aman Verma
 " Previous Maintainer: Caleb Spare <cespare@gmail.com>
-" Last Change:         Oct 8, 2021
+" Last Change:         May 5, 2025
 
 if exists('b:current_syntax')
   finish
@@ -23,15 +23,15 @@ syn region tomlString oneline start=/'/ end=/'/
 " Multi-line literal strings
 syn region tomlString start=/'''/ end=/'''/
 
-syn match tomlInteger /[+-]\=\<[1-9]\(_\=\d\)*\>/ display
-syn match tomlInteger /[+-]\=\<0\>/ display
-syn match tomlInteger /[+-]\=\<0x[[:xdigit:]]\(_\=[[:xdigit:]]\)*\>/ display
-syn match tomlInteger /[+-]\=\<0o[0-7]\(_\=[0-7]\)*\>/ display
-syn match tomlInteger /[+-]\=\<0b[01]\(_\=[01]\)*\>/ display
-syn match tomlInteger /[+-]\=\<\(inf\|nan\)\>/ display
+syn match tomlInteger /[+-]\=[1-9]\(_\=\d\)*/ display
+syn match tomlInteger /[+-]\=0/ display
+syn match tomlInteger /[+-]\=0x[[:xdigit:]]\(_\=[[:xdigit:]]\)*/ display
+syn match tomlInteger /[+-]\=0o[0-7]\(_\=[0-7]\)*/ display
+syn match tomlInteger /[+-]\=0b[01]\(_\=[01]\)*/ display
+syn match tomlInteger /[+-]\=\(inf\|nan\)/ display
 
-syn match tomlFloat /[+-]\=\<\d\(_\=\d\)*\.\d\+\>/ display
-syn match tomlFloat /[+-]\=\<\d\(_\=\d\)*\(\.\d\(_\=\d\)*\)\=[eE][+-]\=\d\(_\=\d\)*\>/ display
+syn match tomlFloat /[+-]\=\d\(_\=\d\)*\.\d\+/ display
+syn match tomlFloat /[+-]\=\d\(_\=\d\)*\(\.\d\(_\=\d\)*\)\=[eE][+-]\=\d\(_\=\d\)*/ display
 
 syn match tomlBoolean /\<\%(true\|false\)\>/ display