diff options
| author | Michael Lingelbach <m.j.lbach@gmail.com> | 2020-01-31 00:00:50 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-31 00:00:50 -0800 |
| commit | b487481e19ab803f2fac1c7acc10c83c743dd39b (patch) | |
| tree | 9eb735e6c3ab6e75ca767ee0ab886e6ba5ce32de /lua/nvim_lsp.lua | |
| parent | [docgen] Update README.md (diff) | |
| download | nvim-lspconfig-b487481e19ab803f2fac1c7acc10c83c743dd39b.tar nvim-lspconfig-b487481e19ab803f2fac1c7acc10c83c743dd39b.tar.gz nvim-lspconfig-b487481e19ab803f2fac1c7acc10c83c743dd39b.tar.bz2 nvim-lspconfig-b487481e19ab803f2fac1c7acc10c83c743dd39b.tar.lz nvim-lspconfig-b487481e19ab803f2fac1c7acc10c83c743dd39b.tar.xz nvim-lspconfig-b487481e19ab803f2fac1c7acc10c83c743dd39b.tar.zst nvim-lspconfig-b487481e19ab803f2fac1c7acc10c83c743dd39b.zip | |
rename "skeleton" to "configs" #100
`nvim_lsp/skeleton.lua` is not really a skeleton, it's a `configs`
class that provides
1. actual functionality
2. a bunch of configs
Each config is added to the `configs` object (FKA "skeleton") as
a property. Those configs are not "templates", they are "configs". So we
should clean up the wording in various places to say "config" instead of
"skeleton"/"template".
Closes #64
Diffstat (limited to 'lua/nvim_lsp.lua')
| -rw-r--r-- | lua/nvim_lsp.lua | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lua/nvim_lsp.lua b/lua/nvim_lsp.lua index 734e1175..42b8383b 100644 --- a/lua/nvim_lsp.lua +++ b/lua/nvim_lsp.lua @@ -1,4 +1,4 @@ -local skeleton = require 'nvim_lsp/skeleton' +local configs = require 'nvim_lsp/configs' require 'nvim_lsp/bashls' require 'nvim_lsp/ccls' @@ -32,12 +32,12 @@ local M = { } function M.available_servers() - return vim.tbl_keys(skeleton) + return vim.tbl_keys(configs) end function M.installable_servers() local res = {} - for k, v in pairs(skeleton) do + for k, v in pairs(configs) do if v.install then table.insert(res, k) end end return res @@ -50,17 +50,17 @@ function M._root._setup() M._root.commands = { LspInstall = { function(name) - local template = skeleton[name] - if not template then + local config = configs[name] + if not config then return print("Invalid server name:", name) end - if not template.install then + if not config.install then return print(name, "can't be automatically installed (yet)") end - if template.install_info().is_installed then + if config.install_info().is_installed then return print(name, "is already installed") end - template.install() + config.install() end; "-nargs=1"; "-complete=custom,v:lua.lsp_complete_installable_servers"; @@ -70,18 +70,18 @@ function M._root._setup() function(name) if name == nil then local res = {} - for k, v in pairs(skeleton) do + for k, v in pairs(configs) do if v.install_info then res[k] = v.install_info() end end return print(vim.inspect(res)) end - local template = skeleton[name] - if not template then + local config = configs[name] + if not config then return print("Invalid server name:", name) end - return print(vim.inspect(template.install_info())) + return print(vim.inspect(config.install_info())) end; "-nargs=?"; "-complete=custom,v:lua.lsp_complete_servers"; @@ -94,7 +94,7 @@ end local mt = {} function mt:__index(k) - return skeleton[k] + return configs[k] end return setmetatable(M, mt) |
