1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-04-14 07:09:11 +08:00

fix(verilog): change verilog related functions

This commit is contained in:
wsdjeg 2022-04-15 20:54:16 +08:00
parent 1611aecc49
commit 9b65c22c73
5 changed files with 10 additions and 10 deletions

View File

@ -618,7 +618,7 @@ endfunction
"------------------------------------------------------------------------
" External functions
" {{{
function verilog_systemverilog#GotoInstanceStart(line, column)
function verilog#GotoInstanceStart(line, column)
let values = s:GetInstanceInfo(a:line, col('$'))
if values[2] != ""
call cursor(values[2], a:column)
@ -635,7 +635,7 @@ function verilog#FollowInstanceTag(line, column)
endif
endfunction
function verilog_systemverilog#ReturnFromInstanceTag()
function verilog#ReturnFromInstanceTag()
if winnr('$') > 1 && exists("g:verilog_navigate_split")
if exists("g:verilog_navigate_split_close")
exec g:verilog_navigate_split_close
@ -647,7 +647,7 @@ function verilog_systemverilog#ReturnFromInstanceTag()
endif
endfunction
function verilog_systemverilog#FollowInstanceSearchWord(line, column)
function verilog#FollowInstanceSearchWord(line, column)
let @/='\<'.expand("<cword>").'\>'
call verilog#FollowInstanceTag(a:line, a:column)
exec "normal!" . @/
@ -658,7 +658,7 @@ endfunction
"------------------------------------------------------------------------
" Command to control errorformat and compiler
" {{{
function! verilog_systemverilog#VerilogErrorFormat(...)
function! verilog#VerilogErrorFormat(...)
" Choose tool
if (a:0 == 0)
let l:tool = inputlist([

View File

@ -9,7 +9,7 @@ set cpo-=C
" Append UVM errorformat if enabled
if (exists("g:verilog_efm_uvm_lst"))
let verilog_efm_uvm = verilog_systemverilog#VariableGetValue('verilog_efm_uvm_lst')
let verilog_efm_uvm = verilog#VariableGetValue('verilog_efm_uvm_lst')
if (index(verilog_efm_uvm, 'all') >= 0 || index(verilog_efm_uvm, 'info') >= 0)
CompilerSet errorformat+=UVM_%tNFO\ %f(%l)\ %m
endif

View File

@ -10,7 +10,7 @@ endif
setlocal include=^\\s*`include
" Set omni completion function
setlocal omnifunc=verilog_systemverilog#Complete
setlocal omnifunc=verilog#Complete
" Store cpoptions
let oldcpo=&cpoptions

View File

@ -163,7 +163,7 @@ function! s:SyntaxCreate(name, verilog_syntax)
let region_start = entry["match_start"]
let region_end = entry["match_end"]
if verilog_systemverilog#VariableExists('verilog_quick_syntax')
if verilog#VariableExists('verilog_quick_syntax')
execute 'syn keyword verilogStatement '.region_start.' '.region_end
else
let verilog_syn_region_cmd = 'syn region '.verilog_syn_region_name
@ -215,7 +215,7 @@ function! s:SyntaxCreate(name, verilog_syntax)
endfunction
" Only enable folding if verilog_syntax_fold_lst is defined
let s:verilog_syntax_fold=verilog_systemverilog#VariableGetValue("verilog_syntax_fold_lst")
let s:verilog_syntax_fold=verilog#VariableGetValue("verilog_syntax_fold_lst")
" Syntax priority list
let s:verilog_syntax_order = [
@ -396,7 +396,7 @@ if version >= 508 || !exists("did_verilog_syn_inits")
delcommand HiLink
endif
let b:current_syntax = "verilog_systemverilog"
let b:current_syntax = "verilog"
" Restore cpoptions
let &cpoptions=oldcpo

View File

@ -139,7 +139,7 @@ function! TestEfm(tool, mode, search_uvm)
endif
" Setup 'errorformat' and 'makeprg'
call verilog_systemverilog#VerilogErrorFormat(a:tool, a:mode)
call verilog#VerilogErrorFormat(a:tool, a:mode)
setlocal makeprg=cat\ %
" Populate quickfix window