diff options
author | adamstuck <adam.moloney.stuck@gmail.com> | 2022-03-12 17:38:32 +0100 |
---|---|---|
committer | adamstuck <adam.moloney.stuck@gmail.com> | 2022-03-12 22:47:03 +0100 |
commit | 8cc68ac8a50756dfc21ce269a969bd7897e173fd (patch) | |
tree | f05d8b44e06d6166115a3b68d30239941fd34931 /.config/nvim/lua/setup/nvim-lsp-installer.lua | |
parent | d394e7dc27de4416f3ba74da736a5251c19a36f4 (diff) |
nvim: config cleanup + speedup (lazy load)
Diffstat (limited to '.config/nvim/lua/setup/nvim-lsp-installer.lua')
-rw-r--r-- | .config/nvim/lua/setup/nvim-lsp-installer.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/.config/nvim/lua/setup/nvim-lsp-installer.lua b/.config/nvim/lua/setup/nvim-lsp-installer.lua new file mode 100644 index 0000000..bd3496e --- /dev/null +++ b/.config/nvim/lua/setup/nvim-lsp-installer.lua @@ -0,0 +1,17 @@ +local lsp_installer = require("nvim-lsp-installer") + +-- Register a handler that will be called for each installed server when it's ready (i.e. when installation is finished +-- or if the server is already installed). +lsp_installer.on_server_ready(function(server) + local opts = {} + + -- (optional) Customize the options passed to the server + -- if server.name == "tsserver" then + -- opts.root_dir = function() ... end + -- end + + -- This setup() function will take the provided server configuration and decorate it with the necessary properties + -- before passing it onwards to lspconfig. + -- Refer to https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md + server:setup(opts) +end) |