kovisoft / slimv

Official mirror of Slimv versions released on vim.org
454 stars 60 forks source link

package-local-nicknames support #128

Open remexre opened 1 year ago

remexre commented 1 year ago

Right now, I don't get type hints or completion when a symbol uses a p-l-n name.

kovisoft commented 1 year ago

Could you please give me an example code snippet? I'd like to check how it is handled in Emacs/Slime, what is the communication between Emacs and the Swank server.

remexre commented 1 year ago
(uiop:define-package :example
  (:use :cl)
  (:local-nicknames (#:a :alexandria)))
(in-package :example)

(a:define-constant foo :foo)

This does need a new enough UIOP; iiuc, 3.3.4 for SBCL, 3.3.5 for other impls.

kovisoft commented 1 year ago

Thank you for the example. I played with it a little bit in emacs+slime, and it turned out that emacs+slime is sending swank:completions to the swank server, while vim+slimv is sending either swank:fuzzy-completions or swank:simple-completions (depending on the value of g:slimv_simple_compl). This might be a change in slime, because as I recall, older versions used swank:simple-completions as well, that's why I implemented it the same way in slimv.

I'm going to check how to add swank:completions to slimv. Maybe it will be a new option. I'll come back to you when I have a solution.