From e1b7fa2a3a2ad6e91128e20203e226200d9d9bef Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sun, 21 Jul 2024 11:10:32 +0200 Subject: vim-patch:6e37575: runtime(mysql): update syntax script Problem: - `syn region ...`s in syntax/mysql.vim match function names inaccurately. - no syntax rules for mysql window function. - coarse highlight definition in syntax/mysql.vim. Solution: - add `\<` before the function name for accuracy. - add syntax rules for mysql window function. - enhance the highlight definition. closes: vim/vim#15311 https://github.com/vim/vim/commit/6e37575760022be047cad0e1cf1e30c18fab21ad Co-authored-by: Yinzuo Jiang --- runtime/syntax/mysql.vim | 314 +++++++++++++++++++++++++---------------------- 1 file changed, 169 insertions(+), 145 deletions(-) (limited to 'runtime') diff --git a/runtime/syntax/mysql.vim b/runtime/syntax/mysql.vim index 8bd7b6459a..49b53313c9 100644 --- a/runtime/syntax/mysql.vim +++ b/runtime/syntax/mysql.vim @@ -1,10 +1,13 @@ " Vim syntax file " Language: mysql " Maintainer: Kenneth J. Pronovici -" Last Change: $LastChangedDate: 2016-04-11 10:31:04 -0500 (Mon, 11 Apr 2016) $ " Filenames: *.mysql -" URL: ftp://cedar-solutions.com/software/mysql.vim -" Note: The definitions below are taken from the mysql user manual as of April 2002, for version 3.23 +" URL: ftp://cedar-solutions.com/software/mysql.vim (https://github.com/pronovic/vim-syntax/blob/master/mysql.vim) +" Note: The definitions below are taken from the mysql user manual as of April 2002, for version 3.23 and have been updated +" in July 2024 with the docs for version 8.4 +" Last Change: 2016 Apr 11 +" 2024-07-21: update MySQL functions as of MySQL 8.4 (by Vim Project) +" " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -92,23 +95,23 @@ syn keyword mysqlType tinytext mediumtext longtext text syn keyword mysqlType tinyblob mediumblob longblob blob syn region mysqlType start="float\W" end="."me=s-1 syn region mysqlType start="float$" end="."me=s-1 -syn region mysqlType start="float(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="\