From 493f92431b6b23d574003235444a9fa8d6456237 Mon Sep 17 00:00:00 2001 From: Zhe Yu Date: Wed, 18 Jun 2025 17:54:17 +0800 Subject: [PATCH 1/4] refactor(nvim)!: Drop support for nvim-lspconfig and only use `vim.lsp.config`. --- docs/neovim.md | 8 +++----- lua/vectorcode/config.lua | 7 ------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/docs/neovim.md b/docs/neovim.md index f718315b..699aebd2 100644 --- a/docs/neovim.md +++ b/docs/neovim.md @@ -320,11 +320,9 @@ interface: 2. The `lsp` based backend, which make use of the experimental `vectorcode-server` implemented in version 0.4.0. If you want to customise the LSP executable or any options supported by `vim.lsp.ClientConfig`, you can do so by using - `vim.lsp.config()` or - [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig). The LSP will - attempt to read configurations from these 2 sources before it starts. (If - `vim.lsp.config.vectorcode_server` is not `nil`, this will be used and - nvim-lspconfig will be ignored.) + `vim.lsp.config()`. This plugin will load the config associated with the name + `vectorcode_server`. You can override the default config (for example, the + path to the executable) by calling `vim.lsp.config('vectorcode_server', opts)`. | Features | `default` | `lsp` | diff --git a/lua/vectorcode/config.lua b/lua/vectorcode/config.lua index c447d97c..4087b87c 100644 --- a/lua/vectorcode/config.lua +++ b/lua/vectorcode/config.lua @@ -49,13 +49,6 @@ local lsp_configs = function() -- nvim >= 0.11.0 cfg = vim.tbl_deep_extend("force", cfg, vim.lsp.config.vectorcode_server) logger.debug("Using vim.lsp.config.vectorcode_server for LSP config:\n", cfg) - else - -- nvim < 0.11.0 - local ok, lspconfig = pcall(require, "lspconfig.configs") - if ok and lspconfig.vectorcode_server ~= nil then - cfg = lspconfig.vectorcode_server.config_def.default_config - logger.debug("Using nvim-lspconfig for LSP config:\n", cfg) - end end cfg.name = "vectorcode_server" if setup_config.sync_log_env_var then From a54169794dca7a98c6b8a05715c76efe706345b8 Mon Sep 17 00:00:00 2001 From: Davidyz Date: Wed, 18 Jun 2025 09:56:56 +0000 Subject: [PATCH 2/4] Auto generate docs --- doc/VectorCode.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/doc/VectorCode.txt b/doc/VectorCode.txt index d71a6fe8..4ea5efc4 100644 --- a/doc/VectorCode.txt +++ b/doc/VectorCode.txt @@ -354,11 +354,9 @@ used in previous versions; 2. The `lsp` based backend, which make use of the experimental `vectorcode-server` implemented in version 0.4.0. If you want to customise the LSP executable or any options supported by `vim.lsp.ClientConfig`, you can do so by using -`vim.lsp.config()` or -nvim-lspconfig . The LSP will -attempt to read configurations from these 2 sources before it starts. (If -`vim.lsp.config.vectorcode_server` is not `nil`, this will be used and -nvim-lspconfig will be ignored.) +`vim.lsp.config()`. This plugin will load the config associated with the name +`vectorcode_server`. You can override the default config (for example, the +path to the executable) by calling `vim.lsp.config('vectorcode_server', opts)`. ------------------------------------------------------------------------------- Features default lsp From 30b960d84afdc5443516b39b7980e6a60e14db54 Mon Sep 17 00:00:00 2001 From: Zhe Yu Date: Wed, 18 Jun 2025 17:59:25 +0800 Subject: [PATCH 3/4] docs(nvim): Update version to `*` in nvim docs --- docs/neovim.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/neovim.md b/docs/neovim.md index 699aebd2..1051ffb9 100644 --- a/docs/neovim.md +++ b/docs/neovim.md @@ -43,7 +43,7 @@ Use your favorite plugin manager. ```lua { "Davidyz/VectorCode", - version = "<0.7.0", -- optional, depending on whether you're on nightly or release + version = "*", -- optional, depending on whether you're on nightly or release dependencies = { "nvim-lua/plenary.nvim" }, cmd = "VectorCode", -- if you're lazy-loading VectorCode } From a74108f297c2b1b7200c23a61d6abdd3690967d2 Mon Sep 17 00:00:00 2001 From: Davidyz Date: Wed, 18 Jun 2025 10:00:07 +0000 Subject: [PATCH 4/4] Auto generate docs --- doc/VectorCode.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/VectorCode.txt b/doc/VectorCode.txt index 4ea5efc4..dfcaf4a7 100644 --- a/doc/VectorCode.txt +++ b/doc/VectorCode.txt @@ -54,7 +54,7 @@ Use your favorite plugin manager. >lua { "Davidyz/VectorCode", - version = "<0.7.0", -- optional, depending on whether you're on nightly or release + version = "*", -- optional, depending on whether you're on nightly or release dependencies = { "nvim-lua/plenary.nvim" }, cmd = "VectorCode", -- if you're lazy-loading VectorCode }