*pascal_lint* is a simple plugin to call fpc
(Free Pascal Compiler) and display the output of the compilation to the user asynchronously. There aren't any linting options for Pascal apart from using the Lazarus IDE so this is a good enough compromise.
Note: This makes use of Neovim's terminal splits. The plugin won't work in regular vim.
fpc
neovim
Use your favorite plugin manager.
- vim-plug
- Add
Plug 'dylanaraps/pascal_lint.nvim'
to yourinit.vim
- Run
:PlugInstall
- Add
Run fpc
on the current file and display the compiler output in a split below.
Display compiler output on file save. This is asynchronous so it doesn't block neovim.
Add this line to your init.vim
.
autocmd BufWritePost *.pas :FPC
Which arguments to pass to fpc
.
" Default
let g:pascal_lint#args = '-S2'
What size split to create.
" Default
let g:pascal_lint#split = '5new'