Closed tomoakley closed 7 months ago
Hey @tomoakley
Thanks a lot for the contribution!! That's really appreciable! On your problem, a lot of the LS features won't work because the LS needs to be passed few other assets. It is not documented so we'll make sure to add the doc here. I'll try to answer your three points here.
registerHoverProvider
./schema.json
, it is an asset we provide to every release. FWIW the Mason registry package seem to be already handling the schema.json so it is most likely next to LS binary 😃 .// Set the user token
await lsClient.sendRequest(`workspace/executeCommand`, {
command: "setToken",
arguments: ["<user-token>"],
})
// <optional> Set the host URL to request for self-hosted users
await lsClient.sendRequest(`workspace/executeCommand`, {
command: "setSelfHostedUrl",
arguments: ["<self-hosted-url>"],
})
Again, thanks for the great work you're doing! If there is anything else I can do to help please tell me!
Side note: I'm also working on making an CCI NVim pipeline viewer on my free time, I wanted to go for the LS configuration so I can fully appreciate the work you put there 😄 !
Hi @JulesFaucherre! Thanks for the detailed reply. I have updated the path to the schema.json in the -schema
flag which has made the syntax highlighting, autocomplete and syntax validation/usage warnings work correctly. Thanks for pointing out my error! I will look at setting the user token for private orbs/contexts and see if it would be possible to implement the hover feature.
Glad to hear that, again, don't hesitate if you have any other question!
FYI @tomoakley , I just referenced your plugin in the README as one of the clients of the Language Server.
FYI @tomoakley , I just referenced your plugin in the README as one of the clients of the Language Server.
awesome thanks! Although I think you may have put the wrong link 😅
Damn my bad 😅 , that's edited
By the way I also added a page of doc to help other people that would want to implement other LS client. Don't hesitate to look at it here and if you have any thing you think would be worth mentioning in the page please tell !
By the way I also added a page of doc to help other people that would want to implement other LS client. Don't hesitate to look at it here and if you have any thing you think would be worth mentioning in the page please tell !
will have a think, thanks. Just fyi, I managed to get contextual documentation working - had to implement yaml-language-server
and set schemas to download the circle schema. https://github.com/tomoakley/circleci.nvim/pull/9 - was much easier than I thought!
Hi, l've been working on a circleci plugin for neovim, inspired by your vscode plugin. I've added support for the LSP, which attaches to the buffer and is able to do some syntax highlighting, go-to-definition and find references. But the more advanced features you list in the readme don't appear to work, or I'm not sure what I need to do to get them to work, such as:
lua vim.lsp.buf.hover()
but it just says "no information available" on anything (workflows, pipelines, orbs, etc).The syntax highlighting appears to work, although if I start typing a new line, before I've finished it will change all of the text across the buffer to white. When I make the line valid yaml (e.g add a ':'), the syntax highlighting will kick in again. I'm assuming I've implemented it wrong - the implementation in my plugin is here https://github.com/tomoakley/circleci.nvim/blob/main/lua/nvim-circleci/lsp.lua.
Would be very appreciative if anyone who knows Neovim/Lua could tell me what I've done wrong (I'm a bit of a newbie to writing plugins for neovim and handrolling LSP etc)