From bedb2a0df105f68a624a49b867f269b6d55a2c89 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 1 Oct 2024 05:39:12 -0700 Subject: refactor: rename "server_configurations" => "configs" #3330 Problem: The name `server_configurations` is extremely verbose and irritatingly formal and dogmatic. This overlong name is a constant nuisance when reading, writing, and coding. It's also not even correct: these configurations are just as much "client" configurations as they are "server" configurations. Solution: - Rename to a shorter name. - Leave placeholder files for any old URLs that link to the old location. --- scripts/README_template.md | 8 ++++---- scripts/docgen.lua | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'scripts') diff --git a/scripts/README_template.md b/scripts/README_template.md index 1339c502..f06dbc97 100644 --- a/scripts/README_template.md +++ b/scripts/README_template.md @@ -1,9 +1,9 @@ -# Configurations +# LSP configs -LSP configs provided by nvim-lspconfig are listed below. This documentation is -autogenerated from the Lua files. You can view this file in Nvim by running -`:help lspconfig-all`. +LSP configurations provided by nvim-lspconfig are listed below. This +documentation is autogenerated from the Lua files. You can view this file in +Nvim by running `:help lspconfig-all`. {{implemented_servers_list}} diff --git a/scripts/docgen.lua b/scripts/docgen.lua index 1417e345..1a9328c4 100644 --- a/scripts/docgen.lua +++ b/scripts/docgen.lua @@ -88,9 +88,9 @@ local function require_all_configs() vim.env.XDG_CACHE_HOME = '/home/user/.cache' -- Configs are lazy-loaded, tickle them to populate the `configs` singleton. - for _, v in ipairs(vim.fn.glob('lua/lspconfig/server_configurations/*.lua', 1, 1)) do + for _, v in ipairs(vim.fn.glob('lua/lspconfig/configs/*.lua', 1, 1)) do local module_name = v:gsub('.*/', ''):gsub('%.lua$', '') - configs[module_name] = require('lspconfig.server_configurations.' .. module_name) + configs[module_name] = require('lspconfig.configs.' .. module_name) end -- Reset the environment variables @@ -268,10 +268,10 @@ local function generate_readme(template_file, params) local input_template = readfile(template_file) local readme_data = template(input_template, params) - local writer = io.open('doc/server_configurations.md', 'w') + local writer = assert(io.open('doc/configs.md', 'w')) writer:write(readme_data) writer:close() - uv.fs_copyfile('doc/server_configurations.md', 'doc/server_configurations.txt') + uv.fs_copyfile('doc/configs.md', 'doc/configs.txt') end require_all_configs() -- cgit v1.2.3-70-g09d2