Skip to content

Conversation

@Lordfirespeed
Copy link

@Lordfirespeed Lordfirespeed commented Jul 15, 2023

This plugin is WIP, not-yet-released for various reasons:

  1. LS Executables are not bundled into the plugin / downloaded at an appropriate time.
  2. Currently requires JetBrains EAP builds (>=2023.2).
  3. Not feature-complete.

To-do list:

  • Plugin should bundle or download appropriate executables
  • Plugin should automatically provide access to Roblox type definitions and docs (when appropriate)
  • Plugin should integrate with Rojo (notably sourcemap.json)
  • Errors/warning highlighting (Supported via LSP)
  • Syntax highlighting
  • Autocompletion provider (Supported via LSP)
  • Go to reference provider (Supported via LSP)
  • Refactor provider
  • Folding builder
  • Commenter
  • Quick fixes (Supported via LSP)
  • Wait for 2023.2 to be released in earnest
  • Publish to JetBrains plugin marketplace

@JohnnyMorganz
Copy link
Owner

This is pretty neat, thank you!
Is the expectation that the Todo list is completed before this is available? Or is it usable in its current state

@Lordfirespeed
Copy link
Author

It's not yet usable, no - a bit more of the to-do list needs to be done (especially the points relating to the binaries).
I didn't realise quite how difficult implementing this plugin would be 😂 even just refactoring support is difficult.

@JohnnyMorganz
Copy link
Owner

I don't think luau lsp has any refactoring operations. What kind of stuff does that entail?

@Lordfirespeed
Copy link
Author

Lordfirespeed commented Aug 5, 2023

It involves some specific implementation (on my part) in the plugin. It's not trivial to explain, but

  • see here for a simple properties language example
  • see here for details

Essentially, whilst VSCode implements a 'naive' renaming system that looks for particular strings and replaces them, JetBrains language support plugins use a more complicated 'smart' renaming system that involves a language lexer and parser to generate tokens and use them to build a 'PSI tree' which can then be traversed to find usages of the text that will definitely be a reference, rather than just a coincidental instance of the text.

@JohnnyMorganz JohnnyMorganz marked this pull request as draft August 6, 2023 10:15
@TetsuzaemonIba
Copy link

I made one more attempt to create a plugin for JB IDEs (I missed the previous one, when searching for existing solutions) https://plugins.jetbrains.com/plugin/24957-luau/edit/versions/eap/772699
It's yet in the "private" beta, but I hope to release it in a month or so

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.

3 participants