Olical / conjure

Interactive evaluation for Neovim (Clojure, Fennel, Janet, Racket, Hy, MIT Scheme, Guile, Python and more!)
https://conjure.oli.me.uk
The Unlicense
1.78k stars 110 forks source link

hard dependency on filename extension #363

Open FelipeLema opened 2 years ago

FelipeLema commented 2 years ago

I have the following, somewhat easy to reproduce situation

It seems that detection does not work with filetype (ft) but rather the filename extension. I'd suggest to use just filetype as primary source-of-truth or at least not error out when file has no file extension

Olical commented 2 years ago

This is by design in response to people having issues determining different types of schemes I think. You can set :let g:conjure#filetype_suffixes#scheme = v:null to disable the scheme filtering which defaults to ["scm"].

See :h g:conjure#filetype_suffixes#scheme` for more information. I hope this helps!

FelipeLema commented 2 years ago

I tried your recommendation without luck

E5108: Error executing lua [string ":lua"]:1: Conjure client '' doesn't support function: connect
stack traceback:
    [C]: in function 'connect-command'
    [string ":lua"]:1: in main chunk

any other suggestions? can I manually tell Conjure like let b:conjure_client = 'scheme' ?

Olical commented 2 years ago

I think this is just a config thing 🤔 I'll take another look, sorry for the issue!

Olical commented 2 years ago

Oh no I realised I gave the wrong advice! Maybe it's too late now, but I think it should be :let g:conjure#filetype_suffixes#scheme = v:false, not v:null. The null is overridden with the default but the false is not because null becomes nil in Lua which is just gone, it doesn't actually exist, it unsets the key.

Olical commented 2 years ago

Added this note to :help conjure too.

FelipeLema commented 2 years ago

still doesn't work. even adding a filetype=scheme.guile entry in the file to ensure the correct filetype (see :help modeline) does not help