Giter VIP home page Giter VIP logo

commonlisp-vscode's Introduction

commonlisp-vscode

Common Lisp Editing Extension for vscode

Update

cl-lsp is updated with a cleaner REPL! Please update by do git pull in ~/.roswell/local-projects/ailisp/cl-lsp

Screenshot

Features

  • Common Lisp syntax highlight, Auto indenting/formating, folding.
  • (Optional) Structural editing and navigation provided by strict-paredit-vscode.
  • Autocompletion, documentation on hover, go to definition, compile & load file, REPL backed by cl-lsp language server.

Requirements

  • Install roswell and have ~/.roswell/bin in PATH
  • Install cl-lsp, above two is required because original package doesn't have readline support in prepl.
    • ros install ailisp/linedit
    • ros install ailisp/prepl
    • ros install ailisp/cl-lsp
  • (Recommend) Install strict-paredit-vscode: ext install ailisp.strict-paredit, which provides best parens edit experience close to Emacs.
  • (Recommend) Use sbcl instead of sbcl_bin in roswell, to get go to definition with symbols in common-lisp package:
    • ros install sbcl
    • ros use sbcl

Known Issues

  • No debugger, but planned to come soon.

Credits

cl-lsp provides a complete common lisp language server protocol and a mostly working LSP client for vscode. I forked cl-lsp to fix some issues on it and this repo is fix to its vscode plugin to support recent version of vscode and adding a few improvements: auto indenting on newline and run REPL.

Release Notes

Users appreciate release notes as you update your extension.

0.3.2

  • Fix path issue that requires cl-lsp in path, was not fixed properly in 0.3.1

0.3.1

  • Use absolute path as default cl-lsp path

0.3.0

  • avoid lsp server error mixed with REPL, record error in log

0.2.0

  • support readline editing (arrow key works, history, etc.) in repl
  • default keybinding to eval (Ctrl+Enter) and to start REPL (Ctrl+Shift+Enter)

0.1.1

  • Support open multiple commonlisp-vscode in multiple vscode window

0.1.0

  • REPL doesn't show lsp messages, is a clean PREPL now

0.0.4

  • LSP and REPL use same lisp process, so evaluate in file is available to REPL now

0.0.3

  • Fix auto indenting on newline, close to edit lisp file in emacs

0.0.2

  • Fix on lsp side to recognize lisp symbols on hover
  • Add option to set lsp path

0.0.1

Initial release of commonlisp-vscode, support all features mentioned in readme

Enjoy!

commonlisp-vscode's People

Contributors

ailisp avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

droidkita

commonlisp-vscode's Issues

ros install ailisp/linedit fails on macos 10.15.6

Unhandled LOAD-SYSTEM-DEFINITION-ERROR: Error while trying to load definition for system osicat from pathname /Users/andi/.roswell/lisp/quicklisp/dists/quicklisp/software/osicat-20200715-git/osicat.asd: COMPILE-FILE-ERROR while compiling #<CL-SOURCE-FILE "cffi-toolchain" "toolchain" "bundle">

Same error for prepl

Should print statements show in the repl?

When I run a simple hello world function that writes to stdout I get a void response, which is expected since the function returns nothing. What is surprising is that I don't see the output. I see it in sly on emacs. Any ideas on what might be going on?

Great work, by the way. I'm so excited for this project!

Spaces in the PATH of the file

Using Lisp: Compile And Load File (lisp.compileAndLoadFile) gives this error if the path of the file has spaces in it.

image

In the line bellow, I guess is possible to replace the %20 for something cl-lsp can accept or wrapped it into quotes.

uri: document.uri.toString()

PD. Sorry, I tried to clone the project and send a push request fix but I wasn't able to make the extension works (not really experienced in VScode extensions).

"ros install sbcl" fails on Windows, provide alternative.

It's very painful (and impossible, at least for me) to do "ros install sbcl" on Windows. The process fails one way or another, after trying many times. Please provide an alternative so that we can have the "Go to Definition" feature.

Connection to lsp times out

After installing the extension, I get my VSCode too slow. Furthermore, when I try to evaluate an LISP expression I get:
Command 'Lisp: Evaluate' resulted in an error (Running the contributed command: lisp.eval failed.). The log:

[Error - 7:22:39 AM] Starting client failed
Error: Connection to lsp times out
	at Timeout._onTimeout (/Users/jose/.vscode/extensions/ailisp.commonlisp-vscode-0.3.2/out/extension.js:137:32)
	at listOnTimeout (internal/timers.js:549:17)
	at processTimers (internal/timers.js:492:7)

can't connect to lsp

This is almost a given with anything involving lisp.

Running Macos Ventura on Apple silicon M1.

Messages in console:

Error: Connection to lsp times out
	at Timeout._onTimeout (/Users/lewis/.vscode/extensions/ailisp.commonlisp-vscode-0.3.2/out/extension.js:137:32)
	at listOnTimeout (node:internal/timers:559:17)
	at process.processTimers (node:internal/timers:502:7)

So, that was a path problem. With path updated properly (needs full path ~/ doesn't work: go figure), I get a different message:

The terminal process failed to launch (posix_spawnp failed).

VS Code Output: onnection to lsp times out

Hey there, new to lisp and vscode.

Got just about everything installed on your guide,

performed all the tasks listed except the first one listed which looks optional.

  • cl-lsp is updated with a cleaner REPL! Please update by do git pull in ~/.roswell/local-projects/ailisp/cl-lsp

Everything is looking good, added the ~/.roswell/bin, however!

The following shows in the output window:
[Error - 6:29:43 PM] Starting client failed
Error: Connection to lsp times out
at Timeout._onTimeout (/home/tr/.vscode/extensions/ailisp.commonlisp-vscode-0.3.2/out/extension.js:137:32)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)

and VS Code is chain displaying terminal process "/home/tr/.roswell/bin/cl-lsp 'tcp,' '10003'" terminated wiht exit code 1.

What does that mean? i am new new to lisp and vs code.

Thanks, i look forward to having a nice interface like VS code and repl interaction.

Nick.

Support for remotely connecting to the language server?

I get error while trying to install everything on Windows, so I thought I could write a Docker image to act as the server, but the config option only allows passing a path.

Would it be possible to add support for remotely connecting to cl-lsp? It seems to me like having a docker image with everything pre-configured would be the best way to make this whole project portable to Windows and MacOS (for x64 cpus anyway).

Extension Commands Not Working

Hello,

I really do think that this will be a helpful extension. I have installed Roswell and added the ~/.roswell/bin to my $PATH.
Currently, I get command not found errors whenever I try to run any commands.

For Example
"Command 'Lisp: Compile And Load File' resulted in an error (command 'lisp.compileAndLoadFile' not found)".

lisp_error

Also, the autocomplete is not working.

Roswell dependency

What's the reason for the roswell dependency? I know it's convenient for some, but the majority of projects don't have this kind of dependency, using Quicklisp instead for installations. If there's functionality from roswell that's being used, great, but generally the fewer dependencies the better.

"linedit" requires GCC, add MSVC support.

Cannot install ailisp/linedit because it tries to compile its components using GCC, which is not present on Windows without the help of Cygwin and MSYS2. Please add support for MSVC.

cl-lsp path problem with remote development

when I try to use the extension on my remote server. It keeps showing:
The terminal process failed to launch: Path to shell executable "cl-lsp" does not exist.

I've tried to change the path to the absolute path on the server, but it's still not working.

I have the export PATH="$HOME/.roswell/bin:$PATH" in my bashrc file and I can call cl-lsp directly from the remote terminal.

I really appreciate your work on this extension!

Could you please tell me how to get this right?

how to run a .lisp script?

excuse me!
I install the Extension,but i don't know how to run a script,"F5" and "C + F5" let me choose a running environment,but the list don't hava lisp environment.
i feel more puzzled ! !

This extension can't works on vscode for WSL2.

I have installed all the requirements according to the README guide.
But when I open the common lisp source project, the error message continuously popup (very crazy, blind my eyes).
The error message said:

 The terminal process faild to launch... because `cl-lsp` not found

(I can't read its content carefully for my eyes have got blind by fastly continuously popup)

However ~/.roswell/bin/ are included in $PATH and I can run cl-lsp directly on shell.

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.