lsp

mitchelkuijpers 2024-11-22T14:43:35.271189Z

For some reason I seem to only get keyword completions from LSP for the current file in .cljs files. I am using doom-emacs and fixed this by combining lsp and cider autocompletion with capf with some help from @ag. Is this expected behavior or might this be a configuration error?

mitchelkuijpers 2024-11-23T20:42:18.208989Z

Just to make sure I understand correctly if I have a file somewhere in my project with the keyword :foo should I expect to get autocompletion for :foo if I am in a different file in the same project? Because I just tried nvim with LSP and I notice the same behavior I cannot easily get autocompletion for all keywords in the project (it only works if they are in the same file). With cider I do get all keywords so I currently combine the autcompletion with clojure-lsp but that gives me a lot of double results when autocompleting. I am coming from cursive where I can basically type : and then it already starts autcompleting all keywords from the project + libraries.

mitchelkuijpers 2024-11-26T09:50:36.975619Z

Am I understanding this correctly @ericdallo?

ericdallo 2024-11-26T12:37:26.960909Z

Yes, I can't recall why in the past we decided that we would only provide simple keywords (not aliased or namespaced) for the same namespace (https://github.com/clojure-lsp/clojure-lsp/blob/1e0a34ec65f6a8d92492a15c436c2a43325f06aa/lib/src/clojure_lsp/feature/completion.clj#L472-L473), that's how it works currently, but I can see how convenient should be provide all, feel free to create a issue about it. About the cljs completion, I think it's a bug, feel free to create another one about it

mitchelkuijpers 2024-11-26T13:36:08.413509Z

I will create one for the provide all keywords, and the cljs stuff works fine (I was just expected something else). Thank you so much for your time @ericdallo. Truly an amazing project.

πŸ‘ 1
mitchelkuijpers 2024-11-26T13:48:00.540699Z

https://github.com/clojure-lsp/clojure-lsp/issues/1920

ericdallo 2024-12-02T12:39:09.658339Z

Merged, it should be available soon in #clojure-lsp-builds, thanks for the help

πŸ‘Œ 1
ericdallo 2024-11-22T14:55:15.294929Z

can you provide a code snippet or sample project? or even better, check if it happens on https://github.com/ericdallo/clojure-sample/tree/basic-cljs

mitchelkuijpers 2024-11-22T15:02:18.850369Z

I'll try that project out then

mitchelkuijpers 2024-11-22T15:04:48.080889Z

I get nothing

mitchelkuijpers 2024-11-22T15:05:20.689799Z

And this is for example a function

mitchelkuijpers 2024-11-22T15:06:07.550049Z

Interesting now I get some completion for :name for some reason

mitchelkuijpers 2024-11-22T15:06:24.567469Z

I am using Corfu so with orderless so maybe that is the issue

ericdallo 2024-11-22T15:59:31.978789Z

you can check server logs to see if clojure-lsp is returning properly and not a emacs issue

mitchelkuijpers 2024-11-22T16:02:42.329949Z

Will do thank you

ag 2024-11-22T16:10:15.379419Z

check completion-at-point-functions value in the buffer

mitchelkuijpers 2024-11-22T16:13:14.142889Z

That is the one I created with your help πŸ˜‰

(cape-cider-lsp-yas cape-file t)

ag 2024-11-22T16:32:30.594239Z

instrument it with edebug and see what's going on, I dunno

mitchelkuijpers 2024-11-22T16:49:43.037159Z

I am going to try a clean install of LSP without the default doom-emacs config to see if that works

mitchelkuijpers 2024-11-22T19:51:16.603389Z

It seems that the orderless option in corfu breaks some stuff since I disabled that I get a lot more options

mitchelkuijpers 2024-11-22T19:54:55.789339Z

At least for a :keyword/ I get all the options after the /

vemv 2024-11-22T18:41:50.354059Z

is typescript support on emacs exactly like vscode's lsp offering? Or does Microsoft not license that tech outside vscode? (I think I read something like that, but it may have been for python)

Cora (she/her) 2024-11-25T16:19:08.978119Z

it apparently does do a number of things beyond what the lsp does, but the lsp still has a lot

βœ… 1
Cora (she/her) 2024-11-25T16:22:02.150869Z

someone even wrapped the full extension in an LSP https://github.com/yioneko/vtsls

πŸ‘€ 1
slipset 2024-11-22T19:51:21.430979Z

It ain’t bad, I think?

slipset 2024-11-22T19:51:48.954919Z

I’m missing a proper paredit thingy, but other than that, I get the type errors and the quick fixes and stuff

vemv 2024-11-22T22:07:21.475659Z

much useful - thanks!

ericdallo 2024-11-24T17:59:20.620049Z

AFAIK ts lsp is pretty complete

βœ… 1