Skip to content

Lisp plugin#57

Merged
Nimaoth merged 3 commits intomainfrom
feature/lisp-plugin
Jun 21, 2025
Merged

Lisp plugin#57
Nimaoth merged 3 commits intomainfrom
feature/lisp-plugin

Conversation

@Nimaoth
Copy link
Copy Markdown
Owner

@Nimaoth Nimaoth commented Jun 21, 2025

This is an experiment which adds a builtin plugin containing a custom Lisp interpreter.

The problem I'm trying to solve is the fact that right now, creating custom commands or keybindings which do more than run one
builtin command, is a lot of overhead right now. You have to:

  • Install a compatible Nim compiler
  • Install a compatible Emscripten version
  • Create a custom plugin.nim and compile it to WASM

This is a lot of work for just creating a custom keybinding to do something a bit more complex.

With this plugin you can:

    "vim.normal": {
        "<LEADER>f": ["eval-file", "app://config/custom.lisp"], // run entire file
        "<LEADER>s": ["eval-selection"], // eval selected text as lisp
        "<LEADER>e": ["leval", "(: .set-mode 'vim.insert)"], // bind command to lisp code
                                 // which in this case runs `.set-mode "vim.insert"`
                                 // (`:` means run the first argument as a command and pass remaining arguments.)
    },

This does not replace the WASM plugins completetly, "bigger" or more performance sensitive things should still be a WASM plugin for performance reasons.

@Nimaoth Nimaoth merged commit 792965e into main Jun 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant