Skip to content

Modernize Lua bootstrap workflow#3

Merged
magic-alt merged 1 commit intomainfrom
codex/extract-necessary-info-for-changelog.md
Oct 16, 2025
Merged

Modernize Lua bootstrap workflow#3
magic-alt merged 1 commit intomainfrom
codex/extract-necessary-info-for-changelog.md

Conversation

@magic-alt
Copy link
Copy Markdown
Owner

Summary

  • promote the Neovim 0.11+ native vim.lsp.config configuration as the default init.lua and fold historical fix notes into the changelog
  • merge the Windows bootstrap helpers into a single install-lua.ps1 that performs backups, installs, and the first-launch Lazy sync
  • refresh the README and LSP guide to document the new requirements and entry points while pruning obsolete process documents

Testing

  • not run (not requested)

https://chatgpt.com/codex/tasks/task_e_68f10665380883289efa647fd005fd39

Copilot AI review requested due to automatic review settings October 16, 2025 15:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Modernizes the Lua bootstrap workflow by promoting the Neovim 0.11+ native vim.lsp.config configuration as the default init.lua, consolidating Windows bootstrap scripts into a unified solution, and updating documentation to reflect new requirements and processes.

  • Promote vim.lsp.config-based configuration to default init.lua
  • Merge Windows bootstrap helpers into single install-lua.ps1 with backup, install, and sync capabilities
  • Update documentation to reflect Neovim 0.11+ requirements and new entry points

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
install-lua.ps1 Unified Windows installer with backup, local/remote install, and first-launch sync
install-local-lua.ps1 Removed legacy local installer (functionality merged into install-lua.ps1)
init.lua Updated to use vim.lsp.config as default, simplified plugin configuration
init-modern.lua Removed experimental file (promoted to main init.lua)
first-launch.ps1 Removed standalone first-launch helper (integrated into install-lua.ps1)
README.md Updated requirements to Neovim 0.11+ and new installation workflow
QUICKSTART_LUA.md Removed in favor of updated main documentation
NEOVIM_COMPAT_FIX.md Removed legacy compatibility guide
LSP_CONFIG_GUIDE.md Updated to reflect new vim.lsp.config default approach
FIRST_LAUNCH_GUIDE.md Removed in favor of integrated workflow in install-lua.ps1
CHANGELOG.md Added v0.2.0 entry documenting major changes

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread install-lua.ps1
}
Write-Host " ✓ lazy.nvim installed" -ForegroundColor Green
} catch {
throw "无法安装 lazy.nvim:$_"
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Error message contains Chinese text in an otherwise English codebase. Consider using English for consistency.

Suggested change
throw "无法安装 lazy.nvim$_"
throw "Failed to install lazy.nvim: $_"

Copilot uses AI. Check for mistakes.
Comment thread init.lua
else
-- 降级到传统方式(需要 nvim-lspconfig 插件)
vim.notify("vim.lsp.config not available, falling back to nvim-lspconfig", vim.log.levels.WARN)
vim.notify("请使用仓库中的 config.vim 或旧版 init.lua(nvim-lspconfig)", vim.log.levels.ERROR)
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Error message contains Chinese text in an otherwise English codebase. Consider using English for consistency.

Suggested change
vim.notify("请使用仓库中的 config.vim 或旧版 init.luanvim-lspconfig", vim.log.levels.ERROR)
vim.notify("Please use config.vim from the repository or the old version of init.lua (nvim-lspconfig).", vim.log.levels.ERROR)

Copilot uses AI. Check for mistakes.
@magic-alt magic-alt merged commit 160270f into main Oct 16, 2025
1 check failed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment thread init.lua
Comment on lines +365 to +399
if vim.lsp.config then
vim.notify("Using Neovim 0.11+ native LSP config", vim.log.levels.INFO)

-- 使用新的配置方式
vim.lsp.config({
on_attach = on_attach,
capabilities = capabilities,

servers = {
clangd = {
cmd = {
"clangd",
"--background-index",
"--clang-tidy",
"--header-insertion=iwyu",
"--completion-style=detailed",
"--function-arg-placeholders",
},
filetypes = { "c", "cpp", "objc", "objcpp", "cuda" },
},
workspace = {
library = vim.api.nvim_get_runtime_file("", true),
checkThirdParty = false,

lua_ls = {
settings = {
Lua = {
diagnostics = { globals = { "vim" } },
workspace = {
library = vim.api.nvim_get_runtime_file("", true),
checkThirdParty = false,
},
telemetry = { enable = false },
},
},
},
telemetry = { enable = false },
}
},
})
},
})
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Call vim.lsp.config as a function

The new init.lua treats vim.lsp.config as an invokable function (vim.lsp.config({ … })). In Neovim 0.11 the symbol is a module table that exposes helpers like vim.lsp.config.clangd and vim.lsp.enable; it is not callable. When this branch runs on a nightly/0.11 build the expression raises attempt to call a table value, aborting startup before diagnostics and keymaps are registered, effectively disabling the entire configuration. Consider using the module’s documented entry points (vim.lsp.config.* + vim.lsp.enable/vim.lsp.start) instead of calling the table directly.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants