Fork me on GitHub

hi, i'm having a play with conjure and vim. Does anyone know why i'm getting different colour hilighting for a user defined function call vs a call to a function in the core lib? Eg (my-fun vs (reduce . I've put a screenshot below I'm using conjure neovim treesitter and gruvbox-material


I'd like get-input to be highlighted in green basically

Noah Bogart16:02:08

i don't know how neovim tree-sitter works, but i had to change the syntax files i downloaded

Noah Bogart16:02:32

i can paste the changes in here to show what i did

Nikolay Kotsev16:02:13

If I recall correctly the default highlighting comes from and to be precise . In there there is a g:clojure_syntax_keywords variable that is checked for similar list to the one shown. You can extend it with anything you want, but the new keywords start getting highlighted on redraw of the buffer. I’m not aware of a dynamic solution for this, but would be glad to check it out if somebody has any suggestions.


sorry I'm a little lost now

Nikolay Kotsev16:02:13

Sorry. I tend to overcomplicate things. Basically as far as I know it is not supported by default. You should be able to use the forementioned global variable if you want to write something on your own.


they seem to have just put a hard coded list of core functions. I was kind of expecting any word prefixed with ( to be highlighted, it seems quite strange to me


i think is what i'm looking for but doesn't seem to play with conjure

🔥 1
Noah Bogart18:02:20

That should work with conjure, they don't overlap I don’t think

Noah Bogart18:02:29

I use both at least and haven't noticed an issue


I think it only works with fireplace...

Noah Bogart18:02:59

Oops you're right. I thought you linked the same static files I linked earlier

Noah Bogart18:02:11

When I get back in my computer I can send you my changes to make it highlight properly


do you use conjure?

Noah Bogart18:02:33

Yes and lsp using coc

Leaf Garland18:02:12

You say you are using treesitter. Did you install the clojure treesitter modules? If so it's likely the highlighting will be from treesitter.


i installed the clojure module via :TSInstall clojure


do you think that's conflicting with vim-clojure-highlight ?

Leaf Garland01:02:17

The tree sitter highlight module for clojure should highlight all function calls, as in the first element of a list, it doesn't need a repl connection like vim-clojure-highlight. It might be that your cooler scheme is not highlighting those differently to anything else.

Leaf Garland01:02:40

Treesitter highlights start with TS, e.g. function is TSFunction you could try changing that highlight group to see if it works :highlight TSFunction guifg=red


that command didn't do anything


treesitter is installed along wiht the clojure module but perhaps it's not configured properly

Leaf Garland23:02:20

Perhaps. The main thing it to tell tree sitter that you want to enable the highlight module.


I hadn't activated treesitter, once I created my lua file it worked


thanks for your help