Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First Pass at LSP #129

Merged
merged 11 commits into from
Apr 23, 2021
Merged

First Pass at LSP #129

merged 11 commits into from
Apr 23, 2021

Conversation

natemoo-re
Copy link
Member

@natemoo-re natemoo-re commented Apr 23, 2021

Changes

This PR includes major scaffolding for IDE support—currently our extension works for VS Code, but the back-end is implemented as an IDE-agnostic Language Server via LSP (follow up to #89)

Credit where credit is due, much of this code is adapted from Svelte's Language Tools.

Testing

No direct tests, but you can launch the extension using VS Code's debugger and selecting "Launch Extension"

Docs

TODO

  • Docs / READMEs updated
  • Code comments added where helpful

@natemoo-re natemoo-re self-assigned this Apr 23, 2021
@matthewp
Copy link
Contributor

lgtm


let docClient: lsp.LanguageClient;

const TagCloseRequest: lsp.RequestType<lsp.TextDocumentPositionParams, string, any> = new lsp.RequestType('html/tag');

/** */
Copy link
Member

Choose a reason for hiding this comment

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

The JSDoc stuff was mainly for generating docs in Astro core (or at least experimenting with it). I think it’d be safe to just disable the JSDoc rule for this whole vscode/ folder (put another .eslintrc in the root of this disabling just that rule)

@@ -0,0 +1,37 @@
MIT License

Copyright (c) 2021 Fred K. Schott
Copy link
Member

Choose a reason for hiding this comment

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

Seems like you wrote a lot of this 🙂. Please put your name in the license here, and we can update as necessary. We probably need to do something like this in the top-level:

Portions Copyright (c) 2021 Fred K. Schott
Portions Copyright (c) 2021 Nate Moore
Portions Copyright (c) 2021 Matthew Phillips
Portions Copyright (c) 2021 Drew Powers
(others)?

Copy link
Member

Choose a reason for hiding this comment

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

Also we probably do need to add a CLA to Astro


console.log({ actions, isImport });

// TODO: handle actions
Copy link
Member

Choose a reason for hiding this comment

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

Random comment proving I scrolled down this far 😛

Copy link
Member

@drwpow drwpow left a comment

Choose a reason for hiding this comment

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

LGTM!

@natemoo-re natemoo-re merged commit 87af0ae into main Apr 23, 2021
@natemoo-re natemoo-re deleted the lsp branch April 23, 2021 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants