neovim

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

qf.lua (724B)


      1 local data = {}
      2 
      3 data[5] = {
      4   --- {{{
      5   data = [[
      6 file:lib/vc.dart
      7 test/qf.lua:5:1: Expected a method, getter, setter or operator declaration.
      8 test/test.lua:3:5: The name of a constructor must match the name of the enclosing class.
      9 test/efm_bug.lua:6:5: A function body must be provided.
     10 ]],
     11   -- }}}
     12   efm = '%f:%l:%c: %m',
     13 }
     14 
     15 local ACTIVE = 5
     16 local err = data[ACTIVE].data
     17 local efm = data[ACTIVE].efm
     18 
     19 vim.fn.setqflist({}, 'r')
     20 local lines = {}
     21 for line in string.gmatch(err, '([^\n]+)') do
     22   table.insert(lines, line)
     23 end
     24 vim.fn.setqflist({}, 'r', {lines = lines, efm = efm})
     25 
     26 -- Only valid items
     27 -- for _, item in ipairs(list.items) do
     28 --   if item.valid == 1 then
     29 --     vim.fn.setqflist({item}, 'a')
     30 --   end
     31 -- end