Composer.LSP.Actions (composer v0.2.0)

Copy Markdown View Source

Quick fixes from lint's suggestions.

Composer.LSP.Convert puts each diagnostic's suggestions in its data. A diagnostic's range covers the reference string, quotes included, so each suggestion replaces it with the quoted suggestion.

Summary

Functions

The quick fixes for diagnostics, LSP diagnostics of the document at uri (maps or GenLSP structures with range and data). quoted? tells whether a diagnostic's range starts at a string's opening quote; one that does not (a fallback range, such as a steps: key) gets no fix.

Functions

for_diagnostics(uri, diagnostics, quoted? \\ fn _diagnostic -> true end)

@spec for_diagnostics(String.t(), [map()], (map() -> boolean())) :: [map()]

The quick fixes for diagnostics, LSP diagnostics of the document at uri (maps or GenLSP structures with range and data). quoted? tells whether a diagnostic's range starts at a string's opening quote; one that does not (a fallback range, such as a steps: key) gets no fix.