[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] context sensitive auto-completion for symbols in SciTE
From: |
Martin Schneeweis |
Subject: |
[Chicken-users] context sensitive auto-completion for symbols in SciTE |
Date: |
Fri, 15 Jun 2018 14:06:06 +0200 |
Hi everyone,
example for what I want: editing a file that starts with
...
(import scheme chicken)
(use (prefix ports p:))
and then typing somewhere (pipe is my caret)
(p:po|
hitting <Ctrl-Space> - a list pops up - content:
p:port-fold
p:port-for-each
p:port-map
If someone knows of an existing solution - please stop reading -
otherwise please have a look at my implementation and tell me if that
idea is completely insane - and if so - how I could accomplish the same
task easier.
What I am doing is basically:
- parse the current file for occurences of "use", "import" or
"require-extension"
- synthesize a command that looks something like this:
"csi -setup-mode -eval
\"(import ...)(use ...)(print (sort ... (foldl ...
(##sys#current-environment) ...\""
- process the result
The problem with this imlementation is: the symbols of "used" modules
are missing.
If I replace the "use ..." with "import ..." then the symbols become
visible (that baffled me a little bit after reading
http://stackoverflow.com/questions/38924452/use-vs-import-vs-require-vs-require-extension-in-chicken-scheme).
Changing the use- (and I guess require-extension-) clauses seems a
little bit contrived in my eyes - so I thought before I change my
"parser" I ask some chicken experts...