Skip to content

update config & lint checks, remove unneeded fields#683

Merged
davidanthoff merged 2 commits intomasterfrom
misc
May 8, 2020
Merged

update config & lint checks, remove unneeded fields#683
davidanthoff merged 2 commits intomasterfrom
misc

Conversation

@ZacLN
Copy link
Copy Markdown
Contributor

@ZacLN ZacLN commented May 8, 2020

  • removes a few unused fields from LanguageServerInstance and Document.
  • Groups the lint option fields together in LSI.
  • Adds a lint option for different missing ref highlighting modes and passes this to mark_errors.
  • Explicitly writes out all the config options we're seeking from the client. Uses new default_options variables in DocFormat/SL to set config (these are now all on by default).
    -Requires turn checks on by default, add missingref options StaticLint.jl#160 and SL probably needs a little ver bump.

@ZacLN ZacLN requested a review from davidanthoff May 8, 2020 08:22
@ZacLN ZacLN self-assigned this May 8, 2020
@ZacLN ZacLN added this to the Current milestone May 8, 2020
@davidanthoff
Copy link
Copy Markdown
Member

StaticLint v4.2.0 is tagged, so Project.toml here can be updated.

davidanthoff
davidanthoff previously approved these changes May 8, 2020
@davidanthoff davidanthoff merged commit c4eaf33 into master May 8, 2020
@davidanthoff davidanthoff deleted the misc branch May 8, 2020 10:08
ConfigurationItem(missing, "julia.lint.missingrefs")
]))

new_DF_opts = DocumentFormat.FormatOptions([isnothing(opt) ? DocumentFormat.default_options[i] : opt for (i,opt) in enumerate(response[1:11])]...)
Copy link
Copy Markdown
Member

@non-Jedi non-Jedi May 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point of the constructors in DocumentFormat/StaticLint was so that doing these kind of checks for nothingness here is unnecessary. Is the concern that the language server receives non-Bool, non-nothing responses?

Suggested change
new_DF_opts = DocumentFormat.FormatOptions([isnothing(opt) ? DocumentFormat.default_options[i] : opt for (i,opt) in enumerate(response[1:11])]...)
new_DF_opts = DocumentFormat.FormatOptions(response[1:11]...)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I absolutely missed that - was a bit of a rush job. Could you make a PR to revert this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing.

non-Jedi added a commit to non-Jedi/LanguageServer.jl that referenced this pull request May 8, 2020
julia-vscode#683 needs latest versions. Ideally General registry should be updated as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants