There is a disparity between the Mac and PC versions of Atom with regard to scope descriptors on files that are not open / being opened.
I’m working on this package: https://github.com/Knils/atom-tabletopsimulator-lua
I’ve added a linter provider to it. This works fine on PC, but has trouble on the Mac; it is as if the files are being linted before the file grammar has been parsed. Some code from the linter provider:
while (i < lineCount) line = editor.lineTextForBufferRow(i) if 'string.quoted.other.multiline.lua' in editor.scopeDescriptorForBufferPosition([i, 0]).scopes i += 1 continue ... rest of linter logic for line
This checks if the current line is inside a comment block, and if it is it skips on to the next. The problem is it does not work (on the Mac) when files are first opened, or are scanned in the project view; the scope is not detected. If after opening you force the linter to scan it again (by entering a character then deleting it for instance) then it correctly parses the comment and the warnings disappear.
Does the Mac version start running providers on files before they have been parsed by the relevent grammar?