GithubHelp home page GithubHelp logo

jayadamsmorgan / pkllanguageserver Goto Github PK

View Code? Open in Web Editor NEW
17.0 2.0 1.0 561 KB

Language Server implementation for Apple Pkl language written in Swift

Home Page: https://pkl-lang.org

License: Apache License 2.0

Swift 99.25% TypeScript 0.35% Vim Script 0.02% Lua 0.25% Makefile 0.13%
lsp lsp-server pkl swift

pkllanguageserver's Introduction

Discord

PklLanguageServer

Language server for Apple Pkl language written in Swift.

Overview

This language server is still in a very early development stage.

The goal of this project is to make a fully functional Language Server for Pkl language and have lots of fun.

Contributing

I would really love to make it a community driven project, so don't hesitate to contribute or help in any way possible.

The Discord Server is there for any question, help, advice or just casual chatting.

Also check out Unofficial Pkl Community Discord Server, lots of great people there discussing Pkl. They also have a channel about LSPs!

And don't forget to check Code of Conduct.

Feature Status

Feature Status
Completion ๐ŸŸข
Definition ๐ŸŸข
Diagnostics ๐ŸŸข
Document Symbols ๐ŸŸข
Renaming ๐ŸŸ 
Semantic Highlighting TBA
  • ๐ŸŸข -- Feature is working
  • ๐ŸŸ  -- Feature is working, however due to early development stage may be incomplete or not working as intended (disabled by default, can be enabled with --enable-experimental-features)
  • ๐Ÿ”ด -- Not planned
  • TBA -- Work on the feature is not yet in progress, but it's being looked into
  • WIP -- Development work on the feature is actively progressing

State of features and details

  • Module imports are indexed for completion only with relative paths or standard pkl library. import* expression also does not work yet.

  • Diagnostics are working on a basic level. Type checking isn't a thing yet.

Installing and running from source

Install libjemalloc:

(Alternatively, you can comment out benchmarking target in Package.swift and skip this step)

# macOS (Homebrew)
brew install jemalloc

# Linux
sudo apt install libjemalloc-dev

Clone repository and build the project:

git clone https://github.com/jayadamsmorgan/PklLanguageServer --recurse-submodules
cd PklLanguageServer
make install

You will be prompted to type in your password so the server could be installed to /usr/local/bin folder.

Now you can run the server with:

pkl-lsp-server

Check help for more options:

pkl-lsp-server -h

Editor support

Debugging

pkl-lsp-server will use standard output and JSONRPC connection with error log level to print logs.

pkl-lsp-server -log debug will print out logs with debug log level.

Use your client's LSP log or standard output to check the logs.

Honorable mentions

Huge shoutout to Mattie, creator of LanguageServerProtocol and SwiftTreeSitter libraries.

This project could not have been possible without his great work and huge help. Check out his awesome blog.

pkllanguageserver's People

Contributors

jasongwartz avatar jayadamsmorgan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jasongwartz

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.