Closed topisani closed 6 years ago
Thanks! Really cool that you've delved into this code base.
I changed the client creation code because it essentially made a singleton. (This broke the tests.) Now there is a function makeClient
which returns a fresh client (which can be further extended by other libraries).
That makes a lot of sense!
Ill keep throwing you some PRs then. Id like to implement code actions and a few other things. I'm new to kakoune, and really enjoying it!
Sorry for the huge diff.
The main thing is that i moved out everything in
main
to free functions. The decorators are then members of aclient
object, which is what handles the main state.I did this for writing kakounce-cquery, which needs to handle custom messages and add custom commands, and like this, that part is very easy.
Lastly i also added
lsp-rename
, and the hidden commandslsp-send-did-save
andlsp-buffer-deleted
, hooked to the apropriate hooks.Its been a long time since i wrote any python, so I'm certainly not sure this is the way to do things.