krischik / vim-ada

Complete Ada-Mode as Vim-Ball or Tar.bz2
http://www.vim.org/scripts/script.php?script_id=1609
GNU General Public License v3.0
11 stars 3 forks source link

Error on start crashes syntax highlighting #39

Closed TamaMcGlinn closed 1 year ago

TamaMcGlinn commented 1 year ago

Recently updated vim-ada, and now when I start neovim and open an Ada file, I get this error:

Error detected while processing function startify#open_buffers[6]..<SNR>319_open_buffer[12]..BufReadPost Autocommands for "*":                                             
Error executing lua callback: /tmp/.mount_nvim8fcSPO/usr/share/nvim/runtime/filetype.lua:21: Error executing lua: /tmp/.mount_nvim8fcSPO/usr/share/nvim/runtime/filetype.lu
a:22: Vim(setlocal):E524: Missing colon: comments=O::--\ \ ,--                                                                                                             
stack traceback:                                                                                                                                                           
        [C]: in function 'nvim_cmd'                                                                                                                                        
        /tmp/.mount_nvim8fcSPO/usr/share/nvim/runtime/filetype.lua:22: in function </tmp/.mount_nvim8fcSPO/usr/share/nvim/runtime/filetype.lua:21>                         
        [C]: in function 'nvim_buf_call'                                                                                                                                   
        /tmp/.mount_nvim8fcSPO/usr/share/nvim/runtime/filetype.lua:21: in function </tmp/.mount_nvim8fcSPO/usr/share/nvim/runtime/filetype.lua:10>                         
stack traceback:                                                                                                                                                           
        [C]: in function 'nvim_buf_call'                                                                                                                                   
        /tmp/.mount_nvim8fcSPO/usr/share/nvim/runtime/filetype.lua:21: in function </tmp/.mount_nvim8fcSPO/usr/share/nvim/runtime/filetype.lua:10>

Reverting this one line change fixes it; that is, setting it back to:

setlocal comments=O:--,:--\ \
krischik commented 1 year ago

This is tricky as the original has a space as last character on the line and spaces at the end of a line are quickly lost. Maybe a solution using execute might work for both gvim and neovim as well as protecting the trailing space from accidental deletion.

I'm open for suggestions if you have a better idea.

krischik commented 1 year ago

@TamaMcGlinn try the hotfix/5.3.3 branch and tell me if it fixes the problem.

krischik commented 1 year ago

Fixed