A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/apr3vau/lw-plugins below:

apr3vau/lw-plugins: LispWorks Plugins by April & May

LispWorks Plugins by April & May

Here's the LispWorks Plugins created by April & May. Most plugins are zero-dependency (except SVG and Nerd-Icon), tested under LispWorks 8.1.0 & 8.0.1 Macintosh (primary) & Windows, safe for delivery, and have been used for a long time in my own. Each single Lisp file under the root directory are not dependent with each other, for the ease of separation.

All the codes are licensed under 0BSD, allowing any kind of usage without any limitation. Feel free to include any part of them in your own product.

Here we provide:

25/02/2025: Yank from kill-ring is now included inside Vertical Prompt.

The plugins are available via Ultralisp

(ql:quickload :lw-plugins)

Or you can clone this repo to ~/common-lisp/ and

(require "asdf")
(asdf:load-system :lw-plugins)

See Nerd Icons integrations to install extra nerd-icon plugins (extra steps needed).

Display Line Numbers mode

Since LispWorks 8.1.0 Editor has built-in line number displayer, which is recommended. This plugin will not be loaded on LW 8.1.0+, but it's reserved for old versions and references.

Source

Load the lw-plugins system, add (global-display-line-numbers-mode-command 1) to init file if you want it always enable.

Display line-numbers at the left side of Editor. Number at current line will be highlighted followed the move of cursor.

Commands:

Customs:

Known Bugs:

Implementation: Putting overlays on every #\Newlines in buffer. Numbers shown as after-string of the overlay.

Source

Load the lw-plugins system. To automatically fold docstrings in Lisp buffers, put (editor:add-global-hook editor:lisp-mode-hook 'editor::buffer-add-docstring-folding) into your configuration.

Fold docstrings longer than 1 line by default. Folded docstring will be shown with "..." appended. Press C-c C-d to toggle the folding.

Commands:

Implementation: Putting overlays on exceeded docstrings with EDITOR::INVISIBLE T. Similar with the built-in Definition Folding facility.

Source

Load the lw-plugins system, it will automatically turned-on.

Various enhancement to the built-in Directory Mode:

To always keep only 1 Directory Mode buffer, put (setf editor:*directory-mode-kill-when-opening-new-dired-buffer* t) to your configuration.

Enhanced syntax highlight

Source

Provide elaborate syntax highlight to Lisp code. It is extremely helpful when there's lots of nested Sexps.

Faces under the COLOURFUL package:

Personally, I suggest using elaborate syntax highlight for Lisp language. That's because Lisp's S-exp is not symbolic enough to indicate its logical meaning, because all S-exps look same.

For example, in C, function calls have operators at the head, conditional expressions have operators in the middle, and multiple sentences have braces enclosed. But in Lisp, they all look like a list of words inside a bracket.

This makes syntax highlighting crucial - We have to highlight operators, keywords and brackets in different colors, or we can only see a bunch of white on our screen.

Known Bugs

Source

Load the lw-plugins system. Press C-= to select current word, press again will expand the selection to current symbol, current Sexp, outer Sexp, and so on.

Similar with expand-region.el

Source

Load the lw-plugins system, it will automatically turned-on.

Face: editor::highlight-current-line-face

Implementation: Put a face property between two #\Newline s.

Source

Load the lw-plugins system, it will automatically turned-on. Press C-< to navigate to previous occurence of the symbol, C-> for next one.

All occurence of the symbol under current-point will be highlighted with background and underline.

Commands:

Face: editor::highlight-current-symbol-face

Source

Load the lw-plugins system, it will automatically turned-on.

Sly-style fuzzy-matching in-place code completion for LispWorks Editor.

Additionally, we support using M-p and M-n to select over completions, alternative to default Up / Down arrow key, since arrow keys are too far to reach for keyboards. This is implemented using editor::pass-gesture-to-non-focus-completer.

Markdown syntax highlight

Source

Load the lw-plugins system, the Markdown Mode will automatically turned-on for .md & .markdown files.

You can custom the appearance by modifying these symbols inside package editor-markdown:

This plugin needs evaluate (EDITOR-MARKDOWN:UPDATE-FACE) after CAPI initialized. Put the line in to your main function if you want to use it in delivered program.

Implemented by hand-written parser and customized Font Lock Mode.

Source

To use Nerd Icons, you should install NerdFonts first. You can do that by involking Nerd Icons Install Font Editor command if you have load nerd-icons.lisp.

Note: If you choose to install other Nerd Fonts variant (not the Symbols Nerd Font), you should customize the *nerd-font-family* variable.

Integrations:

They're all relying to nerd-icons.lisp. You can use the ASDF systems to load them.

For example, to load all features:

(require "asdf")
(asdf:load-system :lw-plugins/nerd-icons-directory)
(asdf:load-system :lw-plugins/nerd-icons-side-tree)
(asdf:load-system :lw-plugins/nerd-icons-vertical-prompt)

The nerd-icons.lisp provides a most exausted icon selector for files and directories, created in myself. Use nerd-icons:file-to-icon-char to get the corresponding character of a file or directory, or use nerd-icons:file-to-icon-name to get a symbol naming with the name of the icon. The corresponding character and character code are storage inside its symbol-plist with :code and :char properties.

Source

Load the lw-plugins system, it will automatically turned-on.

Like electric-pair-mode in Emacs. Auto-insert or delete right pair of paired characters when inserting / deleting the left one.

Defining editor::*pairs* variables before loading the system to customize which pairs of characters should be auto-inserted and deleted. Default pairs are (), [], {}, "" and ||.

Source

Load the lw-plugins system, Press M-0 at an Editor IDE tool window to open Side Tree, and switch between Side Tree and normal buffer.

Treemacs in LispWorks. Support workspaces, projects and tags for Lisp files.

Key-bindings are same with Treemacs. See the end of the source code for details.

Additionally, Side Tree support most key-bindings of Dired. Press C, R, L, E, etc. will invoke corresponding action

Press #\Tab on a Lisp file will show a list of functions, variables, methods defined in the file. Press #\Enter will navigate to its definition.

Source

Load the lw-plugins system, it will automatically enable for your M-x, Find File, buffer selection, etc.

Nerd-Icon integration included. See Nerd Icons integrations.

Vertical prompting completion for LW Editor, with fuzzy-matching and marginalia.

Like Helm / Ivy / Vertico in Emacs.

Bindings:

Variables:

Faces:

See the source code of vprompt:vertical-parse to further customization or define your own echo-area extensions.

Known Bugs:

Implementation: Define a new echo-parsing function based on editor::parse-for-something, using buffer-local after-change hook to detect change and redisplay candidates. Since LW has hard-coded the region from editor::parse-starting-point to the end of the buffer as the input area, candidates can only be put at the beginning of the echo area buffer.

Source

Load the lw-plugins system, invoke "Visual Line Mode" command when needed.

Useful for working in Editor with Serif fonts, or has long truncated lines.

Similar with visual-line-mode in Emacs. With the mode turned on, the default cursor moving functions will be replaced to Visual version, which will move the cursor by its pixel position instead of logical place.

It may be useful for those who want to ship applications that using Serif font in Editor.

Source

Copy its source code if you want to use it in your own product.

It contains:

  1. A stream connected to an Editor buffer, called ESCAPED-EDITOR-STREAM, which support XTerm-style ANSI escape sequences
  2. A real PTY stream called PTY-STREAM, which will open a pseudo-tty process on Unix and connects to it;
  3. A sample CAPI:EDITOR subclass called PTY-PANE, which combines these two features and an input handling system into a working terminal

The example terminal (lw-term::pty-pane) support running NeoVim and Emacs inside with plugins installed.

Can be useful when you want to show your users colorful terminal output & run a external TUI program.

Motivation:

And about the terminal, It’s actually a deviation of my own product: I want to show my users the output of a terminal program, but that output is COLOURFUL… So I have to implement an "ANSI escape sequence => LW Editor text property” converter myself...

Then, after I finished, I need to give a full test to the converter. That sounds easy, right? just send it strings from SYS:RUN-SHELL-COMMAND running some TUI program… Boom! The TUI program shuts down because it tells me the SYS::PTY-STREAM is not a Pseudo-TTY… In fact, It’s a pseudo-pseudo-tty that’s not created with forkpty() from Unix libc… What can I say!

Thanks the LW FLI, writing a C bridge to forkpty is not difficult, so again, I implemented it myself… After testing, I found that I’ve almost finished a whole project “accidentally”. Hopefully you can have a reliable library now to show colorful terminal output to your customers, my friends!

Hopelessly April

Thanks to the LispWorks Ltd. to provide us the exellent product.

Thanks my sister Simone, and my headmate May, who help and support me.

Supporting Neurodiversity & Transgender & Plurality!

🏳️‍🌈🏳️‍⚧️


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4