Update textDocumentSync server capabilities
The README states that "Diagnostics are only updated when files are saved or opened/closed". However, I noticed that during my usage of fortls with Neovim through the builtin LSP implementation, saving a file did not cause the diagnostics to update.
After digging into Neovim's code I noticed that it never sent out any
textDocument/didSave notifications to the client. Initially I thought
this was a bug on their end until I noticed that the reason why Neovim
didn't send those notifications was because the server (fortls) did not
provide the corresponding server capability. Instead, it only provided
an integer indicating the textDocumentSyncKind for the change
notifications.
Looking into the specification of the LSP here 1 I noticed that the server should/can actually provide a more detailed description of its capabilities. This commit, does exactly that.
Notice the final structure of the TextDocumentSyncOptions at the end
of the linked paragraph.