Nvim completion for Tidalcycles possible?

hello,
i wonder if it is possible to have completion for tidalcycles with nvim.
what kind of configuration and plugins for nvim are neccessary?
with completion i mean displaying candidates from the language tidalcycles and/or from the text inside a tidal file.
currently i`m using emacs and there is completion for the text but unfortunately not for the language.

regards
poul

@poulpoulsen I have used Tidal in nvim for quite a while and I have never found an autocompletion tool for it.
I remember nvim used to pick up bits of what was already written inside the script. If I remember correctly I was using deoplete as plugin.

@poulpoulsen, hey. I just compiled dictionaries (text files with single entries on each line) and then use it as source with nvim-cmp completion engine. Snippet of cmp setup:

lua << EOF
require("cmp_dictionary").setup({
dic = {
        ...
	["supercollider"] = { "~/sp/dict/sc/synths.txt", "~/sp/dict/sc/controls.txt" },
	["tidal"] = {
		-- "~/sp/dict/colors.txt",
		-- "~/sp/dict/samples.txt",
		"~/sp/dict/tidal/functions.txt",
		"~/sp/dict/tidal/controls.txt",
		"~/sp/dict/tidal/chords.txt",
		"~/sp/dict/tidal/arpeggiators.txt",
		"~/sp/dict/tidal/synths.txt"
		},
	....
	},
})
EOF

Nice thing about this approach is that u can put anything u want and only things u use.

2 Likes

Hey, is there a way to automagically generate the dictionaries with existing functions, synths, chords, effects etc. or do you have to do this manually? I'm being lazy, I'll look into this shortly, but if anyone has a quick answer / example, that would be ace.