neovim

Personal neovim configuration files
git clone git://gtms.dev/neovim
Log | Files | Refs

efm_bug.lua (498B)


      1 local data = [[
      2 [a1.tt]
      3 (1,17)  error: ';' missing
      4 (21,2)  warning: variable 'z' not defined
      5 (67,3)  error: end of file found before string ended
      6 
      7 [a2.tt]
      8 
      9 [a3.tt]
     10 NEW compiler v1.1
     11 (2,2)   warning: variable 'x' not defined
     12 (67,3)  warning: 's' already defined
     13 ]]
     14 local efm = [[%P[%f],(%l\,%c)%*[ ]%t%*[^:]: %m,%Q]]
     15 
     16 -- list of lines
     17 local lines = {}
     18 for line in string.gmatch(data, '([^\n]+)') do
     19   table.insert(lines, line)
     20 end
     21 
     22 -- fill qf
     23 vim.fn.setqflist({}, 'r', { lines = lines, efm = efm })