Code Monkey home page Code Monkey logo

janet-lsp's Introduction

Janet LSP

A Language Server (LSP) for the Janet programming language.

Overview

The goal of this project is to provide an augmented editor/tooling experience for Janet, via a self-contained, Language Server Protocol-compliant language server (which is itself implemented in Janet!).

Current features include:

  • Partial auto-completion based on defined symbols
  • On-hover definition of symbols as returned by (doc ,symbol)
  • Inline compiler errors

Planned features include:

  • Additional autocompletion support
  • Jump to definition/implementation
  • Find references from definition/implementation
  • Refactoring helps
  • Symbol renaming helps

Possible (but de-prioritized) features include:

  • Syntax highlighting for Janet via semantic tokens

Desirable, but possibly more complicated/difficult features include:

  • Stand-alone (i.e. non-Editor-dependent) usage via API/CLI

Caveats

  • Windows/MacOS support is mostly untested and, in the case of Windows, known to be somewhat glitchy. Contributions welcome here.
  • The only editor integration currently tested against is Visual Studio Code.
  • I've never written a language server before, so I don't really know what I'm doing. Help me, if you'd like!

Clients (i.e. Editors)

Currently, the only editor tested and known working with Janet LSP is Visual Studio Code, which you can try/take advantage of by installing the Janet++ extension from the VS Code marketplace.

Other editors that implement LSP client protocols, either built-in or through editor extensions, include:

  • Emacs
  • vim/neovim
  • Sublime Text
  • Helix
  • Kakoune

If you get Janet LSP working with any of these options, please let me know!

Getting Started (for Development)

Clone this project and Build the stand-alone binary

Requires Janet and jpm.

$ git clone https://github.com/CFiggers/janet-lsp
$ cd janet-lsp
$ jpm deps
$ jpm build

Installing

After running the commands above, the following command will copy the janet-lsp binary to a location that can be executed via the command line.

$ jpm install

Contributions

Issues and Pull Requests welcome.

Prior Art

This project is a hard fork from (with much appreciation to) JohnDoneth/janet-language-server, which is Copyright (c) 2022 JohnDoneth and contributors.

janet-lsp's People

Contributors

cfiggers 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.