Giter Site home page Giter Site logo

nvlime's Introduction

Nvlime logo

WARNING: parsley neovim plugin should be installed for Nvlime to work.

Intro

Nvlime is a Common Lisp development environment for Neovim, similar to SLIME for Emacs. It is a fork of long lived Vlime plugin but with modernized UI.

It provides REPL integration, autocompletion with nvim-cmp, cross reference utilities, a nice inspector, debugger, trace dialog, and many other great facilities.

To get your feet wet: Quickstart

Why?

Vlime is a good plugin on top of the great tool. But it tries to sit on both chairs (Vim and Neovim), when their feature implementations keep diverging. Also it's UI is clunky and disruptive (at least for my taste). So Nvlime is supporting only Neovim and focusing on improving Vlime UI with new Neovim features. Check CHANGELOG.md to find out what have changed.

Current State

Nvlime is currently in beta state and in active development. So expect some changes to configuration, UI or behavior. MREPLs currently do not work. Please beware of bugs, and file an issue if you find anything weird/unexpected.

Dependencies

Must-have:

  • Neovim master branch with the support of a title for nvim_open_win() 1af4bd0
  • Helper plugin parsley
  • ASDF
  • Quicklisp
  • An Internet connection to install other dependencies from Quicklisp

Good to have:

  • nvim-cmp for autocompletion
  • parinfer or paredit plugin - Nvlime can only detect s-expressions inside parentheses. To make your life easier, use paredit or any of parinfer implementations, like: nvim-parinfer or nvim-parinfer-rust. Even though paredit isn't perfect, but in my experience parinfer plugins are the cause of annoying bugs at the time of this writing.

Supported CL Implementations

The CL implementations listed below are supported. If you tried out Nvlime with an implementation not listed here, please let me know (see the Contributing section below for contact info).

Implementation Version Notes
ABCL 1.4.0 Supported by the nvlime-patched backend
Allegro CL 10.0 Tested with the Express Edition
CLISP 2.49+ No multithreading support
ECL 16.1.3 No SLDB support
CCL 1.11
SBCL 2.1.19
LispWorks 6.1 Tested with the Personal Edition

Quickstart

Installation

Use :h packages or your plugin manager instructions to add Nvlime to Neovim. As dependency Nvlime uses parsley - it is my plugin with a bunch of auxiliary functions. So it should be installed too. After that run sbcl --load <neovim plugins dir>/nvlime/lisp/start-nvlime.lisp.

If it's your first time running the server, Nvlime will try to install it's dependencies via Quicklisp.

Usage

When the server is up and running, use Neovim to start editing a CL source file, and type <leader>cc (\cc by default) in normal mode to connect to the server.

You can also let Neovim start the server for you - <leader>rr. See :help nvlime-start-up for more info.

All Nvlime keymaps starts with the "leader", so you are free to change g:nvlime_nvlime.leader to a key that is convenient for you (by default it is mapped to \). Suggested keys are , or <Space>.

To find out all plugin mappings for the current window type <leader>? or <F1>. There are a set of global mappings, which do not show in the help window. They are listed below and work for all Nvlime windows:

  • q - to close the current window (except for lisp filetypes).
  • <leader>ww - closes all plugin windows except main windows.
  • <Esc> - closes last opened floating window except current one.
  • <C-n> and <C-p> to scroll last opened floating window. If this keys are messing up with your config change them with g:nvlime_mappings directory: global.normal.scroll_up and global.normal.scroll_down. You can adjust scroll step with g:nvlime_config.floating_window.scroll_step variable. It is set to 3 lines by default.

If you need to make some floating window to be persistent, just turn it into a normal window. You can do it by splitting it into you current window with <C-w>h, <C-w>j, <C-w>k, <C-w>l or split the whole Neovim screen with <C-w>H, <C-w>J, <C-w>K or <C-w>L.

Main windows (repl, sbcl and compiler notes) aren't floating and by default placed on the right side of the screen. You can change this behavior with g:nvlime_config.main_window variable, which can accept a position key one of "top", "bottom", "left" or "right" and size key.

To enable autocompletion with nvim-cmp, first set vim.g.nvlime_config.cmp.enabled = true. Additionally you need to register the source for nvim-cmp, read its documentation for more information:

require('cmp').setup.filetype({'lisp'}, {
    sources = {
        { name = 'nvlime' }
        -- other sources like path or buffer, etc.
        -- .
        -- .
    }
})

See :help nvlime-tutor for a tutorial on how to use the main features, and :help nvlime for the full documentation.

Contributing

The source repo for Nvlime is hosted on GitHub:

https://github.com/monkoose/nvlime

Issues and pull requests are welcome. Read CONTRIBUTING.md for more info.

Credits

  • To all the contributors of slime Emacs extension. SLIME is free software.
  • To all the contributors of Vlime plugin. Without it there wouldn't be Nvlime. MIT license.
  • To HiPhish for nvim-cmp-vlime Some code from it were converted from lua to fennel for autocompletion support. MIT license.

License

MIT. See LICENSE.txt.

nvlime's People

Contributors

l04m33 avatar monkoose avatar phmarek avatar fukamachi avatar iamfirecracker avatar sjl avatar presuku avatar uki00a avatar aakropotkin avatar ab-10 avatar hiphish avatar mpcjanssen avatar mwgkgk 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.