Code Monkey home page Code Monkey logo

vscode-janet-plus-plus's Issues

Error when I import a module (e.g. json)

Hi,

when i import the janet json module i get the following error.
(import json :prefix "")

"could not load native /usr/local/lib/janet/json.so: config mismatch - host 1.31.0(0001) vs. module 1.32.1(0001)".

i reinstalled janet 1.32.1, recompiled json, changed the language server etc.
which config is meant? or where does this error come from?
System:
Distributor ID: Ubuntu
release: 22.04

thanks, Felix

TODO: Add support for long strings

Currently the lexer recognizes only "regular" (short?) strings (i.e., those wrapped with " regular quotation marks). Janet supports long strings, which currently is not recognized by the lexer.

This causes the janet:cursorInString flag to be false even when the cursor is inside of a long string.

This causes structural editing features to misbehave when the cursor is inside a long string.

Also, auto indentation inside long strings is unpredictable.

TODO: Fix Ctrl + Arrow key movement while in a comment

Currently, Ctrl + Arrow key invokes Janet Paredit: Move Cursor [Forward | Backward or Up] Sexp/Form (aka janet.paredit.backwardSexp). That's good in code, but really annoying in a comment (where it would be better to only do cursorWordLeft/cursorWordRight).

New local imports not picked up by the LSP

I added a new module to my local code during a session. Janet++ told me the imported bindings didn't exist. Restarting VS Code fixed the problem.

I'm using the v.1.1.2 prerelease.

LSP fails to start

I'm attempting to use Janet++ in a small project and see this error when the LSP attempts to start:

error: nil called with 2 arguments, possibly expected 1
  in <anonymous> [src/main.janet] on line 212, column 13
  in map [boot.janet] on line 998, column 3
  in find-unique-paths [src/main.janet] on line 212, column 8
  in main [src/main.janet] (tailcall) on line 228, column 14
  in run-main [boot.janet] on line 3936, column 16
  in cli-main [boot.janet] on line 4076, column 13

I'm running Janet 1.32.1-meson on Mac OS and VSCode 1.83.1

TODO: Handle Anonymous functions correctly

Currently will re-format Janet's anonymous function macro, which should look like this:

|(fn args)

to this instead:

| (fn args

Fortunately doesn't cause anonymous function to break (Janet ignores the whitespace) but should still fix.

Probably as simple as adding | to a regex somewhere that handles prefixes (like # or @ in other places).

TODO: Add support to set your own path to the janet language server in the system

feature request
You should have the possibility to set the path in the plugins settings to your own language server version. Default should be the language server, which is delivered with the extension.

Maybe the user can also set an environment variable to the path of the language server in his operating system. If this is set, this can also be selected as default.

It is important that the extension handles the path differently in operating systems like linux or windows.

Issues with "evaluate expression" behavior

The "evaluate expression" command in Janet++ has a few peculiarities compared with pretty much every other evaluate-in-editor plugin I've used:

  1. Evaluating an expression also selects the expression for some reason.
  2. The command doesn't really evaluate expressions; it evaluates top-level forms. If it's supposed to be "evaluate expression", you should be able to put the cursor after a subform or literal or whatever and evaluate just that.
  3. Top-level forms that aren't enclosed in parens/brackets/etc. can't be evaluated (it looks like just a newline is sent to the REPL).

I'm using v1.1.1 pre-release. Thanks for this project; I was really pleased to see that someone was working on this sort of thing.

Completion suggests incomplete versions of private identifiers

Create a new Janet file. Type a top-level def- binding. Start typing the bound identifier. Incomplete versions of the name appear in the completion list. For instance, if the identifier is circumference, completion will suggest ci, cir, circ, circu, etc.

Wrong indentation for many macros with `& body` args

The following macros from the core API currently indent like normal tuples rather than like do:

  • compwhen
  • coro
  • defer
  • edefer
  • ev/do-thread
  • ev/spawn
  • ev/span-thread
  • ev/with-deadline
  • ffi/defbind
  • fiber-fn
  • forever
  • for
  • forv
  • generate
  • label
  • prompt
  • protect
  • repeat
  • when-with
  • with

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.