Skip to content

Language server improvements #12

Open

Description

@SquidDev

#9 added basic support for Microsoft's language server protocol, and integration with Emacs and VS Code. However, there's a lot of improvements which could be made:

Features

  • Code folding: Aside from the obvious indentation/structrual folding, we should allow folding multi-line doc comments into a single one. Ideally we'd also identifiy multiple local x = require(y) statements and allow folding them together.

  • Refactoring/code fixes: Effectively we want a similar scheme to linters, just without detailed messages and tags. Some basic things we might like:

    • Invert if/else statement.
    • Convert between quote styles (single, double, long-style).
    • Convert between number formats (decimal <-> hex).
  • Renaming: This should be conceptually quite simple - just generate an edit which updates all names. We need to be careful that we don't introduce a conflict though - possibly worth seeing what additional info the resolver needs to handle this efficiently.

  • Document outline: I'm not entirely sure how we want to do this yet - we obviously don't want to document every local, but still need to give a decent overview of the layout.

  • Workspace symbols: It should be sufficient just to load all modules and dump the entire symbol tree.

  • Completion: This is an obvious choice, but I have no clue where to even begin on this.

  • Handle references in doc comments: We should be able to use go-to-definition, see usages and have symbol highlights for references within doc comments.

Performance

  • Check for memory leaks: It might be possible to do some automated detection of this too. For instance, run a specific task (open/close a file) many times and compare memory usage over time.
  • Use LSP's file watching support

Editors

  • Download the language server: On compatible platforms, we should download the language server automatically. Possibly worth looking into periodic updates too.

Activity

  1. added
    enhancementNew feature or request
    area-editorIssues relating to Illuaminate's language server and editor plugins
    on Apr 30, 2020
  2. added a commit that references this issue on May 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-editorIssues relating to Illuaminate's language server and editor pluginsenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions