aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/server.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2021-10-10 19:20:16 +0200
committerGitHub <noreply@github.com>2021-10-10 19:20:16 +0200
commit5f54148153a878cc9cbe370adccda0f706251d89 (patch)
tree28ae0436232486323dfce3444e1d25657c34d75e /lua/nvim-lsp-installer/server.lua
parentjdtls: fix jar argument (diff)
downloadmason-5f54148153a878cc9cbe370adccda0f706251d89.tar
mason-5f54148153a878cc9cbe370adccda0f706251d89.tar.gz
mason-5f54148153a878cc9cbe370adccda0f706251d89.tar.bz2
mason-5f54148153a878cc9cbe370adccda0f706251d89.tar.lz
mason-5f54148153a878cc9cbe370adccda0f706251d89.tar.xz
mason-5f54148153a878cc9cbe370adccda0f706251d89.tar.zst
mason-5f54148153a878cc9cbe370adccda0f706251d89.zip
add keybindings to UI window (#140)
- Allows for expanding servers to view more information about it. - Allows for installing/reinstalling/uninstalling servers. The default keybindings is an attempt to mimic vim-fugitive's :Git maps, and these can be overriden. The keybinding implementation in display.lua is a bit hacky, but it works and the "public" API is at least manageable. This will also open up for adding more metadata in the future, such as filetype information, currently installed version, latest available version, etc. Also there's Cowth Vader.
Diffstat (limited to 'lua/nvim-lsp-installer/server.lua')
-rw-r--r--lua/nvim-lsp-installer/server.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/lua/nvim-lsp-installer/server.lua b/lua/nvim-lsp-installer/server.lua
index 4c8d4e65..1240d349 100644
--- a/lua/nvim-lsp-installer/server.lua
+++ b/lua/nvim-lsp-installer/server.lua
@@ -17,6 +17,9 @@ M.Server.__index = M.Server
--@param opts table
-- @field name (string) The name of the LSP server. This MUST correspond with lspconfig's naming.
--
+-- @field homepage (string) A URL to the homepage of this server. This is for example where users can
+-- report issues and receive support.
+--
-- @field installer (function) The function that installs the LSP (see the .installers module). The function signature should be `function (server, callback)`, where
-- `server` is the Server instance being installed, and `callback` is a function that must be called upon completion. The `callback` function
-- has the signature `function (success, result)`, where `success` is a boolean and `result` is of any type (similar to `pcall`).
@@ -37,6 +40,7 @@ function M.Server:new(opts)
return setmetatable({
name = opts.name,
root_dir = opts.root_dir,
+ homepage = opts.homepage,
_root_dir = opts.root_dir, -- @deprecated Use the `root_dir` property instead.
_installer = type(opts.installer) == "function" and opts.installer or installers.pipe(opts.installer),
_default_options = opts.default_options,