Coder Social home page Coder Social logo

racket-langserver's Introduction

racket-langserver

racket-langserver is a Language Server Protocol implementation for Racket. This project seeks to use DrRacket's public APIs to provide functionality that mimics DrRacket's code tools as closely as possible.

Installation and usage

A Racket runtime is a prerequisite, so before using racket-langserver, ensure that a Racket runtime is installed. You can install an from the official download page or install one from your package manager.

Atom

You can use the atom-ide-racket package. The language server will be automatically installed when atom-ide-racket installs.

VSCode

Use the Magic Racket extension.

Other editors and IDEs

First, install an LSP runtime for your editor.

Next, install the package via raco:

raco pkg install racket-langserver

Once it is installed, you can configure your editor to use a custom LSP client for Racket files (.rkt), and set the command for the custom client to

racket -l racket-langserver

You may need to restart your LSP runtime or your editor for racket-langserver to start.

Capabilities

Currently Supported:

  • Hover (textDocument/hover)
  • Jump to Definition (textDocument/definition)
  • Find References (textDocument/references)
    • Note: Currently only considers references within the current file.
  • Document Highlight (textDocument/documentHighlight)
  • Diagnostics (textDocument/publishDiagnostics)
  • Code Formatting (textDocument/formatting & textDocument/rangeFormatting & textDocument/onTypeFormatting)
  • Signature Help (textDocument/signatureHelp)
  • Rename (textDocument/rename & textDocument/prepareRename)
    • Note: Currently only allows renaming symbols defined within the current file.
  • Code completion (textDocument/completion)

Work in Progress:

  • Document Outline (textDocument/documentSymbol)

Notes for Contributers

It is useful to think of this project as a "headless mode" for DrRacket. Contributions to this project should seek to avoid re-implementing functionality that is already exposed through DrRacket's public API.

Currently, we do not support workspace-wide (or project-wide) methods because the underlying DrRacket code tools only operate on one file at a time. If multi-file code tools are a desirable feature, then they should be considered for inclusion into DrRacket proper before being implemented in this project.

racket-langserver's People

Contributors

cfinegan avatar dalev avatar dannypsnl avatar dergemkr avatar jackfirth avatar jeapostrophe avatar jo-sm avatar mlavrent avatar rmculpepper avatar runi-c avatar shhyou avatar shih-liang avatar shocoman avatar stainlesspot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.