Repository navigation
[audit] Normalize vim.lsp.config call style for luals and sourcekit - #166
Merged
Merged
Conversation
luals and sourcekit were configured via table-index assignment
(vim.lsp.config["name"] = {...}) while pyright used the documented
function-call form (vim.lsp.config("name", {...})). Normalize both to
the function-call API so all custom server specs read consistently.
https://claude.ai/code/session_01G8jrJVQBJmgdbZnCY86mXc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Normalize
vim.lsp.configcall style: replace bracket-index assignment with the documented function-call form forlualsandsourcekit.Where
lua/config/plugin_config.luavim.lsp.config["luals"] = {…}→vim.lsp.config("luals", {…})vim.lsp.config["sourcekit"] = {…}→vim.lsp.config("sourcekit", {…})pyrighton line 79 already used the function-call form — this makes all three consistent.Why
vim.lsp.confighas a metatable that accepts both table-index and function-call assignment, so there is no current runtime difference. But the documented API since Neovim 0.11 isvim.lsp.config("name", spec). The mixed style is confusing when reading the file and increases the risk that a future Neovim cleanup removes the table-assignment alias.Test plan
:lua vim.lsp.get_clients()showslualsafter opening a.luafile:lua vim.lsp.get_clients()showssourcekitafter opening a.swiftfile (macOS only)Generated by Claude Code