Code Monkey home page Code Monkey logo

Comments (6)

kovisoft avatar kovisoft commented on July 21, 2024

TBH, I have never used any plugin manager, but other users reported that they installed and used slimv with pathogen or vundle. Maybe I can try to assist you if you tell what kind of problems you had.

from slimv.

conor-f avatar conor-f commented on July 21, 2024

Thank you for your fast response!

I added the line Plug 'kovisoft/slimv' to my .vimrc and then opened up a new instance of vim and ran :PlugInstall which says it successfully installed slimv. However, when I open a file (e.g. test.rkt or test.lisp) I don't see any REPL open up and any , commands have no effect (e.g. ,b which I think should run the buffer?)

I have /usr/share/common-lisp/source/slime/start-swank.lisp also after running sudo apt install slime.

You can try out my setup by cloning this branch of my repo: https://github.com/conor-f/vim-stuff/tree/slimv and running make slimv_install. This shouldn't affect your existing vim setup, but take precautions anyways if you can't readily reproduce your current setup!

from slimv.

kovisoft avatar kovisoft commented on July 21, 2024

On a virtual machine I created an empty .vim/ directory and an empty .vimrc file. The I did everything as described in the Plug documentation:

  • created the .vim/autoload/ directory
  • not described in the documentation but I also created the other default vim directories inside .vim (doc, ftdetect, ftplugin, indent, plugin, syntax), but I don't think these are needed as they remained empty
  • downloaded Plug into .vim/autoload/ using the curl command from the documentation
  • added the necessary lines to .vimrc as described in the documentation:
call plug#begin()
Plug 'kovisoft/slimv'
call plug#end()
  • exited vim and reloaded .vimrc
  • executed the :PlugInstall command
  • exited vim and restarted by opening a .lisp file: vim test.lisp
  • verified via :scriptnames that the slimv scripts were loaded
  • pressed ,c and the swank server was started in a new window, then the REPL buffer was opened (please note that the REPL buffer is not automatically opened upon vim startup)

I checked the directory structure and the slimv files were downloaded into .vim/plugged/slimv/ in the usual vim hierarchy (ftplugin, indent, plugin, syntax, etc subdirectories). You don't need to install a separate slime, it is also contained in .vim/plugged/slimv/slime/.

I suggest that you try to repeat the above steps. When you finally load a .lisp file into vim, then check what scripts are loaded via :scriptnames.

from slimv.

conor-f avatar conor-f commented on July 21, 2024

Thank you for making such an effort to reproduce my issue :)

Using your detailed description, I think I narrowed down the issue slightly. I use i3 + Ubuntu 20.04 and didn't have xterm installed. After installing xterm and using ,c to connect when within a Lisp file, I had better results :) Two follow up questions though:

  1. :echo SlimvSwankCommand() outputs ! SWANK_PORT=4005 xterm -iconic -e "sbcl" --load "/home/conor/Code/vim-stuff/.vim/plug_plugins/slimv/slime/start-swank.lisp" & which seems correct, but it causes a new xterm window to pop up which needs to be manually closed when finished with. Is it supposed to be running in the background or is this expected behavior?
  2. I tried using ,c when editing a file named test.rkt to see if it would work with racket but it didn't have any reaction. Does slimv support racket? Or just Scheme?

from slimv.

kovisoft avatar kovisoft commented on July 21, 2024
  1. The expected behavior is that the new xterm window remains running even if you exit vim. Slimv does not close the swank server upon exit. If you later on start vim again, and open a new REPL buffer, then slimv is going to connect to the existing instance (no new xterm window is opened) and you have your previous lisp environment available. If you no longer need it, you can manually close the swank server, then slimv will open a new xterm window when opening a new REPL buffer.
  2. Scheme is supported by slimv, but racket is currently not fully supported. I guess it is possible to use slimv with racket files with a little tweaking, like manually setting the swank command, and forcing the filetype to scheme, but I have no experience with it. You can try to add this to your .vimrc file in order to identify .rkt files as scheme files:
au BufNewFile,BufRead *.rkt setf scheme

from slimv.

conor-f avatar conor-f commented on July 21, 2024

Thanks for your help kovisoft :) I understand slimv better now and how to use it.

from slimv.

Related Issues (20)

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.