-
Notifications
You must be signed in to change notification settings - Fork 4
0.11 LSP loading #74
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
0.11 LSP loading #74
Conversation
WalkthroughThe changes update the way LSP server configurations are accessed and set up by switching from the external Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant LSPModule
participant NeovimLSP
User->>LSPModule: register_lsp(name, setup)
LSPModule->>NeovimLSP: config(name, setup)
LSPModule->>NeovimLSP: enable(name)
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (1)`plugins/**/*.lua`: Please ensure all of the following: - Plugins are lazyloaded if possible through `nobbz.lazy` - `local` has to be used - coding follows the [luarocks styleguide...
🔇 Additional comments (2)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors LSP setup to use Neovim’s built-in LSP API instead of the external lspconfig plugin.
- Removed
require("lspconfig")and replaced itssetupcall withvim.lsp.configandvim.lsp.enable. - Updated health checks to read server configs from
vim.lsp.configrather than fromlspconfig.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| plugins/nobbz/lua/nobbz/lsp.lua | Switched LSP initialization calls from lspconfig to built-in API |
| plugins/nobbz/lua/nobbz/health.lua | Updated health module to fetch server config from built-in API |
Comments suppressed due to low confidence (1)
plugins/nobbz/lua/nobbz/health.lua:74
- Accessing
vim.lsp.config[lsp]relies on an internal table that may not be populated; consider using a documented getter (e.g.,vim.lsp.get_config) or maintain your own registry for server configs.
local config = vim.lsp.config[lsp]
| vim.lsp.config(name, setup) | ||
| vim.lsp.enable(name) |
Copilot
AI
Jun 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no vim.lsp.config(name, setup) function in the built-in API; you likely need to call vim.lsp.start_client(setup) or use the documented vim.lsp.start(config) method instead.
| vim.lsp.config(name, setup) | |
| vim.lsp.enable(name) | |
| vim.lsp.start(setup) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to https://neovim.io/doc/user/lsp.html#lsp-quickstart, vim.lsp.config and vim.lsp.enable do exist.
| vim.lsp.config(name, setup) | ||
| vim.lsp.enable(name) | ||
|
|
Copilot
AI
Jun 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vim.lsp.enable is not a standard Neovim LSP API call; if you’re trying to attach or start the server, use vim.lsp.start_client or the appropriate attach function.
| vim.lsp.config(name, setup) | |
| vim.lsp.enable(name) | |
| vim.lsp.start_client(setup) |
Summary by CodeRabbit