conjure icon indicating copy to clipboard operation
conjure copied to clipboard

hard dependency on filename extension

Open FelipeLema opened this issue 2 years ago • 6 comments

I have the following, somewhat easy to reproduce situation

  • configure conjure with guile
  • open somefile.scm with nvim (file has a proper #!/usr/bin/guile -s as first line, has executable permisssions, ft is scheme.guile)
  • run :ConjureConncect
  • everything works
  • exit nvim
  • rename somefile.scm to somefile
  • open somefile
  • ft is scheme.guile
  • run :ConjureConnect
  • shows error

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

FelipeLema avatar May 28 '22 17:05 FelipeLema

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!

Olical avatar Jun 27 '22 18:06 Olical

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' ?

FelipeLema avatar Aug 26 '22 17:08 FelipeLema

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

Olical avatar Aug 26 '22 18:08 Olical

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 avatar Oct 08 '22 12:10 Olical

Added this note to :help conjure too.

Olical avatar Oct 08 '22 12:10 Olical

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

FelipeLema avatar Oct 12 '22 14:10 FelipeLema