Fork me on GitHub
#vim
<
2022-03-08
>
timo10:03:44

With the latest updates of my plugins some functionality of my lsp is not working anymore. Painfully missing is the goto-definition. I upgraded to latest clojure-lsp and using nvim 0.6.1. Anyone has problems with this as well?

timo10:03:33

the lsp-log shows No location found

timo10:03:47

And I am missing clj-kondo annotations as well

dharrigan10:03:59

Do you use coc too?

timo10:03:42

no, using vim-lspconfig

dharrigan10:03:51

kk. For me, goto definition still works (although, for some reason, what I find now broken is that going to a definition in a jar, closing the window, then going back to the defintion then shows a blank)

dharrigan10:03:12

but, in general, conjure + coc + coc-clojure + clojure-lsp works.

dharrigan10:03:48

Sorry I can't be of any help 😞

timo10:03:55

I want my updates to be backrollable 😢

timo10:03:05

thanks anyway

timo10:03:18

need to make a backup in the future

dharrigan10:03:27

I maintain mine in git, of which a version I push here

👍 1
timo11:03:48

but plug update would be mutating your config without the possibility to roll back right?

timo11:03:38

FYI actually suddenly the functionality works again that I was missing earlier

1
dharrigan11:03:10

Yeah, I keep rolling forward 🙂

mamapitufo16:03:53

if you are using vim-plug, there's PlugSnapshot! which I always run before doing a PlugUpdate , and it will generate a script to roll back to the versions you had at the moment of running it

💯 1
timo07:03:55

packer has PackerSnapshot as well! 🎉

walterl21:03:51

Using @rafaeldelboni's config as a base, it's interesting to see how accustomed I've become to some of the other plugins in my config. Like https://github.com/itchyny/vim-cursorword.

sheluchin22:03:35

You may want to check out https://github.com/RRethy/vim-illuminate. Just installed it today myself.

👀 1
Leaf Garland09:03:53

If you only want to use nvim lsp to highlight symbols - you can enable that with 3 lines of per buffer config

autocmd CursorHold  <buffer> lua vim.lsp.buf.document_highlight()
    autocmd CursorHoldI <buffer> lua vim.lsp.buf.document_highlight()
    autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()

Leaf Garland09:03:30

See :help vim.lsp.buf.document_highlight()

walterl14:03:03

I dunno... I like the simplicity of just highlighting (underlining) all (vim) words that are visible, whether or not it's something recognized by LSP.

walterl21:03:39

It's similarly interesting to note the plugins I don't miss, like rainbow parens. Maybe I just haven't come across code where it makes a difference yet.

mjw23:03:23

I liked the idea of rainbow parens so much more than the implementation. Highlighting the opposite paren when the cursor is over one of them is so much more useful to me ¯\(ツ)

walterl23:03:10

Yeah, I have showmatch set when using rainbow or not 🙂

Leaf Garland07:03:02

I'm trying different delimiter highlighting for lists, vectors, maps and sets. The different colours provide enough variety like rainbow-parens but I also get some semantic information too. Particularly like it for making sets more obvious.

walterl14:03:51

@U02EP7NKPAL That sounds interesting. I hope you'll share your results when available. 🙂

Leaf Garland22:03:06

It looks like this. You can see that vectors, maps and sets have a different highlight - I've gone for subtle differences but I think it is enough for me to pick up on.

Leaf Garland22:03:53

I'm using tree-sitter highlighting. If you are and have nvim-treesitter installed then you can customise the highlighting by running :TSEditQueryUserAfter highlights within a clojure buffer. This will create a blank file where you can add your own highlight queries on top of the default clojure treesitter highlighting. Then add these queries to highlight vectors, maps and sets

(map_lit
 open: "{" @MapDelim
 close: "}" @MapDelim)

(vec_lit
 open: "[" @VecDelim
 close: "]" @VecDelim)

(set_lit
 marker: "#" @SetDelim
 open: "{" @SetDelim
 close: "}" @SetDelim)
You'll then need to set colours for those highlight groups MapDelim, VecDelim, etc. :highlight MapDelim guifg=red

❤️ 1