Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: document using nvim-lspconfig #17

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Robzz
Copy link

@Robzz Robzz commented Jun 10, 2024

This PR edits the example configuration for neovim to use the nvim-lspconfig support.

Closes #2

@Robzz
Copy link
Author

Robzz commented Jun 10, 2024

I added an lspconfig based example using my fork (happy to send the PR their way once we're happy with it).

@SilasMarvin
Copy link
Owner

Just added a comment in this thread: #2 (comment)

Excited to get this into nvim-lspconfig!

@Robzz
Copy link
Author

Robzz commented Jun 18, 2024

PR opened yesterday, took a bit longer than I would have liked but time is what it is. Waiting on me writing a bit of docs.

@SilasMarvin
Copy link
Owner

PR opened yesterday, took a bit longer than I would have liked but time is what it is. Waiting on me writing a bit of docs.

This looks awesome thank you! Let me know if I can assist at all

@Robzz
Copy link
Author

Robzz commented Jul 1, 2024

Just a heads up that I haven't forgotten about this, just got a bit busy lately plus my ISP has issues so no internet for me right now. I should be able to resume this weekend or next week.

@SilasMarvin
Copy link
Owner

Just a heads up that I haven't forgotten about this, just got a bit busy lately plus my ISP has issues so no internet for me right now. I should be able to resume this weekend or next week.

Thanks for the update! Sounds good

@Robzz
Copy link
Author

Robzz commented Oct 9, 2024

Well that took a while (ISP troubles dragged on a bit then this kinda fell off my radar, apologies) but I finally got around to it and got a basic config merged in nvim-lspconfig, I see you've added an example config, I'll go and update that.

@Robzz Robzz force-pushed the doc/nvim-example-config branch 3 times, most recently from 411fae3 to 8f8d208 Compare October 9, 2024 21:34
@Robzz Robzz marked this pull request as ready for review October 11, 2024 20:52
@Robzz
Copy link
Author

Robzz commented Oct 11, 2024

OK I've been playing a bit with lsp-ai in nvim the last couple of days, I think the base config works so I'd rather not hold this much longer (lol it's been 3 months), but here's a few notes from my experiments:

  • The nvim-lspconfig default configuration I've contributed attaches the language server to every filetype because of the generic nature of an AI-powered language server. This however, causes unexpected behavior when the language server attaches to buffers such as terminal windows and other windows from plugins and attempting inline completions there but not being able to read physical files (my LSP log files are full of errors caused by terminal windows for instance). I don't have a perfect solution so far, so I've mentioned the issue in a comment, restricting lsp-ai to the filetypes you use is probably the easiest solution in this case.
  • Also, the default config runs in single-file mode to work around not setting a root_dir by default , leaving it to the user for the sake of being generic. Some sort of default might make sense, like detecting a git repo and using that, the nvim-lspconfig contributor guide suggested some APIs but it seems like I don't have them on my older nvim 0.9.x, so I'll leave that as future work for the moment I guess.

Now, from my limited understanding of the LSP and what I've seen in the lsp-ai docs, the file store is still the only supported backend, and the prompt docs suggest no context is injected when using the file store as a backend, so no root_dir being set should not matter for now if I understand it correctly ? Docs should probably be expanded when that is no longer the case though.

@Robzz Robzz changed the title doc: add WIP nvim example config doc: document using nvim-lspconfig Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Neovim Plugin and nvim-lspconfig integration
2 participants