Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update xvlog.vim #4793

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion ale_linters/verilog/xvlog.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
" Description: Adds support for Xilinx Vivado `xvlog` Verilog compiler/checker

call ale#Set('verilog_xvlog_executable', 'xvlog')
call ale#Set('verilog_xvlog_options', '')

if &filetype == 'systemverilog'
call ale#Set('verilog_xvlog_options', '-sv')
else
call ale#Set('verilog_xvlog_options', '')
endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The -sv option should be added dynamically in the GetCommand function based on the the filetype for a:buffer. I'll close this PR and you can open another in future with this and a test for the change.


function! ale_linters#verilog#xvlog#GetCommand(buffer) abort
return '%e ' . ale#Pad(ale#Var(a:buffer, 'verilog_xvlog_options')) . ' %t'
Expand Down
Loading